-
Notifications
You must be signed in to change notification settings - Fork 121
View
Every HTZ or MAFF archive file saved by WebScrapBook is essentially a ZIP-compressed file, and therefore can always be viewed by extracting using a ZIP software and viewing the containing files.
The entry page of a HTZ file is always index.html
. A MAFF file has each page inside a subfolder with an entry index.*
specified by index.rdf
(see specification).
WebScrapBook has a built-in archive page viewer accessible from the dropdown list of the toolbar button. After opening the viewer, select archive files to view them (via dragging and dropping or the "Pick ZIP files" button).
Due to the limitation of browser extensions, an assistant tool is required to open an archive file directly.
PyWebScrapBook, available on Windows, Mac OS, Linux, etc., supports viewing an archive file with the provided wsb
application.
- Install PyWebScrapBook on the platform.
- Run
which wsb
(orwhere wsb
on Windows) from the command line interface to find the path ofwsb
. - Set default application of MAFF/HTZ file to the application at that path.
- Install WebScrapBook.
- Go to the Extensions page. Find WebScrapBook, and check "Allow access to file URLs".
- Right-click on a HTZ or MAFF file, and select Google Chrome as the default program.
- Right-click to download a desired command file from below links:
- You can optionally install 7-Zip for better support of MAFF.
- This script opens internal pages which starts with
index.html
if 7-Zip is installed; and opens only the main internal directory if not installed. - This script searches 7-Zip installation at the default path. If it's not installed there, its main directory must be added to PATH environment variable to be invoked correctly.
- This script opens internal pages which starts with
- Right-click on a HTZ or MAFF file, and select the downloaded command file as the default program.
- Right-click to download the script and launcher files from links below:
- Move the script file to
~/.local/bin/
or/usr/local/bin/
, and add executable permission. - Move the launcher file to
~/.local/share/applications/
or/usr/share/applications/
, and add executable permission. - Set the launcher of HTZ or MAFF file to "Firefox HTZ" or "Firefox MAFF". To do that you can use "Open File With" context menu item of your Desktop Environment (KDE, XFCE, GNOME, MATE etc). Just choose a
launcher
as a program that you want to use to open a file.
NOTE: For MAFF, currently this only supports opening internal pages which starts with
index.html
. On some operation systems (Ubuntu, Debian etc) you may need to reboot to let the operation system find ascript
and alauncher
to use them through the "Open File With" context menu or the terminal.
You can perform steps 1-3 by one command
# For maff file type: sudo wget https://raw.githubusercontent.com/wiki/danny0838/webscrapbook/files/firefox-maff.sh -O /usr/local/bin/firefox-maff.sh && sudo chmod a+rx /usr/local/bin/firefox-maff.sh && sudo wget https://raw.githubusercontent.com/wiki/danny0838/webscrapbook/files/firefox-maff.desktop -O /usr/share/applications/firefox-maff.desktop && sudo chmod a+rx /usr/share/applications/firefox-maff.desktop# For htz file type: sudo wget https://raw.githubusercontent.com/wiki/danny0838/webscrapbook/files/firefox-htz.sh -O /usr/local/bin/firefox-htz.sh && sudo chmod a+rx /usr/local/bin/firefox-htz.sh && sudo wget https://raw.githubusercontent.com/wiki/danny0838/webscrapbook/files/firefox-htz.desktop -O /usr/share/applications/firefox-htz.desktop && sudo chmod a+rx /usr/share/applications/firefox-htz.desktopAfter that you should reboot your system. After rebooting you can configure your operation system to use Firefox to open
.maff
(or*.htz
). There are two ways to configure file associations in Linux systems. You can configure MIME type (e.g.application/zip
) or you can configure file type extension (e.g.*.zip
). To open.maff
(or*.htz
) files in Firefox you need to configure file type extension and connect*.maff
(or*.htz
) pattern with thelauncher
(firefox-maff.desktop
formaff
andfirefox-htz.desktop
forhtz
). You can do that in System Setting of your Linux system.e.g. For KDE 5 (kubuntu) you can type
kcmshell5 filetypes
to open System Settings/File Associations directly. After that you can peekapplication
item of file type list and create the connection between*.maff
(or*.htz
) andfirefox-maff.desktop
(orfirefox-htz.desktop
).