1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2024-10-27 20:34:16 +00:00
gnosygnu_xowa/wiki/home/page/Archive/Import/Sqlite.html
2016-04-17 11:01:24 -04:00

212 lines
8.8 KiB
HTML

<!DOCTYPE html>
<html dir="ltr">
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<title>Archive/Import/Sqlite - XOWA</title>
<link rel="shortcut icon" href="https://gnosygnu.github.io/xowa/xowa_logo.png" />
<link rel="stylesheet" href="https://gnosygnu.github.io/xowa/xowa_common.css" type="text/css">
</head>
<body class="mediawiki ltr sitedir-ltr ns-0 ns-subject skin-vector action-submit vector-animateLayout" spellcheck="false">
<div id="mw-page-base" class="noprint"></div>
<div id="mw-head-base" class="noprint"></div>
<div id="content" class="mw-body">
<h1 id="firstHeading" class="firstHeading"><span>Archive/Import/Sqlite</span></h1>
<div id="bodyContent" class="mw-body-content">
<div id="siteSub">From XOWA: the free, open-source, offline wiki application</div>
<div id="contentSub"></div>
<div id="mw-content-text" lang="en" dir="ltr" class="mw-content-ltr">
<table class="metadata plainlinks ambox ambox-delete" style="">
<tr>
<td class="mbox-empty-cell">
</td>
<td class="mbox-text" style="">
<p>
<span class="mbox-text-span">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.</span>
</p>
</td>
</tr>
</table>
<p>
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 <a href="http://xowa.org/wiki/home/page/Archive/Import/Overview.html" id="xolnki_2" title="Archive/Import/Overview">Archive/Import/Overview</a>.
</p>
<h2>
<span class="mw-headline" id="Sqlite_model_database">Sqlite model database</span>
</h2>
<p>
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.
</p>
<h2>
<span class="mw-headline" id="UI_usage">UI usage</span>
</h2>
<ul>
<li>
Go to <a href="http://xowa.org/wiki/home/page/Options/Import.html" id="xolnki_3" title="Options/Import" class="xowa-visited">Options/Import</a>
</li>
<li>
Choose <b>sqlite</b> as the <b>Wiki storage type</b>
</li>
</ul>
<h2>
<span class="mw-headline" id="Command-line_usage">Command-line usage</span>
</h2>
<p>
The steps below assume simple.wikipedia.org.
</p>
<ul>
<li>
Replace the contents of xowa_build.gfs with the following:
</li>
</ul>
<pre style='overflow:scroll'>
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;
</pre>
<p>
Note the following:
</p>
<ul>
<li>
For any other wiki, replace 'simple.wikipedia.org' with the wiki domain name.
</li>
<li>
To use the category v2 system:
<ul>
<li>
Remove the 'import.sql.category_v1' command. The category_v1 command generates a temporary categorylinks.sql file from the database dump
</li>
<li>
Download the atual categorylinks.sql file from the dump server. See <a href="http://xowa.org/wiki/home/page/Help:Core/Category.html" id="xolnki_4" title="Help:Core/Category">Help:Core/Category</a>
</li>
</ul>
</li>
<li>
The above will create a minimum of 4 sqlite files. If you want only 1 sqlite file, use the following for app.setup.dumps:
</li>
</ul>
<pre>
app.setup.dumps {
db_text_max = 0
db_categorylinks_max = 0;
db_wikidata_max = 0;
db_ns_map = "";
}
</pre>
<p>
For more info on these configuration settings, see <a href="http://xowa.org/wiki/home/page/Archive/Import/Sqlite/Config.html" id="xolnki_5" title="Archive/Import/Sqlite/Config">Archive/Import/Sqlite/Config</a>
</p>
</div>
</div>
</div>
<div id="mw-head" class="noprint">
<div id="left-navigation">
<div id="p-namespaces" class="vectorTabs">
<h3>Namespaces</h3>
<ul>
<li id="ca-nstab-main" class="selected"><span><a id="ca-nstab-main-href" href="index.html">Page</a></span></li>
</ul>
</div>
</div>
</div>
<div id='mw-panel' class='noprint'>
<div id='p-logo'>
<a style="background-image: url(https://gnosygnu.github.io/xowa/xowa_logo.png);" href="http://xowa.org/" title="Visit the main page"></a>
</div>
<div class="portal" id='xowa-portal-home'>
<h3>XOWA</h3>
<div class="body">
<ul>
<li><a href="http://xowa.org/index.html" title='Visit the main page'>Main page</a></li>
<li><a href="http://xowa.org/screenshots.html" title='See screenshots of XOWA'>Screenshots</a></li>
<li><a href="http://xowa.org/wiki/home/page/Help/Download_XOWA.html" title='Download the XOWA application'>Download XOWA</a></li>
<li><a href="http://xowa.org/wiki/home/page/Dashboard/Image_databases.html" title='Download offline wikis and image databases'>Download wikis</a></li>
</ul>
</div>
</div>
<div class="portal" id='xowa-portal-started'>
<h3>Getting started</h3>
<div class="body">
<ul>
<li><a href="http://xowa.org/wiki/home/page/App/Setup/System_requirements.html" title='Get XOWA&apos;s system requirements'>Requirements</a></li>
<li><a href="http://xowa.org/wiki/home/page/App/Setup/Installation.html" title='Get instructions for installing XOWA'>Installation</a></li>
<li><a href="http://xowa.org/wiki/home/page/App/Import/Simple_Wikipedia.html" title='Learn how to set up Simple Wikipedia'>Simple Wikipedia</a></li>
<li><a href="http://xowa.org/wiki/home/page/App/Import/English_Wikipedia.html" title='Learn how to set up English Wikipedia'>English Wikipedia</a></li>
<li><a href="http://xowa.org/wiki/home/page/App/Import/Other_wikis.html" title='Learn how to set up other Wikipedias'>Other Wikipedias</a></li>
</ul>
</div>
</div>
<div class="portal" id='xowa-portal-android'>
<h3>Android</h3>
<div class="body">
<ul>
<li><a href="http://xowa.org/wiki/home/page/Android/Setup.html" title='Setup XOWA on your Android device'>Setup</a></li>
</ul>
</div>
</div>
<div class="portal" id='xowa-portal-help'>
<h3>Help</h3>
<div class="body">
<ul>
<li><a href="http://xowa.org/wiki/home/page/Help/About.html" title='Get more information about XOWA'>About</a></li>
<li><a href="http://xowa.org/wiki/home/page/Help/Contents.html" title='View a list of help topics'>Contents</a></li>
<li><a href="http://xowa.org/wiki/home/page/Help/Media.html" title='Read what others have written about XOWA'>Media</a></li>
<li><a href="http://xowa.org/wiki/home/page/Help/Feedback.html" title='Questions? Comments? Leave feedback for XOWA'>Feedback</a></li>
</ul>
</div>
</div>
<div class="portal" id='xowa-portal-blog'>
<h3>Blog</h3>
<div class="body">
<ul>
<li><a href="http://xowa.org/wiki/home/page/Blog.html" title='Follow XOWA''s development process'>Current</a></li>
</ul>
</div>
</div>
<div class="portal" id='xowa-portal-links'>
<h3>Links</h3>
<div class="body">
<ul>
<li><a href="http://dumps.wikimedia.org/backup-index.html" title="Get wiki datababase dumps directly from Wikimedia">Wikimedia dumps</a></li>
<li><a href="https://archive.org/search.php?query=xowa" title="Search archive.org for XOWA files">XOWA @ archive.org</a></li>
<li><a href="http://en.wikipedia.org" title="Visit Wikipedia (and compare to XOWA!)">English Wikipedia</a></li>
</ul>
</div>
</div>
<div class="portal" id='xowa-portal-donate'>
<h3>Donate</h3>
<div class="body">
<ul>
<li><a href="https://archive.org/donate/index.php" title="Support archive.org!">archive.org</a></li><!-- listed first due to recent fire damages: http://blog.archive.org/2013/11/06/scanning-center-fire-please-help-rebuild/ -->
<li><a href="https://donate.wikimedia.org/wiki/Special:FundraiserRedirector" title="Support Wikipedia!">Wikipedia</a></li>
<!-- <li><a href="" title="Support XOWA! (but only after you've supported archive.org and Wikipedia)">XOWA</a></li> -->
</ul>
</div>
</div>
</div>
</body>
</html>