对rfc输入文件执行一组检查以检查错误。

rfclint的Python项目详细描述


对Internet草稿执行验证检查

Internet-Draft是 开始创建RFC的进程。此工具执行这些操作的子集。 执行的操作是:

  • 验证文件是否是格式正确的XML,以及它是否符合xml2rfc版本3 在RFC 7991中定义的架构。
  • 验证嵌入的XML节的格式是否正确。
  • 验证嵌入的ABNF是否完整且格式良好。
  • 识别拼写错误的单词。
  • 检测重复单词。

该工具可以在交互模式或批处理模式下使用。

用法

rfclint接受单个xml文档作为输入,并可选地输出修改后的版本 文件的。

基本用法rfclint [options] SOURCE

常规选项

General options for the program
ShortLongDescription
^{tt2}$^{tt3}$purge the cache and exit
^{tt4}$^{tt5}$don’t use the network to resolve references
^{tt6}$^{tt7}$don’t check against the RNG schema
^{tt8}$^{tt9}$don’t print anything
.^{tt10}$save configuration back to config file
^{tt11}$^{tt12}$print extra information
^{tt13}$^{tt14}$display the version number and exit
^{tt15}$^{tt16}$don’t resolve xi:include elements
.^{tt17}$don’t check xml examples for well-formness
.^{tt18}$do checking for bcp14 keywords
.^{tt19}$skip check svg for limited vocabulary
^{tt20}$^{tt21}$specify the primary cache directory to write to
.^{tt22}$specify the configuration file to use
^{tt23}$^{tt24}$specify an output filename
^{tt25}$^{tt26}$specify an alternate RNG file
.^{tt27}$extract all source code for the given type

拼写选项

The following options affect how the spell checking is performed.

ShortLongDescription
.^{tt28}$don’t perform duplicate detection
.^{tt29}$don’t perform spell checking on the source
.^{tt30}$don’t provide suggestions for misspelled words
.^{tt31}$skip code elements when checking
.^{tt32}$skip artwork elements check checking
.^{tt33}$don’t do window based
.^{tt34}$specify the color to use for word highlighting
.^{tt35}$specify an additional dictionary to use
.^{tt36}$specify the personal dictionary to use
.^{tt37}$program to use for spell checking
.^{tt38}$how many words to display as part of the context

It is assumed that the spell checking program is aspell and that aspell is on the path. For Windows systems, it additionally look in “C:\Program Files (x86)\Aspell\bin” for the program. If a different program is given, then it should be either an absolute path or on the path so that it can be located.

When a misspelled word is located, a certain amount of context will be provided along with the file and line number of the word. The spell-window parameter controls how many words are displayed with up to that number of words being displayed before and after the misspelled word. The context window is also restricted to the current paragraph. The color option allows for the misspelled word to be highlighted, but it requires VT100 terminal emulation and thus may not always work well on Windows systems. The color defaults to ‘bright’ on non-Windows systems and ‘none’ on Windows systems. If the value of spell-window is 0, then no context will be displayed.

abnf检查选项

ShortLongDescription
.^{tt39}$don’t perform abnf checking on the source
.^{tt40}$ABNF file to include when checking
.^{tt41}$specify program to use for ABNF checking

配置文件

rfclint将配置信息保存在配置文件中。默认情况下,文件存储在

  • On Windows: c:\Users\USER\AppData\Local\rfclint\IETF\rfclint.cfg
  • Otherwise: /home/USER/.local/share/rfclint/rfclint.cfg

配置文件的格式是标准的ini文件格式。

拼写配置

  • program - name of the spelling program to use - defaults to aspell
  • window - number of words to display on each side of a misspelled word
  • color - color to use to highlight the misspelled word
  • suggest - Should suggested values be displayed? value is 0 or 1
  • dictionaries - a comma separated list of dictionaries to include

abnf配置

  • program - name of the ABNF program to use - defaults to bap provided w/ rfclint (bap is only installed for systems identified as nt, darwin or linux*)
  • addRules - name of file to be processed along with rules in the source

窗口和诅咒

windows上提供的python版本不包含curses模块的副本。 如果需要在windows系统上进行交互式拼写检查或重复检测,则需要独立于此软件包安装curses模块。 可以在https://www.lfd.uci.edu/~gohlke/pythonlibs/找到curses python扩展的一个位置。 如果未检测到诅咒库,rfclint将自动打开–no curses选项。

依赖关系

rfclint取决于以下软件包:

更改日志

版本0.5.19(8月29日星期四)

  • Modify BCP14 if needed
  • Add <xref> marker when spell checking
  • Change the source tree pointer

版本0.5.17(8月16日星期五)

  • Update documentation to match recent work
  • Add Copyright messages to source files
  • Remove space padding in display of spelling and dups.
  • Keep the case of the first word to display for dup detection
  • Add first level support for BCP 14 checking - Only reports does not fix
  • Add more programming checks for style
  • Remove Python 3.4 from supported list

版本0.5.16(7月1日周一)

  • Update version dependency on rfctools_common

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
json错误“不是JSONObject”:以字符串形式返回此格式的API。如何使用Java从中读取和创建对象?   java GridGain无法绑定到Linux上的任何端口   java在Mac上使用Netbeans,Netbeans找不到。txt文件   使用条件的java查询   甲骨文java。lang.ClassCastException错误   测试JBehave和Java varargs如何将参数传递给varargs方法?   JavaFX,NASA世界风:如何将JavaFX组添加到NASA世界风模型中   java如何将onClick函数传递给Intent   java从文件中读取序列化对象?   java获取资产文件夹的完整路径   java为什么Spring找不到资源文件?   java如何更改启动活动?   在问题类中使用datechooser时,如何用java中的系统当前日期验证用户输入日期   java如何使用Hibernate Envers(@Audited)而不使用Hibernate生成任何表   当从java加速计中检索到更准确的数据时?   如何在java中提取特定的json数据