Page MenuHomePhabricator

Picasa copier upload script similar to flickrripper.py
Closed, ResolvedPublic

Description

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.


Version: unspecified
Severity: normal
See Also:
https://sourceforge.net/p/pywikipediabot/patches/548

Details

Reference
bz54565

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:11 AM
bzimport set Reference to bz54565.
bzimport added a subscriber: Unknown Object (????).

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...

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

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\!

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

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

TheDJ claimed this task.
TheDJ subscribed.

Looks like this was done, picase is now dead, so it the old pywikibot-compat it was running on.