Difference between revisions of "Kiwix-manage"
(13 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
'''kiwix-manage''' is a console tool which allows | '''kiwix-manage''' is a console tool which allows building library files for Kiwix. A library file is an XML flat file listing ZIM files with all the necessary information (like favicon, date, creator, description, indexpath, filepath, title, source/metalink, ...). | ||
kiwix-manage generated files are thought for two usages: | kiwix-manage generated files are thought for two usages: | ||
* Local library file for kiwix-serve | * Local library file for kiwix-serve | ||
* Remote/portable library file for the Kiwix software, providing a list of downloadable content ([ | * Remote/portable library file for the Kiwix software, providing a list of downloadable content ([https://download.kiwix.org/library/library_zim.xml example]). | ||
By the way, an intern library file is also managed | By the way, an intern library file is also managed and build directly by Kiwix, following the user behaviour (adding, removing new content)... and the format is exactly the same. | ||
== Technical details == | == Technical details == | ||
Line 14: | Line 14: | ||
<source lang="bash"> | <source lang="bash"> | ||
kiwix- | kiwix-manage LIBRARY_PATH add ZIM_PATH [-z|--zimPathToSave the_string_you_want_to_see_in_the_library] [-u|--url http://...metalink] | ||
kiwix- | kiwix-manage LIBRARY_PATH show [CONTENTID1] [CONTENTID2] ... (show everything if no param.) | ||
kiwix- | kiwix-manage LIBRARY_PATH remove CONTENTID1 [CONTENTID2] | ||
</source> | |||
ZIM_PATH is the path, including the filename of the ZIM file. | |||
LIBRARY_PATH is the path, including the filename of the library XML file to create or modify. Typically it is called library_zim.xml | |||
Examples: | |||
<source lang="bash"> | |||
kiwix-manage /var/www/html/library_zim.xml add /var/www/html/zim/test.zim | |||
# Add a ZIM file with a download URL (all below examples are equivalent) | |||
kiwix-manage /var/www/html/library_zim.xml add /var/www/html/zim/test.zim -u http://example.com/zims/test.zim | |||
kiwix-manage /var/www/html/library_zim.xml add /var/www/html/zim/test.zim --url http://example.com/zims/test.zim | |||
kiwix-manage /var/www/html/library_zim.xml add /var/www/html/zim/test.zim --url=http://example.com/zims/test.zim | |||
</source> | </source> | ||
Line 22: | Line 35: | ||
* [[FeedFormat]] | * [[FeedFormat]] | ||
* [[library manager]] | * [[library manager]] | ||
* [[Build a DVD]] |
Latest revision as of 08:10, 10 September 2022
kiwix-manage is a console tool which allows building library files for Kiwix. A library file is an XML flat file listing ZIM files with all the necessary information (like favicon, date, creator, description, indexpath, filepath, title, source/metalink, ...).
kiwix-manage generated files are thought for two usages:
- Local library file for kiwix-serve
- Remote/portable library file for the Kiwix software, providing a list of downloadable content (example).
By the way, an intern library file is also managed and build directly by Kiwix, following the user behaviour (adding, removing new content)... and the format is exactly the same.
Technical details
kiwix-manage is based on a kiwix::Manager class coded in C++ and using a simple/fast/protable XML/DOM XML library (pugixml). To extract content from the ZIM file, it will use the zimlib code.
Usage
kiwix-manage LIBRARY_PATH add ZIM_PATH [-z|--zimPathToSave the_string_you_want_to_see_in_the_library] [-u|--url http://...metalink]
kiwix-manage LIBRARY_PATH show [CONTENTID1] [CONTENTID2] ... (show everything if no param.)
kiwix-manage LIBRARY_PATH remove CONTENTID1 [CONTENTID2]
ZIM_PATH is the path, including the filename of the ZIM file. LIBRARY_PATH is the path, including the filename of the library XML file to create or modify. Typically it is called library_zim.xml
Examples:
kiwix-manage /var/www/html/library_zim.xml add /var/www/html/zim/test.zim
# Add a ZIM file with a download URL (all below examples are equivalent)
kiwix-manage /var/www/html/library_zim.xml add /var/www/html/zim/test.zim -u http://example.com/zims/test.zim
kiwix-manage /var/www/html/library_zim.xml add /var/www/html/zim/test.zim --url http://example.com/zims/test.zim
kiwix-manage /var/www/html/library_zim.xml add /var/www/html/zim/test.zim --url=http://example.com/zims/test.zim