123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220 |
- <!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/home/wiki/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/home/wiki/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/home/wiki/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/home/wiki/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/home/wiki/Help/Download_XOWA.html" title='Download the XOWA application'>Download XOWA</a></li>
- <li><a href="http://xowa.org/home/wiki/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/home/wiki/App/Setup/System_requirements.html" title='Get XOWA's system requirements'>Requirements</a></li>
- <li><a href="http://xowa.org/home/wiki/App/Setup/Installation.html" title='Get instructions for installing XOWA'>Installation</a></li>
- <li><a href="http://xowa.org/home/wiki/App/Import/Simple_Wikipedia.html" title='Learn how to set up Simple Wikipedia'>Simple Wikipedia</a></li>
- <li><a href="http://xowa.org/home/wiki/App/Import/English_Wikipedia.html" title='Learn how to set up English Wikipedia'>English Wikipedia</a></li>
- <li><a href="http://xowa.org/home/wiki/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/home/wiki/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/home/wiki/Help/About.html" title='Get more information about XOWA'>About</a></li>
- <li><a href="http://xowa.org/home/wiki/Help/Contents.html" title='View a list of help topics'>Contents</a></li>
- <li><a href="http://xowa.org/home/wiki/Help/Media.html" title='Read what others have written about XOWA'>Media</a></li>
- <li><a href="http://xowa.org/home/wiki/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/home/wiki/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 class="portal" id='xowa-portal-image'>
- <br/>
- <a href="https://play.google.com/store/apps/details?id=org.xowa" class="image">
- <img width='140px' src="https://gnosygnu.github.io/xowa/en-play-badge.png" />
- </a>
- </div>
-
- </div>
- </body>
- </html>
|