Hi,
I try to run upload.py under Windows 7.
Installed: Python 2.7 Pywikipediabot: Latest from SVN
Executing this line from Windows PowerShell:
c:\python27\python.exe D:\F_Programmierung\pywikipedia\upload.py -keep -log:upload.log -filename:"Kulturpreis der Sparkassen-Kulturstiftung Rheinland 2011-5606.jpg" -noverify "D:\Eigene Bilder\WP Bilder\Kulturpreis der Sparkassen-Kulturstiftung Rheinland 2011-5606.jpg" "== {{int:filedesc}} ==......."
results into "No input filename given".
Same error if I simplify the line to
c:\python27\python.exe D:\F_Programmierung\pywikipedia\upload.py -filename:xxx.jph .\xxx.jpg "...."
Yes, the pathes are correct.
Any ideas? Thanks.
Raimond.
I cannot trace this bug. Is there any newline command in your command line? Could you give me your last entries of commands.log please?
Greetings xqt
----- Original Nachricht ---- Von: Raimond Spekking raimond.spekking@gmail.com An: pywikipedia-l@lists.wikimedia.org Datum: 27.11.2011 11:26 Betreff: [Pywikipedia-l] upload.py under Windows 7: "No input filename given"
Hi,
I try to run upload.py under Windows 7.
Installed: Python 2.7 Pywikipediabot: Latest from SVN
Executing this line from Windows PowerShell:
c:\python27\python.exe D:\F_Programmierung\pywikipedia\upload.py -keep -log:upload.log -filename:"Kulturpreis der Sparkassen-Kulturstiftung Rheinland 2011-5606.jpg" -noverify "D:\Eigene Bilder\WP Bilder\Kulturpreis der Sparkassen-Kulturstiftung Rheinland 2011-5606.jpg" "== {{int:filedesc}} ==......."
results into "No input filename given".
Same error if I simplify the line to
c:\python27\python.exe D:\F_Programmierung\pywikipedia\upload.py -filename:xxx.jph .\xxx.jpg "...."
Yes, the pathes are correct.
Any ideas? Thanks.
Raimond.
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Found it, thanks for your help in IRC.
Raimond.
On 27.11.2011 13:53, info@gno.de wrote:
I cannot trace this bug. Is there any newline command in your command line? Could you give me your last entries of commands.log please?
Greetings xqt
----- Original Nachricht ---- Von: Raimond Spekking raimond.spekking@gmail.com An: pywikipedia-l@lists.wikimedia.org Datum: 27.11.2011 11:26 Betreff: [Pywikipedia-l] upload.py under Windows 7: "No input filename given"
Hi,
I try to run upload.py under Windows 7.
Installed: Python 2.7 Pywikipediabot: Latest from SVN
Executing this line from Windows PowerShell:
c:\python27\python.exe D:\F_Programmierung\pywikipedia\upload.py -keep -log:upload.log -filename:"Kulturpreis der Sparkassen-Kulturstiftung Rheinland 2011-5606.jpg" -noverify "D:\Eigene Bilder\WP Bilder\Kulturpreis der Sparkassen-Kulturstiftung Rheinland 2011-5606.jpg" "== {{int:filedesc}} ==......."
results into "No input filename given".
Same error if I simplify the line to
c:\python27\python.exe D:\F_Programmierung\pywikipedia\upload.py -filename:xxx.jph .\xxx.jpg "...."
Yes, the pathes are correct.
Any ideas? Thanks.
Raimond.
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Lately I started running Interwiki.py on Commons, after getting frequently annoyed that existing interwikis are frequently incomplete, incorrect or missing. Commons has some unique peculiarities related to interwikis, since most links point from Commons categories to Wikipedia articles while Wikipedia articles do not have interwiki links to Commons (only links though [[template:Commons category]]).
I could not get existing code to work, but with small tweeks to interwiki.py and commons_family.py I got it working. Everything was going smoothly for few 10k pages, until my bot (user:JarektBot) was blocked because it "Reorganises cat layout in a standard for which there is no consensus". Apparently on Commons there is no standard if categories go before interwikis or interwikis before categories, and according to blocking admin, bots are expected to leave the page in the order in which they found it.
I studied the interwiki.py, commons_family.py and wikipedia.replaceLanguageLinks function, but as far as I can tell there is no parameter or an easy tweek which would allow me to preserve interwikis/categories order. Am I correct?
Is there any easy solution to this problem?
Jarek T.
(User:Jarekt on Commons)
Hello Jarek,
On 28 November 2011 06:14, Tuszynski, Jaroslaw W. < JAROSLAW.W.TUSZYNSKI@saic.com> wrote:
Apparently on Commons there is no standard if categories go before interwikis or interwikis before categories, and according to blocking admin, bots are expected to leave the page in the order in which they found it.
(...)
Is there any easy solution to this problem?
No, not really. At the moment, what happens is this: first, all interwiki links are removed from the page. Then, they are added to the bottom of the page.
This is - in general - a hard problem to work with. For instance, how should a page like
"blah text [[en:interwiki]] blah blah
[[fr:interwiki]] [[nl:interwiki]]
[[category:cat]]"
be adapted? And how should a page like
"blah text
[[fr:interwiki]]
[[category:cat]]
[[nl:interwiki]]"
be adapted?
Changing the output to a different, but well-defined order is not that hard. Determining the correct order is.
In this case, there are two options: thinking up some heuristic and implementing it, or doing some politics ('hey, if you don't *want* interwikis....').
If you want to work on the heuristic, the replaceLanguageLinks function in pywikibot/textlib.py is where you'd want to start.
Good luck (with either method ;-))!
Merlijn
Hi Merlijn,
I found pywikipedia.org and its subdomains and subdirectories always leads to the pywikibot code review (with doubled slash on the right side) and /nightly is no longer availlable via that domain. I guess this is not in your sense.
Best regards
xqt
Fixed (partially). The /b12345/ etc subfolders are not working yet, as cgi-bin does not seem to be working under pywikipedia.org. Hopefully I'll be able to fix that at some time...
Are there any toolserver users interested in helping maintaining the website? If so, please ask for access to the pywikipedia MMP. Thanks.
Merlijn
On 29 November 2011 15:19, info@gno.de wrote:
Hi Merlijn,
I found pywikipedia.org and its subdomains and subdirectories always leads to the pywikibot code review (with doubled slash on the right side) and /nightly is no longer availlable via that domain. I guess this is not in your sense.
Best regards
xqt
In continuation of this, I started discussion on Commons Village Pump (http://commons.wikimedia.org/wiki/Commons:Village_pump#Should_categorie s_be_in_front_of_interwikis_or_other_way_around.3F ) about order of different parts of wikicode and Pywikipediabot attempts to standardize it. In particular I asked for opinions about preferred order of category and interwiki sections. If any of you are running Pywikipedia bots on Commons, I would like to invite you to this discussion.
Jarek T.
(user:Jarekt)
From: pywikipedia-l-bounces@lists.wikimedia.org [mailto:pywikipedia-l-bounces@lists.wikimedia.org] On Behalf Of Merlijn van Deen Sent: Monday, November 28, 2011 2:46 AM To: Pywikipedia discussion list Subject: Re: [Pywikipedia-l] Interwiki.py on Commons
Hello Jarek,
On 28 November 2011 06:14, Tuszynski, Jaroslaw W. JAROSLAW.W.TUSZYNSKI@saic.com wrote:
Apparently on Commons there is no standard if categories go before interwikis or interwikis before categories, and according to blocking admin, bots are expected to leave the page in the order in which they found it.
(...)
Is there any easy solution to this problem?
No, not really. At the moment, what happens is this: first, all interwiki links are removed from the page. Then, they are added to the bottom of the page.
This is - in general - a hard problem to work with. For instance, how should a page like
"blah text [[en:interwiki]] blah blah
[[fr:interwiki]]
[[nl:interwiki]]
[[category:cat]]"
be adapted? And how should a page like
"blah text
[[fr:interwiki]]
[[category:cat]]
[[nl:interwiki]]"
be adapted?
Changing the output to a different, but well-defined order is not that hard. Determining the correct order is.
In this case, there are two options: thinking up some heuristic and implementing it, or doing some politics ('hey, if you don't *want* interwikis....').
If you want to work on the heuristic, the replaceLanguageLinks function in pywikibot/textlib.py is where you'd want to start.
Good luck (with either method ;-))!
Merlijn