1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00

Refactor: Pull more classes into baselib

This commit is contained in:
gnosygnu
2021-12-19 16:19:19 -05:00
parent 48559edffe
commit 0e80d7ef6d
7999 changed files with 1375876 additions and 1365947 deletions

View File

@@ -1,37 +1,37 @@
== Sample files ==
In /xowa/bin/any/xowa/cfg/wiki/api/, each folder has a sample file that can be used for a wiki. To use it do the following:
* Copy the "-sample.csv" file
* Replace the "-sample" to the name of the wiki. For example, for nethackwiki.com, rename the file to "extensiontags-nethackwiki.com.csv". For English Wikipedia, use "extensiontags-en.wikipedia.org.csv"
* Import the wiki. XOWA will use the data in the file when creating the wiki
This data gets stored in the main ".xowa" database in the xowa_cfg table. For example, run the following SQL: SELECT * FROM xowa_cfg WHERE cfg_key = 'extensiontags';
The remainder of this article documents the purpose of each file.
== extensiontags ==
The "extensiontags" file lists active extensions. For example, to enable only <ref> and <references, use the following two lines:
<pre>
ref
references
</pre>
All other extension tags will be disabled. For example, &lt;math> will show up as just &lt;math> LaTeX source instead of being replaced with graphical equations
The main purpose of this functionality is to disable extensions in some wikis. For example, the <do> extension is only active in the Wikivoyage wiki. Otherwise, English Wikipedia has an article called [https://en.wikipedia.org/wiki/Type_system Type system] which will render incorrectly with the following fragment:
<pre>
<code>if <complex test> then <do something> else <generate type error></code>
</pre>
== interwikimap ==
The "interwikimap" file lists active interwiki prefixes. For example, to enable only the interwiki prefix for commons, use the following:
<pre>
commons|https://commons.wikimedia.org/wiki/~{0}
</pre>
== Sample files ==
In /xowa/bin/any/xowa/cfg/wiki/api/, each folder has a sample file that can be used for a wiki. To use it do the following:
* Copy the "-sample.csv" file
* Replace the "-sample" to the name of the wiki. For example, for nethackwiki.com, rename the file to "extensiontags-nethackwiki.com.csv". For English Wikipedia, use "extensiontags-en.wikipedia.org.csv"
* Import the wiki. XOWA will use the data in the file when creating the wiki
This data gets stored in the main ".xowa" database in the xowa_cfg table. For example, run the following SQL: SELECT * FROM xowa_cfg WHERE cfg_key = 'extensiontags';
The remainder of this article documents the purpose of each file.
== extensiontags ==
The "extensiontags" file lists active extensions. For example, to enable only &lt;ref> and &lt;references, use the following two lines:
<pre>
ref
references
</pre>
All other extension tags will be disabled. For example, &lt;math> will show up as just &lt;math> LaTeX source instead of being replaced with graphical equations
The main purpose of this functionality is to disable extensions in some wikis. For example, the <do> extension is only active in the Wikivoyage wiki. Otherwise, English Wikipedia has an article called [https://en.wikipedia.org/wiki/Type_system Type system] which will render incorrectly with the following fragment:
<pre>
<code>if <complex test> then <do something> else <generate type error></code>
</pre>
== interwikimap ==
The "interwikimap" file lists active interwiki prefixes. For example, to enable only the interwiki prefix for commons, use the following:
<pre>
commons|https://commons.wikimedia.org/wiki/~{0}
</pre>
This will convert &91;&91;commons:Earth]] to a link to https://commons.wikipedia.org/wiki/Earth

View File

@@ -1,38 +1,38 @@
pre
nowiki
gallery
indicator
timeline
hiero
section
score
charinsert
ref
references
inputbox
imagemap
source
syntaxhighlight
poem
templatedata
math
graph
categorytree
nowiki
charinsert
pages
pagequality
pagelist
categorylist
dynamicpagelist
translate
languages
buy
do
drink
eat
listing
see
sleep
rss
quiz
pre
nowiki
gallery
indicator
timeline
hiero
section
score
charinsert
ref
references
inputbox
imagemap
source
syntaxhighlight
poem
templatedata
math
graph
categorytree
nowiki
charinsert
pages
pagequality
pagelist
categorylist
dynamicpagelist
translate
languages
buy
do
drink
eat
listing
see
sleep
rss
quiz
1 pre
2 nowiki
3 gallery
4 indicator
5 timeline
6 hiero
7 section
8 score
9 charinsert
10 ref
11 references
12 inputbox
13 imagemap
14 source
15 syntaxhighlight
16 poem
17 templatedata
18 math
19 graph
20 categorytree
21 nowiki
22 charinsert
23 pages
24 pagequality
25 pagelist
26 categorylist
27 dynamicpagelist
28 translate
29 languages
30 buy
31 do
32 drink
33 eat
34 listing
35 see
36 sleep
37 rss
38 quiz