Gospel Translations:Technology/Multi-wiki project
From Gospel Translations
(Difference between revisions)
(4 intermediate revisions not shown) | |||
Line 2: | Line 2: | ||
===Description=== | ===Description=== | ||
- | + | =====Goal===== | |
+ | To have a separate wiki for every language we support, with fully automated content loading and updating. For an example of a final product, see [http://es.gospeltranslations.org the test Spanish wiki]. | ||
- | + | =====Requirements===== | |
* Code base written in PHP | * Code base written in PHP | ||
* For each language ''X'', copy over every ''X'' article from this English wiki to a target wiki, http://''X''.gospeltranslations.org | * For each language ''X'', copy over every ''X'' article from this English wiki to a target wiki, http://''X''.gospeltranslations.org | ||
- | |||
- | + | ===Technical process=== | |
+ | ===== Currently working ===== | ||
+ | |||
+ | There are some underlying techniques not spelled out here, so feel free to ask questions if something isn't connecting for you. | ||
# <font color="green">[working]</font> Cronjob imports up-to-date info DabbleDB database and stores it in local PHP array ([[Project:Technology/DabbleDB_export_structure|see structure]]) | # <font color="green">[working]</font> Cronjob imports up-to-date info DabbleDB database and stores it in local PHP array ([[Project:Technology/DabbleDB_export_structure|see structure]]) | ||
- | # <font color="orange">[ | + | # <font color="orange">[quirky, but working]</font> Automating bot ([http://wikisum.com/w/User:Adam/Creating_MediaWiki_bots_in_PHP how to make one]) |
- | ## reads | + | ## reads wiki page for CSV-style data, which tells what pages to create |
## for each entry, gets translated title off of the English wiki (i.e., for [[Gospel_Implications/es]], it finds the title ''Consecuencias del evangelio'') | ## for each entry, gets translated title off of the English wiki (i.e., for [[Gospel_Implications/es]], it finds the title ''Consecuencias del evangelio'') | ||
## for each entry, creates a page on the target wiki, i.e., http://fr.gospeltranslations.org/wiki/ENTRY_TRANSLATED_TITLE | ## for each entry, creates a page on the target wiki, i.e., http://fr.gospeltranslations.org/wiki/ENTRY_TRANSLATED_TITLE | ||
## on each page created, writes in transclusion code: <code><nowiki>{{:gt_en:ENTRY_ENGLISH_NAME}}</nowiki></code> | ## on each page created, writes in transclusion code: <code><nowiki>{{:gt_en:ENTRY_ENGLISH_NAME}}</nowiki></code> | ||
+ | ## bot code: [[GospelTranslations:Technology/Multi-wiki_project/trans_bot.php|trans_bot.php]]<br> bot framework: [[GospelTranslations:Technology/Multi-wiki_project/basic_bot.php|basic_bot.php]] | ||
# <font color="green">[working]</font> Non-English wiki uses transclusion code to pull article text from English wiki. For example, the code <code><nowiki>{{:gt_en:Gospel_Implications/es}}</nowiki></code> will grab the entire article text from [[Gospel_Implications/es]] | # <font color="green">[working]</font> Non-English wiki uses transclusion code to pull article text from English wiki. For example, the code <code><nowiki>{{:gt_en:Gospel_Implications/es}}</nowiki></code> will grab the entire article text from [[Gospel_Implications/es]] | ||
- | + | ===== Still needed ===== | |
+ | # <font color="red">[unassigned]</font> '''Multiple wiki support.''' Right now this wiki relies on the account settings in basic_bot.php, which are wiki specific. The code should be upgraded so that the user can run the script once and it will update multiple wikis. | ||
+ | # <font color="red">[unassigned]</font> '''Data gathering.''' Currently the user has to first populate a wiki page with CSV-style data (see [http://es.gospeltranslations.org/wiki/Usuario:TransBot test wiki page] for a messy example) telling the bot where to go and what to do. The bot should be able to automatically gather this information for each language from the English wiki. | ||
+ | # <font color="red">[unassigned]</font> '''Page moving.''' The script should check a wiki for outdated pages (perhaps using the "last edited" date) and delete them. This will be necessary if the title of an article is re-translated, in which case the page for that article will need to move to its new title. | ||
+ | # <font color="red">[unassigned]</font> '''Category management.''' Once a wiki is populated with articles, the categories on that wiki will need to be updated. The current script does not support that. | ||
+ | |||
[[Category:Tech admin]] | [[Category:Tech admin]] |
Current revision as of 17:41, 3 September 2008
Read on to learn more. Use the discussion tab to make comments, post solutions, etc.
Contents |
Description
Goal
To have a separate wiki for every language we support, with fully automated content loading and updating. For an example of a final product, see the test Spanish wiki.
Requirements
- Code base written in PHP
- For each language X, copy over every X article from this English wiki to a target wiki, http://X.gospeltranslations.org
Technical process
Currently working
There are some underlying techniques not spelled out here, so feel free to ask questions if something isn't connecting for you.
- [working] Cronjob imports up-to-date info DabbleDB database and stores it in local PHP array (see structure)
- [quirky, but working] Automating bot (how to make one)
- reads wiki page for CSV-style data, which tells what pages to create
- for each entry, gets translated title off of the English wiki (i.e., for Gospel_Implications/es, it finds the title Consecuencias del evangelio)
- for each entry, creates a page on the target wiki, i.e., http://fr.gospeltranslations.org/wiki/ENTRY_TRANSLATED_TITLE
- on each page created, writes in transclusion code:
{{:gt_en:ENTRY_ENGLISH_NAME}}
- bot code: trans_bot.php
bot framework: basic_bot.php
- [working] Non-English wiki uses transclusion code to pull article text from English wiki. For example, the code
{{:gt_en:Gospel_Implications/es}}
will grab the entire article text from Gospel_Implications/es
Still needed
- [unassigned] Multiple wiki support. Right now this wiki relies on the account settings in basic_bot.php, which are wiki specific. The code should be upgraded so that the user can run the script once and it will update multiple wikis.
- [unassigned] Data gathering. Currently the user has to first populate a wiki page with CSV-style data (see test wiki page for a messy example) telling the bot where to go and what to do. The bot should be able to automatically gather this information for each language from the English wiki.
- [unassigned] Page moving. The script should check a wiki for outdated pages (perhaps using the "last edited" date) and delete them. This will be necessary if the title of an article is re-translated, in which case the page for that article will need to move to its new title.
- [unassigned] Category management. Once a wiki is populated with articles, the categories on that wiki will need to be updated. The current script does not support that.