Update for anarchopedia-family.py
* New projects : 'ko': 'kor.anarchopedia.org', 'sq': 'sqi.anarchopedia.org', 'hy': 'hye.anarchopedia.org', 'tr': 'tur.anarchopedia.org', * Stopped projects 'nno': 'nn.anarchopedia.org', 'nob': 'nb.anarchopedia.org',
New self.namespaces[4] = { 'ko': u'아나코백과', 'fa': u'آنارکوپدیا', 'sr': u'Anarhopedija-Анархопедија', 'he': u'אנרכופדיה', 'eo': u'Anarĥopedio', 'ru': u'Анархопедия', 'hy': u'Անարխոպեդիա', 'fi': u'Anarkopedia', 'it': u'Anarcopedia', 'lv': u'Anarhopēdija', 'pt': u'Anarcopédia ', 'tr': u'Anarşipedi ',
*Change of 3 letters codes" zho in place of chi deu in place of ger
We run all our projects now in Mediawiki 1.14a
We have this message when running the bot : WARNING: Could not open 'http://fra.anarchopedia.org/api.php?action=query&meta=userinfo&uipro...'. Maybe the server or your connection is down. Retrying in 1 minutes...
We use both 2 and 3 letters code, but only 2 letters code for interwiki links ([[en:]]).
*Thanks a lot Esperanza
Hello !
I tried updating your family file in r6059
2008/11/5 Guillaume esperanza@no-log.org:
Update for anarchopedia-family.py New self.namespaces[4] = { 'fa': u'آنارکوپدیا', 'he': u'אנרכופדיה', 'fi': u'Anarkopedia', 'lv': u'Anarhopēdija',
I'm not sure about these 4 languages codes, because no 3 letters equivalents seem to have been defined in the family file, e.g. as of now pywikipedia does not know that http://fa.anarchopedia.org/ does exist. ?!
Another problem is that no names are defined in namespace 5 for a lot of wikis... you might want to fix this :)
If you have an updated family file that you use, please attach it here / or on a new bug on the sourceforge bugtracker so my job is easier =)
Thanks,
Thanks for your contributions. Here it's an updated family.py with integration of these 4 languages. I also activated API (just with $wgEnableAPI= true; ?)
Le mercredi 05 novembre 2008 à 11:46 +0800, Nicolas Dumazet a écrit :
Hello !
I tried updating your family file in r6059
2008/11/5 Guillaume esperanza@no-log.org:
Update for anarchopedia-family.py New self.namespaces[4] = { 'fa': u'آنارکوپدیا', 'he': u'אנרכופדיה', 'fi': u'Anarkopedia', 'lv': u'Anarhopēdija',
I'm not sure about these 4 languages codes, because no 3 letters equivalents seem to have been defined in the family file, e.g. as of now pywikipedia does not know that http://fa.anarchopedia.org/ does exist. ?!
Another problem is that no names are defined in namespace 5 for a lot of wikis... you might want to fix this :)
If you have an updated family file that you use, please attach it here / or on a new bug on the sourceforge bugtracker so my job is easier =)
Thanks,
Hoi,
$wgEnableAPI = true; is not sufficient in your case to activate API. Just look at http://fra.anarchopedia.org/api.php : your url rewrite rules assume that we're trying to access the wikipage entitles "api.php" which is wrong. You have to add some exception here.
MediaWiki dev guru's particularly dislike the case when you put mediawiki in site root ( http://www.mediawiki.org/wiki/Manual:Short_URL#URL_like_-_example.com.2FPage... , http://www.mediawiki.org/wiki/Manual:Wiki_in_site_root_directory ) but oh well... this is too late, and you should be able to sort this out by yourself :)
When enabled, http://fra.anarchopedia.org/api.php should display something close as http://fr.wikipedia.org/w/api.php . please tell me when it's working, I'll update the family file in the repository :)
2008/11/5 Guillaume esperanza@no-log.org:
Thanks for your contributions. Here it's an updated family.py with integration of these 4 languages. I also activated API (just with $wgEnableAPI= true; ?)
Le mercredi 05 novembre 2008 à 11:46 +0800, Nicolas Dumazet a écrit :
Hello !
I tried updating your family file in r6059
2008/11/5 Guillaume esperanza@no-log.org:
Update for anarchopedia-family.py New self.namespaces[4] = { 'fa': u'آنارکوپدیا', 'he': u'אנרכופדיה', 'fi': u'Anarkopedia', 'lv': u'Anarhopēdija',
I'm not sure about these 4 languages codes, because no 3 letters equivalents seem to have been defined in the family file, e.g. as of now pywikipedia does not know that http://fa.anarchopedia.org/ does exist. ?!
Another problem is that no names are defined in namespace 5 for a lot of wikis... you might want to fix this :)
If you have an updated family file that you use, please attach it here / or on a new bug on the sourceforge bugtracker so my job is easier =)
Thanks,
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Done, we have API enabled now on all projects. You can update the file Just a last remark : we must have 2 letter codes for interwiki links ([[fr:Accueil]], 3 letters doesn't work ([[fra:Accueil]] and with the current code it erases all 2 letters code for 3 letters codes. How can we fix that in the code ?
Le mercredi 05 novembre 2008 à 19:06 +0800, Nicolas Dumazet a écrit :
Hoi,
$wgEnableAPI = true; is not sufficient in your case to activate API. Just look at http://fra.anarchopedia.org/api.php : your url rewrite rules assume that we're trying to access the wikipage entitles "api.php" which is wrong. You have to add some exception here.
MediaWiki dev guru's particularly dislike the case when you put mediawiki in site root ( http://www.mediawiki.org/wiki/Manual:Short_URL#URL_like_-_example.com.2FPage... , http://www.mediawiki.org/wiki/Manual:Wiki_in_site_root_directory ) but oh well... this is too late, and you should be able to sort this out by yourself :)
When enabled, http://fra.anarchopedia.org/api.php should display something close as http://fr.wikipedia.org/w/api.php . please tell me when it's working, I'll update the family file in the repository :)
2008/11/5 Guillaume esperanza@no-log.org:
Thanks for your contributions. Here it's an updated family.py with integration of these 4 languages. I also activated API (just with $wgEnableAPI= true; ?)
Le mercredi 05 novembre 2008 à 11:46 +0800, Nicolas Dumazet a écrit :
Hello !
I tried updating your family file in r6059
2008/11/5 Guillaume esperanza@no-log.org:
Update for anarchopedia-family.py New self.namespaces[4] = { 'fa': u'آنارکوپدیا', 'he': u'אנרכופדיה', 'fi': u'Anarkopedia', 'lv': u'Anarhopēdija',
I'm not sure about these 4 languages codes, because no 3 letters equivalents seem to have been defined in the family file, e.g. as of now pywikipedia does not know that http://fa.anarchopedia.org/ does exist. ?!
Another problem is that no names are defined in namespace 5 for a lot of wikis... you might want to fix this :)
If you have an updated family file that you use, please attach it here / or on a new bug on the sourceforge bugtracker so my job is easier =)
Thanks,
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Good, API is always better :)
I changed the family file once again, in r6070. This change inverts 2 letters language codes et 3 letters ones. Effects : * language links use 2 letters codes * bot accesses fr.anarchopedia instead of fra.anarchopedia.
From my tests everything seem to be handled gracefully. If the bot finds a fra.anarchopedia link, it will assume it's an obsolete form of fr.anarchopedia and will use [[fr: ]] everywhere. A side effect of this is that bot owners have to change their configurations (user-config.py) to use 2 letters code instead of 3 letters code, e.g. usernames['anarchopedia']['fra'] = 'NicDumZ' to usernames['anarchopedia']['fr'] for me.
Is this modification appropriate ? Please report any bugs related to the change, if any are found :)
2008/11/6 Guillaume esperanza@no-log.org:
Done, we have API enabled now on all projects. You can update the file Just a last remark : we must have 2 letter codes for interwiki links ([[fr:Accueil]], 3 letters doesn't work ([[fra:Accueil]] and with the current code it erases all 2 letters code for 3 letters codes. How can we fix that in the code ?
Le mercredi 05 novembre 2008 à 19:06 +0800, Nicolas Dumazet a écrit :
Hoi,
$wgEnableAPI = true; is not sufficient in your case to activate API. Just look at http://fra.anarchopedia.org/api.php : your url rewrite rules assume that we're trying to access the wikipage entitles "api.php" which is wrong. You have to add some exception here.
MediaWiki dev guru's particularly dislike the case when you put mediawiki in site root ( http://www.mediawiki.org/wiki/Manual:Short_URL#URL_like_-_example.com.2FPage... , http://www.mediawiki.org/wiki/Manual:Wiki_in_site_root_directory ) but oh well... this is too late, and you should be able to sort this out by yourself :)
When enabled, http://fra.anarchopedia.org/api.php should display something close as http://fr.wikipedia.org/w/api.php . please tell me when it's working, I'll update the family file in the repository :)
2008/11/5 Guillaume esperanza@no-log.org:
Thanks for your contributions. Here it's an updated family.py with integration of these 4 languages. I also activated API (just with $wgEnableAPI= true; ?)
Le mercredi 05 novembre 2008 à 11:46 +0800, Nicolas Dumazet a écrit :
Hello !
I tried updating your family file in r6059
2008/11/5 Guillaume esperanza@no-log.org:
Update for anarchopedia-family.py New self.namespaces[4] = { 'fa': u'آنارکوپدیا', 'he': u'אנרכופדיה', 'fi': u'Anarkopedia', 'lv': u'Anarhopēdija',
I'm not sure about these 4 languages codes, because no 3 letters equivalents seem to have been defined in the family file, e.g. as of now pywikipedia does not know that http://fa.anarchopedia.org/ does exist. ?!
Another problem is that no names are defined in namespace 5 for a lot of wikis... you might want to fix this :)
If you have an updated family file that you use, please attach it here / or on a new bug on the sourceforge bugtracker so my job is easier =)
Thanks,
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
I fixed all problems (autoconfirmed users don't have anymore recaptcha, Mediawiki:Createuser and php cache) :) I send now an updated file, with new self.namespaces[5] Thanks for all !
Last, I have a bug when running interwiki.py: Updating links on page [[en:anarcho-syndicalism]]. Changes to be made: Adding: [[ko:아나코생디칼리즘]], [[lv:anarho-sindikālisms]] + [[eo:Anarki-sindikatismo]] + [[lt:Anarcho sindikalizmas]] + - [[eo:Anarki-sindikatismo]] + [[ko:아나코생디칼리즘]] - [[lt:Anarcho sindikalizmas]] + [[lv:anarho-sindikālisms]]
NOTE: Updating live wiki... Changing page [[en:anarcho-syndicalism]] Updating links on page [[fr:Anarcho-syndicalisme]]. Changes to be made: Ajoute: [[ko:아나코생디칼리즘]] + [[eo:Anarki-sindikatismo]] - [[lv:anarho-sindikālisms]] + [[lt:Anarcho sindikalizmas]] - [[eo:Anarki-sindikatismo]] + [[ko:아나코생디칼리즘]] - [[lt:Anarcho sindikalizmas]] + [[lv:anarho-sindikālisms]]
NOTE: Performing a recursive query first to save time.... Getting 2 pages from anarchopedia:fi... NOTE: Performing a recursive query first to save time.... Getting 2 pages from anarchopedia:da... Traceback (most recent call last): File "/home/esperanza/pywikipedia/wikipedia.py", line 2859, in run data = self.getData() File "/home/esperanza/pywikipedia/wikipedia.py", line 3030, in getData response, data = self.site.postForm(address, predata) File "/home/esperanza/pywikipedia/wikipedia.py", line 4409, in postForm raise ServerError(e) ServerError: (-2, 'Nom ou service inconnu')
DBG> got network error in _GetAll.run. Sleeping for 15 seconds... Traceback (most recent call last): File "/home/esperanza/pywikipedia/wikipedia.py", line 2859, in run data = self.getData() File "/home/esperanza/pywikipedia/wikipedia.py", line 3030, in getData response, data = self.site.postForm(address, predata) File "/home/esperanza/pywikipedia/wikipedia.py", line 4409, in postForm raise ServerError(e) ServerError: (-2, 'Nom ou service inconnu')
DBG> got network error in _GetAll.run. Sleeping for 30 seconds... Traceback (most recent call last): File "/home/esperanza/pywikipedia/wikipedia.py", line 2859, in run data = self.getData()
(and so on)
Le jeudi 06 novembre 2008 à 09:29 +0100, Guillaume a écrit :
I fixed all problems (autoconfirmed users don't have anymore recaptcha, Mediawiki:Createuser and php cache) :) I send now an updated file, with new self.namespaces[5] Thanks for all ! _______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
thanks, propagated in r6071 :)
2008/11/6 Guillaume esperanza@no-log.org:
I fixed all problems (autoconfirmed users don't have anymore recaptcha, Mediawiki:Createuser and php cache) :) I send now an updated file, with new self.namespaces[5] Thanks for all !
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
I've got a strange error when running replace.py -start:! "raforum.apinc.org" "raforum.info"
When changing page, pywikipedia shows code of the article like this: </ul> </div> </div>
<script type="text/javascript">if (window.runOnloadHook) runOnloadHook();</script> <!-- Served in 1.205 secs. --></body></html>
Saving page [[1793]] failed: Bot goes on after on others pages. It's running correctly without . (dot). Replace.py doesn't work with ponctuation ? Should I use UTF 8 ?
First, some side remarks : # http://fr.anarchopedia.org/index.php?title=Special:Connexion&type=signup... displays the submit button wrong, because of http://fr.anarchopedia.org/MediaWiki:Createaccount which contains wikitext. The message here, is not parsed / cannot display links on a submit button. I think that modifying [[MediaWiki:signupend]] to customize the signup page is more appropriate here. Check other languages as well.
# trying to debug the first remark, I saw that http://fr.anarchopedia.org/Special:Messages_syst%C3%A8me was spitting out a PHP fatal error (!?) Fatal error: Allowed memory size of 20971520 bytes exhausted (tried to allocate 1628161 bytes) in $PATH_REMOVED/OutputPage.php on line 948. ( Note that the disclosure of the installation full path, even on fatal errors, is an important security vulnerability. You should not let php "display_errors" activated when in production. ) See http://www.mediawiki.org/wiki/Manual:Errors_and_Symptoms#Fatal_error:_Allowe... for memory solutions. Check Special:Allmessages on other langs.
# instead of using start:! which crawls through *all* the pages of your wiki, consider using a more precise parameter. (check pagegenerators.py headers to have a list of the most common generator parameters used) Here, -weblink:"http://raforum.apinc.org", using [[Special:LinkSearch]] is much more efficient :)
After reproducing your bug, the source contains : "Your edit includes new external links. To help protect against automated spam, please type the two words you see in the box below". It seems that a captcha is displayed, because we're altering external links. I guess that without dot, the modification doesn't look like a link change to mediawiki. (I fixed in r6069 the behavior of pywikipedia, making sure it detects ReCaptchas instead of spitting out HTML)
Now, we're usually able to ask the operator to provide the answer for standard mediawiki captchas. But we have no support (yet ?) for ReCaptcha. I don't know about the captcha-policy on anarchopedia, but usually, autoconfirmed accounts do not have to enter captchas. Have you tried with an old enough account ?
2008/11/6 Guillaume esperanza@no-log.org:
I've got a strange error when running replace.py -start:! "raforum.apinc.org" "raforum.info"
When changing page, pywikipedia shows code of the article like this: </ul> </div>
</div>
<script type="text/javascript">if (window.runOnloadHook)
runOnloadHook();</script>
<!-- Served in 1.205 secs. --></body></html>
Saving page [[1793]] failed: Bot goes on after on others pages. It's running correctly without . (dot). Replace.py doesn't work with ponctuation ? Should I use UTF 8 ?
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
pywikipedia-l@lists.wikimedia.org