diff options
author | Gunnar Wrobel <wrobel@gentoo.org> | 2005-11-14 19:08:58 +0000 |
---|---|---|
committer | Gunnar Wrobel <wrobel@gentoo.org> | 2005-11-14 19:08:58 +0000 |
commit | 50335a562da1475531f8b2bf6fbdc492c543a650 (patch) | |
tree | d43ec780569cc5a54c1307f32bd3f838a5b910cf /net-fs/flickrfs | |
parent | Fixed digests (diff) | |
download | overlay-50335a562da1475531f8b2bf6fbdc492c543a650.tar.gz overlay-50335a562da1475531f8b2bf6fbdc492c543a650.tar.bz2 overlay-50335a562da1475531f8b2bf6fbdc492c543a650.zip |
Added flickrfs
svn path=/; revision=516
Diffstat (limited to 'net-fs/flickrfs')
-rw-r--r-- | net-fs/flickrfs/files/flickrfs-1.1.patch | 98 | ||||
-rw-r--r-- | net-fs/flickrfs/flickrfs-1.1.ebuild | 40 |
2 files changed, 138 insertions, 0 deletions
diff --git a/net-fs/flickrfs/files/flickrfs-1.1.patch b/net-fs/flickrfs/files/flickrfs-1.1.patch new file mode 100644 index 0000000..8eaafd2 --- /dev/null +++ b/net-fs/flickrfs/files/flickrfs-1.1.patch @@ -0,0 +1,98 @@ +diff -Naur flickrfs-1.1/flickrapi.py flickrfs-1.1-mod/flickrapi.py +--- flickrfs-1.1/flickrapi.py 2005-11-08 15:21:57.000000000 +0100 ++++ flickrfs-1.1-mod/flickrapi.py 2005-11-14 19:47:37.000000000 +0100 +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!python + # + # Flickr API implementation + # +diff -Naur flickrfs-1.1/flickrfs.conf flickrfs-1.1-mod/flickrfs.conf +--- flickrfs-1.1/flickrfs.conf 1970-01-01 01:00:00.000000000 +0100 ++++ flickrfs-1.1-mod/flickrfs.conf 2005-11-14 20:03:15.000000000 +0100 +@@ -0,0 +1,13 @@ ++[USER] ++ ++# API key ++ ++flickrAPIKey : "f8aa9917a9ae5e44a87cae657924f42d" ++ ++# shared "secret" ++ ++flickrSecret : "3fbf7144be7eca28" ++ ++# for out-of-band auth inside a web browser ++ ++browserName : "/usr/bin/firefox" +diff -Naur flickrfs-1.1/flickrfs.py flickrfs-1.1-mod/flickrfs.py +--- flickrfs-1.1/flickrfs.py 2005-11-08 22:01:39.000000000 +0100 ++++ flickrfs-1.1-mod/flickrfs.py 2005-11-14 19:47:10.000000000 +0100 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!python + #@+leo-ver=4 + #@+node:@file flickrfs.py + # v0.9 - Initial release +@@ -48,11 +48,25 @@ + #Import flickr python api + from flickrapi import FlickrAPI + ++# Import ConfigParser ++from ConfigParser import ConfigParser + # flickr auth information + flickrAPIKey = "f8aa9917a9ae5e44a87cae657924f42d" # API key + flickrSecret = "3fbf7144be7eca28" # shared "secret" + browserName = "/usr/bin/firefox" # for out-of-band auth inside a web browser + ++def read_config(config_file = '/etc/flickerfs/flickerfs.conf'): ++ defaults = { ++ 'flickrAPIKey' : "f8aa9917a9ae5e44a87cae657924f42d", # API key ++ 'flickrSecret' : "3fbf7144be7eca28", # shared "secret" ++ 'browserName' : "/usr/bin/firefox",} # for out-of-band auth inside a web browser ++ ++ config = ConfigParser(defaults) ++ ++ if os.access(config_file, os.R_OK): ++ config.read(config_file) ++ ++ return config + + class TransFlickr: #Transactions with flickr + def uploadfile(self, filepath, taglist, bufData, mode): +@@ -700,6 +714,12 @@ + + #@+node:mainline + if __name__ == '__main__': ++ ++ config = read_config() ++ flickrAPIKey = self.config.get('USER', 'flickrAPIKey') ++ flickrSecret = self.config.get('USER', 'flickrSecret') ++ browserName = self.config.get('USER', 'browserName') ++ + try: + server = Flickrfs() + server.multithreaded = 1; +diff -Naur flickrfs-1.1/setup.py flickrfs-1.1-mod/setup.py +--- flickrfs-1.1/setup.py 1970-01-01 01:00:00.000000000 +0100 ++++ flickrfs-1.1-mod/setup.py 2005-11-14 20:06:39.000000000 +0100 +@@ -0,0 +1,20 @@ ++#!/usr/bin/env python ++ ++import sys ++ ++from distutils.core import setup ++ ++# this affects the names of all the directories we do stuff with ++sys.path.insert(0, './') ++ ++setup(name = 'flickrfs', ++ version = 1.1, ++ description = 'A virtual filesystem that provides easy access to flickr', ++ author = 'Manish Rai Jain', ++ author_email = 'manishrjain@gmail.com', ++ url = 'http://flickrfs.sourceforge.net/', ++ py_modules = ['flickrapi'] ++ scripts = ['flickrfs'], ++ data_files = [('/etc/flickrfs', ['flickrfs.conf'])] ++ license = 'GPL', ++ ) diff --git a/net-fs/flickrfs/flickrfs-1.1.ebuild b/net-fs/flickrfs/flickrfs-1.1.ebuild new file mode 100644 index 0000000..1250185 --- /dev/null +++ b/net-fs/flickrfs/flickrfs-1.1.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit distutils eutils + +DESCRIPTION="Flickrfs is a virtual filesystem based upon FUSE that provides easy access to flickr." +HOMEPAGE="http://flickrfs.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${PN}-v${PV}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +IUSE="" + +KEYWORDS="~x86" + +RDEPEND=" + =dev-lang/python-2.4* + dev-python/python-fuse" +DEPEND="${RDEPEND}" + +S="${WORKDIR}/${P}" + +src_unpack() { + unpack ${A} && cd ${S} + + epatch ${FILESDIR}/${P}.patch + + mv flickrfs.py flickrfs +} + +src_compile() { + distutils_src_compile +} + +src_install() { + distutils_src_install + + dodoc README test.py +} |