[Pywikipedia-l] SVN: [4819] trunk/pywikipedia/families
rotem at svn.wikimedia.org
rotem at svn.wikimedia.org
Sat Jan 5 19:11:21 UTC 2008
Revision: 4819
Author: rotem
Date: 2008-01-05 19:11:20 +0000 (Sat, 05 Jan 2008)
Log Message:
-----------
Making Wikisource and Wikinews use a list of the sites by size (updated from Meta) rather than all the known languages; making Wikiversity use a plain list; Updating Wikiquote list; TODO: Do the same for Wikipedia, Wikibooks and Wiktionary.
Modified Paths:
--------------
trunk/pywikipedia/families/wikinews_family.py
trunk/pywikipedia/families/wikiquote_family.py
trunk/pywikipedia/families/wikisource_family.py
trunk/pywikipedia/families/wikiversity_family.py
trunk/pywikipedia/families/wiktionary_family.py
Modified: trunk/pywikipedia/families/wikinews_family.py
===================================================================
--- trunk/pywikipedia/families/wikinews_family.py 2008-01-05 18:23:43 UTC (rev 4818)
+++ trunk/pywikipedia/families/wikinews_family.py 2008-01-05 19:11:20 UTC (rev 4819)
@@ -12,7 +12,13 @@
family.Family.__init__(self)
self.name = 'wikinews'
- for lang in self.knownlanguages:
+ self.languages_by_size = [
+ 'en', 'de', 'pl', 'it', 'fr', 'es', 'pt', 'sv', 'ja', 'zh',
+ 'ru', 'nl', 'sr', 'he', 'ca', 'uk', 'ro', 'fi', 'th', 'no',
+ 'ar', 'bs', 'bg',
+ ]
+
+ for lang in self.languages_by_size:
self.langs[lang] = '%s.wikinews.org' % lang
# Override defaults
@@ -133,16 +139,8 @@
}
- # On most Wikipedias page names must start with a capital letter, but some
- # languages don't use this.
- self.nocapitalize = ['cs', 'de', 'es', 'fa', 'fr', 'gu', 'hi', 'hr',
- 'hu', 'it', 'ja', 'ka', 'kn', 'ku', 'nl', 'sa',
- 'scn', 'sq', 'sv', 'sw', 'tr', 'vi']
-
self.obsolete = {
- 'dk': 'da',
'jp': 'ja',
- 'minnan':'zh-min-nan',
'nb': 'no',
'zh-tw': 'zh',
'zh-cn': 'zh'
@@ -159,17 +157,9 @@
'fi': self.alphabetic,
'fr': self.alphabetic,
'he': ['en'],
- 'hu': ['en'],
'pl': self.alphabetic,
- 'simple': self.alphabetic
- }
+ }
- self.languages_by_size = [
- 'de', 'en', 'fr', 'gl', 'hu', 'it', 'ja', 'nl', 'pl', 'sv',
- 'es', 'fi', 'hi', 'ko', 'la', 'pt', 'ru', 'tr', 'zh',
- 'ca', 'eo', 'et', 'gu', 'he', 'hr', 'ro'
- ]
-
def code2encoding(self, code):
return 'utf-8'
Modified: trunk/pywikipedia/families/wikiquote_family.py
===================================================================
--- trunk/pywikipedia/families/wikiquote_family.py 2008-01-05 18:23:43 UTC (rev 4818)
+++ trunk/pywikipedia/families/wikiquote_family.py 2008-01-05 19:11:20 UTC (rev 4819)
@@ -12,15 +12,16 @@
self.name = 'wikiquote'
self.languages_by_size = [
- 'en','de','pl','it','sk','ru','pt','bs','bg','sl',
- 'es','tr','he','zh','id','sv','lt','ja','no','hu',
- 'el','fa','nl','cs','ku','fi','fr','ar','eo','ca',
- 'gl','ro','ka','hr','la','uk','da','et','sr','vi',
- 'sq','ko','eu','th','simple','nn','ast','ang','hi','lb',
- 'is','ta','az','mr','kn','am','co','ml','cy','wo',
- 'za','te','kr','qu','uz','tt','ur','af','vo','bm',
- 'cr','na','nds','ky','su','als','be','ug','gu','zh-min-nan',
- 'hy','ga','kk','ks','kw','tk',]
+ 'en', 'de', 'it', 'pl', 'sk', 'pt', 'ru', 'bs', 'bg', 'sl',
+ 'es', 'tr', 'he', 'zh', 'lt', 'id', 'fr', 'cs', 'el', 'sv',
+ 'hu', 'ja', 'uk', 'no', 'nl', 'fa', 'fi', 'ku', 'ca', 'ar',
+ 'eo', 'ro', 'hr', 'gl', 'ko', 'af', 'et', 'li', 'ka', 'is',
+ 'sr', 'da', 'nn', 'th', 'ml', 'vi', 'simple', 'sq', 'te',
+ 'la', 'br', 'eu', 'hi', 'ast', 'az', 'ang', 'be', 'zh-min-nan',
+ 'lb', 'su', 'ur', 'mr', 'kn', 'ta', 'ky', 'wo', 'gu', 'uz',
+ 'cy', 'am', 'tt', 'co', 'qu', 'bm', 'ug', 'na', 'kw', 'hy',
+ 'tk', 'vo', 'nds', 'kr', 'cr', 'kk', 'ga', 'ks', 'za', 'als',
+ ]
for lang in self.languages_by_size:
self.langs[lang] = '%s.wikiquote.org' % lang
Modified: trunk/pywikipedia/families/wikisource_family.py
===================================================================
--- trunk/pywikipedia/families/wikisource_family.py 2008-01-05 18:23:43 UTC (rev 4818)
+++ trunk/pywikipedia/families/wikisource_family.py 2008-01-05 19:11:20 UTC (rev 4819)
@@ -10,10 +10,19 @@
family.Family.__init__(self)
self.name = 'wikisource'
+ self.languages_by_size = [
+ 'en', 'fr', 'es', 'zh', 'de', 'it', 'pt', 'ru', 'th', 'pl',
+ 'ro', 'te', 'hr', 'tr', 'he', 'cs', 'fi', 'nl', 'sr', 'sv',
+ 'ar', 'la', 'is', 'ja', 'bs', 'uk', 'el', 'ca', 'ko', 'hu',
+ 'bn', 'hy', 'no', 'da', 'sl', 'ml', 'id', 'mk', 'az', 'ta',
+ 'kn', 'bg', 'fa', 'vi', 'sk', 'cy', 'et', 'lt', 'gl',
+ 'zh-min-nan','yi', 'ht', 'fo', 'ang',
+ ]
+
self.langs = {
'-': 'wikisource.org',
}
- for lang in self.knownlanguages:
+ for lang in self.languages_by_size:
self.langs[lang] = '%s.wikisource.org' % lang
# Override defaults
Modified: trunk/pywikipedia/families/wikiversity_family.py
===================================================================
--- trunk/pywikipedia/families/wikiversity_family.py 2008-01-05 18:23:43 UTC (rev 4818)
+++ trunk/pywikipedia/families/wikiversity_family.py 2008-01-05 19:11:20 UTC (rev 4819)
@@ -13,9 +13,12 @@
self.langs = {
'beta': 'beta.wikiversity.org',
+ 'de': 'de.wikiversity.org',
+ 'en': 'en.wikiversity.org',
+ 'es': 'es.wikiversity.org',
+ 'fr': 'fr.wikiversity.org',
+ 'it': 'it.wikiversity.org',
}
- for lang in self.knownlanguages:
- self.langs[lang] = '%s.wikiversity.org' % lang
# Most namespaces are inherited from family.Family.
# Translation used on all wikis for the different namespaces.
@@ -86,15 +89,6 @@
'fr': u'Discussion Transwiki',
}
- self.obsolete = {
- 'dk': 'da',
- 'jp': 'ja',
- 'minnan':'zh-min-nan',
- 'nb': 'no',
- 'zh-tw': 'zh',
- 'zh-cn': 'zh'
- }
-
def version(self,code):
return "1.12alpha"
Modified: trunk/pywikipedia/families/wiktionary_family.py
===================================================================
--- trunk/pywikipedia/families/wiktionary_family.py 2008-01-05 18:23:43 UTC (rev 4818)
+++ trunk/pywikipedia/families/wiktionary_family.py 2008-01-05 19:11:20 UTC (rev 4819)
@@ -333,7 +333,7 @@
'hu': ['en'],
'pl': self.alphabetic,
'simple': self.alphabetic
- }
+ }
self.languages_by_size = [
'en', 'fr', 'vi', 'zh', 'io', 'el', 'pl', 'it', 'de', 'hu',
More information about the Pywikipedia-l
mailing list