flickrannex
Hook program for gitannex to use flickr as backend
Requirements:
python2
Credit for the flickr api interface goes to: http://stuvel.eu/flickrapi Credit for the png library goes to: https://github.com/drj11/pypng Credit for the png tEXt patch goes to: https://code.google.com/p/pypng/issues/detail?id=65
Install
Clone the git repository in your home folder.
git clone git://github.com/TobiasTheViking/flickrannex.git
This should make a ~/flickrannex folder
Setup
Make the file executable, and link it into PATH
cd ~/flickrannex; chmod +x git-annex-remote-flickr; sudo ln -sf `pwd`/git-annex-remote-flickr /usr/local/bin/git-annex-remote-flickr
Commands for gitannex:
USERNAME="username@provider.com" git annex initremote flickr type=external externaltype=flickr encryption=shared folder=gitannex
An oauth authentication link should now be launched in the default browser. The hook will wait for 30s for you to login and authenticate.
git annex describe dropbox "the flickr library"
Notes
Unencrypted mode
The photo name on flickr is currently the GPGHMACSHA1 version.
Encrypted mode
The current version base64 encodes all the data, which results in ~35% larger filesize.
Including directories as tags
This feature is currently disabled, if it gets implemented again it will most likely not require user action to enable it.
In this case the image: /home/me/annex-photos/holidays/2013/Greenland/img001.jpg would get the following tags: "holidays" "2013" "Greenland" (assuming "/home/me/annex-photos" is the top level in the annex...)
Caveat Emptor - Tags will always be NULL for indirect repos - we don't (easily) know the human-readable file name.
https://github.com/TobiasTheViking/flickrannex/issues/3
9 days ago: [the annex] "hook format a few versions ago, and this is using the new hook format".
Looks very handy. I am just starting with this, but can't seem to get it working as a remote after following the simple walkthrough. All goes well until:
my Ubuntu 12.04:
I guess my "git-annex version is still too old"? Any idea what version is needed? Even better if I can figure out which Linux distribution/release has the most up to date version of annex.
Get the statically linked version from here http://git-annex.branchable.com/install/Linux_standalone/
I believe the new hook format was introduced in version 4.20130521
Many thanks.
I used gitannex-install and was left with a slight anomaly:
But I guess this includes the new hook format. I get a bit further:
The path for the binary "/usr/bin/python2" is wrong.
It could be any of /usr/bin/python /usr/bin/python2.6 /usr/bin/python2.7
Or maybe in /usr/local/bin
you can try running "which python" or "which python2" to get the real path.
Thanks, but on my machine I get:
I have scripted all my walkthrough commands, blowing away the test repositories and flickr settings first each time. This re-runs the flickr scripts and git config annex.flickr-hook etc.
I can't spot anything here.
That's weird...
You could try adding "--dbglevel 1 --stderr" arguments to the hook command and give me the output. But the way i read the log it seems like it doesn't even launch the python intrepreter. I might be wrong though.
Thanks and sorry to trouble you, it is my error, I picked unencrypted option (thinking it would be less of an issue) and am using a text file for test, gave an error line:
I've not looked through your code yet, but could that message be printed when not in debug mode?
Hi! Does this backend support chunksize option? If yes, is it possible to set it after the remote has been added to the repository? Thanks, Milan.
I'm not even sure if chunksize is exposed to the hooks at all.
As it is, the hook will check the filesize, and if the filesize is more than 30mbyte it will exit 1.
Chunking may be implemented down the road. I do believe joeyh might have some plans that will touch this issue, so I'd rather wait. Than re-invent the wheel yet again.
Hi, I am coming back to this and testing Flickr as a repository for moving files about and have run into what may be my very basic misunderstanding with vanilla annex.
I copied one file to Flickr and dropped it elsewhere (--force). I assumed that the file was on Flickr ok but that the numcopies setting required the force because of the semi-trust level of the Flickr remote.
Then I find I can't get the file back, even though there is a record of it from whereis.
Can you help enlighten me as to what am I missing? I assumed whereis would only report files that exist and can be copied back. If not my error, I can raise bug or search for logs. Thanks in advance for any help.
Another try - this time a slightly simpler setup using my version of the walkthrough commands
Since the initial release of this hook a lot of issues have been fixed, and a few features added.
I would highly suggest that everyone who is using this hook update to the latest version as i would consider one of the bugs to be fairly major.
it's pretty awesome to have 1TB of free storage like that out there... but for storing photos, it could be improved - I filed a few bugs on the github repo here:
https://github.com/TobiasTheViking/flickrannex/issues/created_by/anarcat?state=open
thanks!
Hi, just wondering what the current status of this plugin is. The repo at TobiasTheViking looks a little odd - it has a few large commits from January with an unknown author, and the last one appears to completely remove the main script.
What's going on? does it need a fork?
I'm using pipsi to install packages without polluting the system, Michael's fork from magthe's fork from TobiasTheViking repo (I don't know if the other branches are better or worse, but this is working).
Instructions
First thing: go to https://www.flickr.com/services/apps/create/noncommercial/? and create an app (if you use the keys provided in the flickrannex repository you'll be giving access to your flickr to everybody).
Now follow the steps:
Q1: No commit on https://github.com/TobiasTheViking/flickrannex/commits/master since Jan 13, 2014. Is it still working?
Q2: I'm not sure I get it correctly. Is it to use Flickr photo storage so that you can store git-annex content that is actually photos to visible Flickr collections (on web site) and vice versa (a nice white-hat hack)? Or is it just a cuckoo's hack to stuff arbitrary data on Flickr's servers without any content (a grey-zone hack)?