对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第三方库


热门话题
java素数校正(2个数组)   java是否可以将ArrayList除以一个double并创建一个新列表?   列出Java类Java的消息体编写器。util。ArrayList   Java将管道分隔文本\csv文件转换为XML   JAVA木卫一。IOException:读取Transferncode时EOF过早:分块http响应   java Volatile变量的读写   java错误:类型不匹配:无法从ArrayList<Subchild>转换为ArrayList<String>   java:无法向AsyncLoadingCache提供CacheWriter   java多级listview Android Studio   静态Java哈希映射性能   循环如何在JAVA中创建三角形   java在春季为ContextFactoryBean定义多个contextPath路由   java从服务器的URL下载数据,并将其保存在一个私有的安全文件夹中   JavaSpringJPA查询   objective c Java REST服务二进制下载   使用JavaSpringRESTAPI并将记录插入mysql表   java你会选择一个算法的速度而不是它对内存的有效使用吗?   java通过多个字段比较对象,如何添加一个方法?   java在spring框架上使用@ModelAttribute(“myobject”)访问服务器上的JSON