Setting the height to 26 in the XML file results in HTML getting a 16px size.
16x16 is original size of all the icons. This was first proposed with a size of
20 in the original wikiparser MR.
Tests:
- Affected sections/pages of the manual are: Firewall, Hardware and VirtualBox.
Confirm by diffing with manual generated without the code changes.
- Open all affected pages and the full manual page and confirm that images sizes
are 16px (original size).
- Check all affected pages and the full manual page in FreedomBox interface and
confirm that images sizes are 16px (original size).
- Check all affected sections in the generated PDF.
- Repeat tests for English and Spanish manuals.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Currently some icons are duplicated between the images/ directory and
images/icons/ directory. De-duplicate and only use the icons from images/icons
directory.
Tests:
- Affected sections/pages of the manual are: Firewall, Hardware and VirtualBox.
Confirm by diffing with manual generated without the code changes.
- Open all affected pages and the full manual page and confirm that images are
loading properly.
- Check all affected pages and the full manual page in FreedomBox interface and
confirm that images are loading properly.
- Check all affected sections in the generated PDF.
- Repeat tests for English and Spanish manuals.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- Make begin and end markers the default values in the wikiparser arguments so
that they don't have to passed in every time.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
When getting context in included images, the original context might already have
a language component. Don't add it again if it does.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Closes: #1793
resolve_url() now checks for local help pages and shortcuts the links that point
to them to the local copy. Unit doctests have been included also. Expectations
of 2 preexisting tests resulted impacted by the new logic (shortcutted links)
and were adapted accordingly. New doctests unveiled some rough edge of the
previous logic, so the processing of keyword-protocolled links was fine-tuned to
pollish them.
Signed-off-by: Fioddor Superconcentrado <fioddor@gmail.com>
[sunil: Fixed minor indentation, flake8 issues, styling, comments]
[sunil: Use file exists checking instead of iterating directory]
[sunil: Stricter checking using regex for possible local URLs]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
- Matches the original XML more accurately and simplifies some parsing.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- Parse Wiki words like MoinMoin.
- Handle . : etc. at the end of the links properly.
- Use regular expressions to simplify parsing plain text.
- Strip spaces in link targets and text.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- Allow for additional languages to be added
- Fix unwanted spaces in paragraphs
- Handle multi-line ListItems
- Handle icons
- Add line break before inline image in list
Based on patches by Fioddor Superconcentrado <fiodor@gmail.com>.
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
- Handle internal links
- Handle includes
- Handle generic categories and includes
- Handle embedded links
- Handle lists
- Handle admonitions and code blocks
- Generate docbook from wiki
- Use argparse
- Generate <itemizedlist> for lists
- Generate docbook article for testing
- Escape content strings
- Create nested <section>s for headings
- Handle links with empty text
- Generate comments as <remark> within <para>
- Add space at end of paragraph
- Ignore Category when generating
- Generate comment for horizontal rule
- Add missing structure to tables
- Don't generate End Include
- Handle Includes
- Handle BEGIN_INCLUDE
- Process begin and end markers when including file
- Handle embedded attachments
- Add a helper script to test all pages
- Generate docbook for admonitions
- Fix include context
- Don't generate for table of contents
- Ignore lines starting with ##
- Ignore space in comparison test
- Use <para> around listitem content
- Wrap code text in <screen>
- Only split plain text for double underscore
- Generate warning for smaller text
- Handle relative links to wiki
- Fix handling of recursive includes
- Parse URLs out of text
- Handle image attachment parameters
- Use SPDX license identifier
- Handle height property for images
- Strip whitespace when using startswith
- Add cols property to tgroup
- Handle spaces at start and end of multi-line CodeText
- Fix page names
- Make consistent in generating <para>s
- Rewrite list handling to support nested lists properly
- Handle embedded attachments inside links
- Handle links within emphasis
- Handle wiki links to InstallingDebianOn/
- Handle line breaks
- Use paragraphs in Admonitions.
- Handle Anchors
- Don't escape code text
- Fix stopping paragraph when list begins
- Fix characters dropped after PlainText
- Fix finding http and https links in text
- Ignore example URLs containing < or >
- Pass context to every call of to_docbook()
- Render CodeText in paragraph as simply <code>
- Ensure only tablestyle is removed from table cells
- Handle line breaks within table cells
- Handle text alignment style within table cell
- Only split plain text for double brace or double bracket
- Ignore lines with only whitespace for paragraphs
- Make tests verbose if no input files givena
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
The previous logic of the wiki links fix didn't work for translated pages.
Closes: #1908.
Signed-off-by: Fioddor Superconcentrado <fioddor@gmail.com>
[jvalleroy: Remove extra spaces]
[jvalleroy: Fix output path]
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
These files are not installed on the system and don't end up in the Debian
package. They pose not threat of causing a configuration file prompt.
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil@medhas.org Have common top level makefile for building manual]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>