https://bugzilla.wikimedia.org/show_bug.cgi?id=54565
Web browser: --- Bug ID: 54565 Summary: Picasa copier upload script Product: Pywikibot Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: Unprioritized Component: General Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: legoktm.wikipedia@gmail.com Classification: Unclassified Mobile Platform: ---
Originally from: http://sourceforge.net/p/pywikipediabot/patches/548/ Reported by: yjenith Created on: 2012-05-02 05:23:23 Subject: Picasa copier upload script Original description: A tool to do batch uploading of Google web album (Picasa) to Commons using Pywikipedia and Google data API.
https://bugzilla.wikimedia.org/show_bug.cgi?id=54565
--- Comment #1 from Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com --- picasacopier.py, v1.0
https://bugzilla.wikimedia.org/show_bug.cgi?id=54565
--- Comment #2 from Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com --- picasacopier.py, v1.1
https://bugzilla.wikimedia.org/show_bug.cgi?id=54565
--- Comment #3 from Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com --- 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...
https://bugzilla.wikimedia.org/show_bug.cgi?id=54565
--- Comment #4 from Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com --- 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
https://bugzilla.wikimedia.org/show_bug.cgi?id=54565
--- Comment #5 from Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com --- 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!
https://bugzilla.wikimedia.org/show_bug.cgi?id=54565
--- Comment #6 from Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com --- 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...
https://bugzilla.wikimedia.org/show_bug.cgi?id=54565
--- Comment #7 from Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com --- 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
https://bugzilla.wikimedia.org/show_bug.cgi?id=54565
--- Comment #8 from Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com --- 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. Greetings
https://bugzilla.wikimedia.org/show_bug.cgi?id=54565
--- Comment #9 from Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com --- Gdata API download is described in http://www.mediawiki.org/wiki/Manual:Pywikipediabot/picasacopier.py
https://bugzilla.wikimedia.org/show_bug.cgi?id=54565
Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://sourceforge.net/p/p | |ywikipediabot/patches/548
https://bugzilla.wikimedia.org/show_bug.cgi?id=54565
Nemo federicoleva@tiscali.it changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |federicoleva@tiscali.it Summary|Picasa copier upload script |Picasa copier upload script | |similar to flickrripper.py
https://bugzilla.wikimedia.org/show_bug.cgi?id=54565
Nemo federicoleva@tiscali.it changed:
What |Removed |Added ---------------------------------------------------------------------------- Priority|Unprioritized |Normal Blocks| |37883
https://bugzilla.wikimedia.org/show_bug.cgi?id=54565
Merlijn van Deen valhallasw@arctus.nl changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
https://bugzilla.wikimedia.org/show_bug.cgi?id=54565
John Mark Vandenberg jayvdb@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jayvdb@gmail.com Component|General |Other scripts
pywikipedia-bugs@lists.wikimedia.org