Last modified: 2014-09-09 02:23:09 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T56565, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 54565 - Picasa copier upload script similar to flickrripper.py
Picasa copier upload script similar to flickrripper.py
Status: NEW
Product: Pywikibot
Classification: Unclassified
Other scripts (Other open bugs)
unspecified
All All
: Normal normal
: ---
Assigned To: Pywikipedia bugs
: patch
Depends on:
Blocks: commons
  Show dependency treegraph
 
Reported: 2013-09-24 22:33 UTC by Kunal Mehta (Legoktm)
Modified: 2014-09-09 02:23 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Kunal Mehta (Legoktm) 2013-09-24 22:33:07 UTC
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.
Comment 1 Kunal Mehta (Legoktm) 2013-09-24 22:33:09 UTC
picasacopier.py, v1.0
Comment 2 Kunal Mehta (Legoktm) 2013-09-24 22:33:11 UTC
picasacopier.py, v1.1
Comment 3 Kunal Mehta (Legoktm) 2013-09-24 22:33:13 UTC
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...
Comment 4 Kunal Mehta (Legoktm) 2013-09-24 22:33:14 UTC
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
Comment 5 Kunal Mehta (Legoktm) 2013-09-24 22:33:16 UTC
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\!
Comment 6 Kunal Mehta (Legoktm) 2013-09-24 22:33:18 UTC
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...
Comment 7 Kunal Mehta (Legoktm) 2013-09-24 22:33:20 UTC
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
Comment 8 Kunal Mehta (Legoktm) 2013-09-24 22:33:22 UTC
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
Comment 9 Kunal Mehta (Legoktm) 2013-09-24 22:33:24 UTC
Gdata API download is described in http://www.mediawiki.org/wiki/Manual:Pywikipediabot/picasacopier.py

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links