logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

html2textrc - formatting properties file for html2text(1)

Author

Current primary download location for html2text is: https://github.com/grobian/html2text.

Description

The html2textrc(5) file defines a set of formatting properties used by the html2text(1) utility, that overrides the program's built-in formatting defaults. Each line of the html2textrc(5) file is either a formatting property or a comment. Lines with a leading "#" or "!" (i.e. the first non-space character is a "#" or a "!") and blank lines (i.e. a line consisting only of white-space characters), are considered comments and ignored. Everything else is literary interpreted by the parser as a formatting property, where a string-type property value may also be empty (unsets default value). Both, the property key and the property value, may contain C- style escape sequences to mask meta characters. Apropertydefinitionlineconsistsof: (1) Optional leading space, (2) the property key (a sequence of non-space characters except "=" and ":") as described below, (3) an optional space, (4) an optional "=" or ":", (5) optional space, (6) the property value as described below. Everything up to the next newline is interpreted literary as the value of the specified element. Literary meant leading white-space must be quoted with backslashes (i.e. "\ "). Be aware not to include unwanted trailing white-space characters.

Name

html2textrc - formatting properties file for html2text(1)

Options

The following is the list of valid formatting properties, together with their default values. If the -style command line option of html2text(1) is used, different default values apply. Curly braces indicate alternatives, e.g. {AB}C stands for AC or BC. DOCUMENT.{vspace.{beforeafter}indent.{leftright}}=0 Specifies how many blank lines are inserted before and after, and how many blank columns are inserted to the left and to the right of the formatted document. (Numeric.) BODY.{vspace.{beforeafter}indent.{leftright}}=0 Same for the document body. (Since the document body is currently the only document part that is rendered, it is virtually the same whether you specify DOCUMENT or BODY). (Numeric.) {OLULDIRMENUDL}.vspace.{beforebetweenafter}=0 Specifies how many blank lines are inserted before a list, between the individual list items, and after the list. (Numeric.) {OLULDIRMENU}.indents=6 Specifies by how deep list items are indented. If an item bullet would not fit into the space created by the indentation, then the indentation is automatically increased such that the bullet fits in (relevant for relatively wide bullets, e.g. roman numbers). If N blank-separated integers are specified instead of one, then the first N-1 integers specify indentation for the first N-1 list nesting levels, while the last integer specifies the indentation for nesting levels N and higher. (Numeric.) {ULDIR}.default_types=DISCCIRCLESQUARE Specifies the default list type (i.e. the bullet style), if the HTML list tag does not specify an explicit type. Legal values are NO_BULLET, DISC, SQUARE, CIRCLE, CUSTOM1, CUSTOM2 and CUSTOM3. If more than one value is specified, then the values apply for the respective list nesting levels (see indents). (Option.) MENU.default_types=NO_BULLET Same for <MENU>, but here the default is NO_BULLET. (Option.) LI.{discsquarecirclecustom1custom2custom3}_bullet={*#o+-~} Specifies the strings used as list item bullets. (String.) {DTDD}.{vspace.{beforeafter}indent.{leftright}}=0 Specifies how many blank lines are inserted before and after, and how many blank columns are inserted to the left and to the right of each <DT> or <DD> element. (Numeric.) HR.marker== Specifies the character to use for horizontal rules. (String.) HR.{vspace.{beforeafter}indent.{leftright}}=0 Specifies how many blank lines are inserted before and after, and how many blank columns are inserted to the left and to the right of the horizontal rule. (Numeric.) {H1H2H3H4H5H6}.prefix={*********************} Specifies how headings are decorated with a prefix. (The default values have a trailing blank, e.g. "****** ".) (String.) {H1H2H3H4H5H6}.suffix={*********************} Specifies how headings are decorated with a suffix. (The default values have a leading blank, e.g. "\ ******".) (String.) {H1H2H3H4H5H6}.vspace.{beforeafter}=0 Specifies how many blank lines are inserted before and after headings. (Numeric.) {PREP}.{vspace.{beforeafter}indent.{leftright}}=0 Specifies how many blank lines are inserted before and after, and how many blank columns are inserted to the left and to the right of these items. (Numeric.) {BLOCKQUOTEADDRESS}.{vspace.{beforeafter}indent.{leftright}}={0055} Specifies how many blank lines are inserted before and after, and how many blank columns are inserted to the left and to the right of these items. (Numeric.) BLOCKQUOTE.prefix= Specifies a prefix to use for each nested level of BLOCKQUOTEs. This can be used as e.g. "> " to emulate email replies. Works best with indent.left set to 0. TABLE.vspace.{beforeafter}=0 Specifies how many blank lines are inserted before and after tables. (Numeric.) {H1H2H3H4H5H6}.attributes=BOLD Specifies the cell attributes for headings. The value is a sequence of NONE, BOLD, UNDERLINE and STRIKETHROUGH. (Option.) {TTIBIGSMALLSUBSUPDFNCODESAMPKBDCITE}.attributes=NONE Specifies the cell attributes for these text items. Legal values are: NONE, BOLD, UNDERLINE or STRIKETHROUGH. (Option.) U.attributes=UNDERLINE Same for <U> elements, but with a different default value. (Option.) {BEMSTRONG}.attributes=BOLD Same for these elements, but with a different default value. (Option.) STRIKE.attributes=STRIKETHROUGH Same for <STRIKE> elements, but with a different default value. (Option.) A.attributes.{internal_linkexternal_link}=UNDERLINE Specifies the cell attributes for links. A link is an <A> element that has an "HREF" attribute. An internal link is a link whose "HREF" attribute starts with a hash character (e.g. "<A href="#42">"). Legal values are again NONE, BOLD, UNDERLINE and STRIKETHROUGH. (Option.) IMG.replace.{allnoalt}=unset Specifies the string used to replace all <IMG> elements, or those without an "ALT" attribute set. (String.) IMG.alt.{prefixsuffix}={[]} Specifies how the values (if any) of IMG elements' "ALT" attributes are marked. (String.)

See Also

html2text(1) 2020-04-05 html2textrc(5)

Synopsis

Key [ = | : ] Value

See Also