doc: wikiparser: Use icons from the icons directory

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>
This commit is contained in:
Sunil Mohan Adapa 2020-09-14 18:34:28 -07:00 committed by James Valleroy
parent 91d96b9f72
commit 57c60d9ac6
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808
9 changed files with 3 additions and 1 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 589 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 820 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 738 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 758 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 589 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 820 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 738 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 758 B

View File

@ -553,7 +553,9 @@ def map_local_files(path):
if 'target=' in path:
path = path.partition('target=')[2]
if '/' in path:
if path.startswith('icons/'):
pass
elif '/' in path:
path = path.rsplit('/', maxsplit=1)[1]
return f'images/{path}'