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 am having trouble with upload.py. Here is output pasted from my
terminal/command line:
-----------------------------------------------------------------
->python upload.py -keep -noverify pic.jpg 'test description'
Reading file pic.jpg
The suggested description is:
test description
Uploading file to family:en via API....
'ascii' codec can't decode byte 0xff in position 633: ordinal not in range(128)
WARNING: Could not open 'http://familywiki.fraserphysics.com/api.php'. Maybe the server or
your connection is down. Retrying in 1 minutes...
'ascii' codec can't decode byte 0xff in position 633: ordinal not in range(128)
WARNING: Could not open 'http://familywiki.fraserphysics.com/api.php'. Maybe the server or
your connection is down. Retrying in 2 minutes...
-----------------------------------------------------------------
Other information:
OS: debian testing
pywikipedia version: 9820 (updated 2011-12-30 in hopes of resolving
problem)
wiki: http://familywiki.fraserphysics.com
other use of pywikipedia: 'python pagefromfile.py -putthrottle:01
-file:export.xml' (seems to do what I want)
uploading images via web interface works
image looks fine on local machine using imagemagick display
Thanks in advance,
Andy
I chatted with one or two regulars on IRC about the idea and there
seemed to be some general support if someone else was willing to take
the lead. Is there general interest in taking the initial steps for a
migration to JIRA, setting up a project, etc.? Existing bugs could
simply be linked from JIRA as new entries are made at the new location.
Re-write is already (at least partly) there and we have a placeholder
webpage on toolserver. We could also create some strategy/long term
planning discussions there as well if we wanted to. If there's an
interest, I can put some time into it. -Doug
I remember there was some trick to tell the interwiki bots to remove the iw
from other wikis instead of putting it back all the time, but what was that?
--
Bináris
I have been using " -exceptinsidetag:header" with replace.py. This was
added by Daniel Herding in response to a request by me:
On Mon, Jun 30, 2008 at 23:11, Daniel Herding <DHerding(a)gmx.de> wrote:
>
>
> This will exclude wikilinks and URLs. There are some more things that can
> be
> excluded, see the source code of the method replaceExcept() in wikipedia.py
> (look at the exceptionRegexes dictionary). I have just added a regular
> expression for section headers for you, so if you're running the SVN
> version,
> you can use this parameter:
>
> -exceptinsidetag:header
>
I seem to recall this working in a nightly version a couple of years ago,
but it's not working now - I'm not sure when it stopped. Is it possible to
put it back in?
Thanks!
--
Chris Watkins
Appropedia.org - Sharing knowledge to build rich, sustainable lives.
On Mon, Apr 25, 2011 at 7:49 AM, Merlijn van Deen <valhallasw(a)arctus.nl> wrote:
> Whoo! Great work :-) Tests always are good contributions :-)
Thanks ;-)
I agree.
> On a sidenote - is there a reason you're implementing these in 'trunk' and
> not in 'rewrite'? Of course, these contributions are very welcome in the
> trunk, but I still think it would be good to push the rewrite branch.
I'm working off trunk because it is trunk.
I'd assumed that the rewrite branch was a single-purpose branch to
rewrite something, and that it would be merged back when it is stable.
Is it stable?
Is there any documentation on what the plans are for the rewrite branch?
Is there a roadmap to finish it?
Is see now that the rewrite branch has more unit tests, but more are needed.
Is there a need to create a backwards compatibility layer?
Or, is everyone except me using the rewrite branch? ;-)
--
John Vandenberg
Hi bot people,
did anyone try creating command line autocompletion [1] for bot scripts? We are
setting up a sort of toolserver for the bot owners on Hungarian Wikipedia, and
trying to make it a comfortable environment, and parameter autocompletion would
be a big step towards that.
I'm interested both in quick and dirty hacks (my current plan is to grep out the
arg.startswith parameters from the bot code and use them as a more or less
correct argument list) and a long-term solution for making pywikipediabot
parameter handling and help generation easy both for the bot programmer and the
bot user. I'm thinking along the lines of defining a list of options, with a
couple field for each options: short name, long name(s), help text, whether it
takes an option (a bit like getopts in Linux, just with cleaner syntax). Some
helper function would then process the command line based on that, and the bot
programmer would just have to iterate trough the results, without all the ugly
string manipulation that is currently required. This would have several
advantages:
- easier parameter handling and help text autogeneration
- automatic generation of bash completion files
- it could pave the way for moving towards a more linux-like command syntax with
double dashes before long arguments and the other usual features
- it would make it possible to create GUI controls for the bots, with
auto-generated option fields
What do you think about it? Am I overcomplicating, or reinventing the wheel, or
is this worth doing?
[1] https://www.gnu.org/software/bash/manual/bashref.html#Programmable-Completi…
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello all!
I am updating (re-merging) DrTrigon framework with pywikipedia
framework. During this process I recognized 'ThreadedGenerator'
is not in pagegenerators.py anymore... Has it gone completely?
Is there any replacement?
Thanks and greetings
Dr. Trigon
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk7aKwkACgkQAXWvBxzBrDDw6QCdHNAM8kC0rJQR1gTMVMQSd8IF
5j8An32M6LgCBIAdEs3A9myic1t9C6UF
=1pbQ
-----END PGP SIGNATURE-----