Archive/Import/Sqlite
From XOWA: the free, open-source, offline wiki application
The v0.7.0 sqlite database format is now finalized. If you've imported your wiki to sqlite in v0.6.2 or v0.6.3 you should import it again in v0.7.0. |
As of v0.6.2, XOWA offers the ability to save a wiki in one sqlite database (as opposed to many text files). For more details about sqlite vs text files see Archive/Import/Overview.
Sqlite model database
Every .sqlite3 database is copied from one central source: /xowa/bin/any/sql/xowa/xowa.sqlite3. The SQL used to generate the database can be found at xowa.sql file in the same directory.
UI usage
- Go to Options/Import
- Choose sqlite as the Wiki storage type
Command-line usage
The steps below assume simple.wikipedia.org.
- Replace the contents of xowa_build.gfs with the following:
app.bldr.pause_at_end_('n'); app.scripts.run_file_by_type('user_system_cfg'); app.setup.dumps { db_text_max = 3000; db_categorylinks_max = 3600; db_wikidata_max = 3600; db_ns_map = " Template~Module "; } app.bldr.cmds { add_many ('simple.wikipedia.org', 'import.sql.init').src_xml_fil = '/home/simplewiki-latest-pages-articles.xml'; add_many ('simple.wikipedia.org', 'import.sql.init', 'import.sql.page', 'import.sql.category_v1', 'import.sql.category_registry', 'import.sql.categorylinks', 'import.sql.term'); } app.bldr.run;
Note the following:
- For any other wiki, replace 'simple.wikipedia.org' with the wiki domain name.
-
To use the category v2 system:
- Remove the 'import.sql.category_v1' command. The category_v1 command generates a temporary categorylinks.sql file from the database dump
- Download the atual categorylinks.sql file from the dump server. See Help:Core/Category
- The above will create a minimum of 4 sqlite files. If you want only 1 sqlite file, use the following for app.setup.dumps:
app.setup.dumps { db_text_max = 0 db_categorylinks_max = 0; db_wikidata_max = 0; db_ns_map = ""; }
For more info on these configuration settings, see Archive/Import/Sqlite/Config
Categories