changeset 25:59b608562a36

Make photosync pip-installable
author Lewin Bormann <lbo@spheniscida.de>
date Tue, 05 Nov 2019 18:22:32 +0100
parents bf3b532931ba
children 6e53be5c652e
files README.md photosync.py setup.py
diffstat 3 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/README.md	Fri Oct 11 23:46:46 2019 +0200
+++ b/README.md	Tue Nov 05 18:22:32 2019 +0100
@@ -49,7 +49,11 @@
    git+https://github.com/dermesser/photosync`.
 1. Go into the `photosync` repository and run `python3 setup.py install --user`. This
    installs dependencies needed by the program.
-1. Run it: `python3 photosync.py --help`
+  - Alternatively, run `pip3 install --user .`, make sure that `~/.local/bin` is
+  on your `PATH` (or whatever it takes on other operating systems than unix-like
+  ones), and use it as `photosync.py`.
+1. Run it: `python3 photosync.py --help` or, if you installed it with `pip`,
+   `photosync.py --help`.
 
 Consult the help text printed by the last command. Usually you will need to set `--dir` so that your photos don't end up
 in the repository. Typically you would initially run
--- a/photosync.py	Fri Oct 11 23:46:46 2019 +0200
+++ b/photosync.py	Tue Nov 05 18:22:32 2019 +0100
@@ -386,7 +386,7 @@
         Options:
             -h --help                   Show this screen
             -d --dir=<dir>              Root directory; where to download photos and store the database.
-            --all                       Synchronize metadata for *all* photos instead of just before the oldest/after the newest photo. Needed if you have uploaded photos somewhere in the middle. Consider using --dates instead.
+            -a --all                    Synchronize metadata for *all* photos instead of just before the oldest/after the newest photo. Needed if you have uploaded photos somewhere in the middle. Consider using --dates instead.
             --creds=clientsecret.json   Path to the client credentials JSON file. Defaults to
             --dates=<dates>             Similar to --all, but only consider photos in the given date range: yyyy-mm-dd:yyyy-mm-dd or day: yyyy-mm-dd.
             --query=<item id>           Query metadata for item and print on console.
--- a/setup.py	Fri Oct 11 23:46:46 2019 +0200
+++ b/setup.py	Tue Nov 05 18:22:32 2019 +0100
@@ -10,7 +10,7 @@
         author='Lewin Bormann <lbo@spheniscida.de>',
         author_email='lbo@spheniscida.de',
         license='MIT',
-        py_modules=['photosync'],
+        scripts=['photosync.py'],
         install_requires=[
             'google-api-python-client',
             'google-auth-httplib2',