From 00222ad7baf5435bd4c4e882cefc41d8672f66d1 Mon Sep 17 00:00:00 2001 From: Richard Quirk Date: Sat, 22 Mar 2014 15:19:23 +0100 Subject: [PATCH 1/5] Add requirements file for pip --- requirements.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..6378fa4 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +ExifRead==1.4.2 From 5576fa21911d40ec2e850e322c6f83fe3329adf3 Mon Sep 17 00:00:00 2001 From: Richard Quirk Date: Sat, 22 Mar 2014 16:09:48 +0100 Subject: [PATCH 2/5] Fix another exif to exifread change --- f2flickr/uploadr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/f2flickr/uploadr.py b/f2flickr/uploadr.py index e3f5f87..82989a8 100644 --- a/f2flickr/uploadr.py +++ b/f2flickr/uploadr.py @@ -404,7 +404,7 @@ def uploadImage( self, image ): if XPKEYWORDS in exiftags: printable = exiftags[XPKEYWORDS].printable if len(printable) > 4: - exifstring = exif.make_string(eval(printable)) + exifstring = exifread.make_string(eval(printable)) picTags += exifstring.replace(';', ' ') picTags = picTags.strip() From 23c4d51c5d7e98703f2c38e5d743248f52765875 Mon Sep 17 00:00:00 2001 From: Richard Quirk Date: Sat, 22 Mar 2014 16:10:46 +0100 Subject: [PATCH 3/5] travisci: install requirements --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 95fefad..3afa825 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,4 +2,5 @@ language: python python: - "2.7" - "2.6" +install: "pip install -r requirements.txt" script: nosetests From 45251a99a81886e996244b3bf2bdc9619f15ab7f Mon Sep 17 00:00:00 2001 From: Richard Quirk Date: Sat, 22 Mar 2014 16:11:02 +0100 Subject: [PATCH 4/5] Update the README with new instructions --- README.md | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 7611daa..1a05ddf 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,20 @@ So keep the database it creates in a safe place! ## INSTALLATION -The easiest way is to just make a local clone of the repository +The easiest way is to use [pip](http://www.pip-installer.org). + + pip install --user git+https://github.com/richq/folders2flickr.git + +This will create `~/.local/bin/folders2flickr` and install the library to the right place in `.local`. +The sample configuration file can be created like this: + + cp ~/.local/share/folders2flickr/uploadr.ini.sample ~/.uploadr.ini + sensible-editor ~/.uploadr.ini + # modify 'imagedir', etc. + +If you want to use a local clone of the repository then please be aware that +folders2flickr depends on the [python-exif](https://github.com/ianare/exif-py) +package. Once you have installed that package, create a clone of folders2flickr using git: git clone https://github.com/richq/folders2flickr.git @@ -34,19 +47,10 @@ Then you will need to configure the directories to use: sensible-editor uploadr.ini # modify at least 'imagedir' to point to the location of new images -I try to keep the master branch usable and for now there are no external -dependencies, so this should be fine. - -As an alternative, you can also use [pip](http://www.pip-installer.org). - - pip install --user git+https://github.com/richq/folders2flickr.git - -This will create `~/.local/bin/folders2flickr` and install the library to the right place in `.local`. -The sample configuration file can be created like this: - - cp ~/.local/share/folders2flickr/uploadr.ini.sample ~/.uploadr.ini - sensible-editor ~/.uploadr.ini - # modify 'imagedir', etc. +I try to keep the master branch usable, but there are point releases if you +prefer a stable fixed version. To install a release, download the zip file, +unpack it and away you go. The python-exif dependency will be included in these +zips. ## RUNTIME DATA FILES From d03d9249f6dbf0bbd588b6b593ddb9879e42b893 Mon Sep 17 00:00:00 2001 From: Richard Quirk Date: Sat, 22 Mar 2014 16:14:41 +0100 Subject: [PATCH 5/5] Add the script for batteries-included releases --- other/makezip.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 other/makezip.sh diff --git a/other/makezip.sh b/other/makezip.sh new file mode 100755 index 0000000..c34ea0d --- /dev/null +++ b/other/makezip.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +P=folders2flickr +V=$(git describe) +exifpymd5=fb99ecc1919494600aa6965ffb41dd60 + +tempdir=$(mktemp -d) +trap "rm -rf $tempdir" EXIT +outdir=$tempdir/$P-$V +exifpyversion=$(awk -F= '/ExifRead/ {print $3}' requirements.txt) +exifpy=${exifpyversion}.tar.gz +mkdir $outdir + +wget -q https://github.com/ianare/exif-py/archive/$exifpy -O $tempdir/$exifpy || exit 1 +echo "$exifpymd5 $tempdir/$exifpy" | md5sum -c - || exit 1 +tar -C $outdir -xf $tempdir/$exifpy exif-py-$exifpyversion/exifread/ --strip-components=1 +tar -C $outdir -xf $tempdir/$exifpy exif-py-$exifpyversion/LICENSE.txt +git archive --format=tar HEAD | tar -C $outdir -x + +here=$PWD +cd $tempdir +zip -r -o $here/$P-$V.zip $P-$V +cd - +rm -rf $tempdir