changeset 23:2ec82615c664

Add setup.py file.
author Lewin Bormann <lewin@lewin-bormann.info>
date Mon, 23 Sep 2019 12:51:45 +0200
parents 73c46c201c7c
children bf3b532931ba
files Pipfile.lock README.md setup.py
diffstat 3 files changed, 56 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/Pipfile.lock	Mon Sep 23 12:44:53 2019 +0200
+++ b/Pipfile.lock	Mon Sep 23 12:51:45 2019 +0200
@@ -60,11 +60,11 @@
         },
         "google-api-python-client": {
             "hashes": [
-                "sha256:2e55a5c7b56233c68945b6804c73e253445933f4d485d4e69e321b38772b9dd6",
-                "sha256:60f2ac2f27997d9af10ae126d9937b7d8c1fd061d12668ccaf94b4347ee85021"
+                "sha256:3121d55d106ef1a2756e8074239512055bd99eb44da417b3dd680f9a1385adec",
+                "sha256:a8a88174f66d92aed7ebbd73744c2c319b4b1ce828e565f9ec721352d2e2fb8c"
             ],
             "index": "pypi",
-            "version": "==1.7.10"
+            "version": "==1.7.11"
         },
         "google-auth": {
             "hashes": [
@@ -112,10 +112,10 @@
         },
         "pyasn1": {
             "hashes": [
-                "sha256:3bb81821d47b17146049e7574ab4bf1e315eb7aead30efe5d6a9ca422c9710be",
-                "sha256:b773d5c9196ffbc3a1e13bdf909d446cad80a039aa3340bcad72f395b76ebc86"
+                "sha256:62cdade8b5530f0b185e09855dd422bc05c0bbff6b72ff61381c09dac7befd8c",
+                "sha256:a9495356ca1d66ed197a0f72b41eb1823cf7ea8b5bd07191673e8147aecf8604"
             ],
-            "version": "==0.4.6"
+            "version": "==0.4.7"
         },
         "pyasn1-modules": {
             "hashes": [
--- a/README.md	Mon Sep 23 12:44:53 2019 +0200
+++ b/README.md	Mon Sep 23 12:51:45 2019 +0200
@@ -47,13 +47,38 @@
 
 1. Clone this repository to a convenient place: `git clone https://github.com/dermesser/photosync` or `hg clone
    git+https://github.com/dermesser/photosync`.
-1. Install `pipenv`: `pip3 install pipenv` if not yet installed.
-1. Go into the `photosync` repository and run `pipenv install` (make sure that `~/.local/bin/pipenv` is in your `PATH`)
-1. Activate the virtualenv: `pipenv shell` (sigh)
+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`
 
 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.
+in the repository. Typically you would initially run
+
+```
+$ python3 photosync.py --dir=/target/directory [--creds=/path/to/credentials/file]
+```
+
+which also asks you for OAuth credentials etc. After uploading photos (careful:
+Google Photos exposes new media only a few minutes up to half an hour after
+uploading!) you can run the following command, which looks for photos and videos
+that are either older than the oldest known item or newer than the newest known
+item (obviously missing any that have been uploaded with a date between the
+oldest and newest items -- see `--dates` below how to fix it):
+
+```
+$ python3 photosync.py --dir=/target/directory [--creds=...]
+```
+
+If it turns out you are missing some items locally, you can have Google Photos
+checked again for them:
+
+```
+# to check *all* photos available for January 2000:
+$ python3 photosync.py --dir=/target/directory --dates=2000-01-01:2000-02-01 [--creds=...]
+
+# to check *all* photos from *ever*:
+$ python3 photosync.py --dir=/target/directory --all [--creds=...]
+```
 
 ## Troubleshooting
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/setup.py	Mon Sep 23 12:51:45 2019 +0200
@@ -0,0 +1,21 @@
+from setuptools import setup
+
+setup(
+        name='photosync',
+        version='0.1',
+        description='Download and organize media from Google Photos',
+        url='https://github.com/dermesser/photosync',
+        author='Lewin Bormann <lbo@spheniscida.de>',
+        author_email='lbo@spheniscida.de',
+        license='MIT',
+        py_modules=['photosync'],
+        install_requires=[
+            'google-api-python-client',
+            'google-auth-httplib2',
+            'google-auth-oauthlib',
+            'python-dateutil',
+            'arguments',
+            'future',
+            'pyyaml',
+            'consoleprinter',
+        ])