A tool to do batch uploading of Google web album (Picasa) to Commons using Pywikipedia and Google data API.
Thanks for your source.
Hm, gdata and pil aren't part of the pwb package (yet). Where could the bot owner get them?
You should use the pywikibot.showHelp() method to display the documtentation. List and docufy all given options.
If the usage/Help is shown the additional outputs about uploads should be omitted.
Overall, I like your code very much. I have two comments:
- You mix tabs and spaces for indentation. Please use spaces exclusively
- There are a lot of commented-out code blocks. Please either remove them or implement them
On xqt's question on the dependencies:
- PIL is only required if the Tk interface is used -> please move the import to the functions where it is required, so that the bot can also be used without it
- I think we should remove all dependencies (such as simplejson, but also some http library in the rewrite) and switch to a virtualenv / pip based system. I'm not sure how well that would work on windows, though...
Thanks for your updates. Please find here is the comments incorporated.
* Used spaces for indentation.
* Removed possible commented-out code blocks.
* Moved the PIL import to the functions where it is required.
* showHelp is used.
* Online user Manual is created at http://www.mediawiki.org/wiki/Manual:Pywikipediabot/picasacopi
Gdata API download is described in http://www.mediawiki.org/wiki/Manual:Pywikipediabot/picasacopier.py
Wait a second. I had not realized this before, but it's an almost 1-on-1 copy of flickrripper. Why have you copied the entire file instead of re-using functions?
+ it's not really acceptable to claim the code is yours when it is not.
In any case, most comments below are also valid for flickrripper:
* I'm not sure about using TK. What is wrong with starting a web browser with an URL? that also works for people who run pwb in a shell.
* The TK window is too large for on a netbook
* The script is hard-coded to use commons...
* The script gets the images twice!
This is not the exact copy of the Flickrripper.py. You can compare the code for the both. I have used the Flickrriper.py as template/reference or the steps involved. But the Google Data API and other tweaks which are not covered in Flickrriper is fully done by me. So nothing harm I say it is my code.
We use the different library and the procedure in Picasacopier.py, may be the file naming convention we can re-use. Not sure how to call flickrrriper.py functions as it is local to the script
Fyi, panromiaviewer also follows the same. is it any wrong we use the Creative Commons code and alter for our purpose and redistribute? Sure I will attribute the author name in my code
Basically, the code reuse has two issues. The first is a social/legal one: you should not copy other people's work without attributing them. As such, removing "# (C) Multichill, 2009, # (C) Pywikipedia team, 2009-2012" is simply not done.
Secondly, copying code makes maintenance much more difficult. If a bug is found in one function in flickrripper.py, someone will /also/ have to fix that in this script. Re-use, don't copy!
> Not sure how to call flickrrriper.py functions as it is local to the script
from flickrripper import Tkdialog, ...etc...
I have attributed the base template (Flickrripper.py) author name in this file. Please review.
As for the second one, we can't re-use the Flickrripper.py since the data API is different for Picasa. We need to have separate implementation for this Picasa upload. We follow only the approach/steps, otherwise the API, functions are different.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.