Prepared pipenv virtual environment and added documentation.

This commit is contained in:
Marcus Scholz 2020-04-03 10:34:05 +02:00
parent 0ae188a0ec
commit b816d04215
3 changed files with 37 additions and 5 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@ testdata
testsource
testdest
__pycache__
Pipfile.lock

14
Pipfile Normal file
View File

@ -0,0 +1,14 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
pytz = "*"
gpxpy = "*"
py3exiv2 = "*"
[requires]
python_version = "3.7"

View File

@ -11,12 +11,29 @@ It can optionally read a gpx-file, compare the timestamps to 'DateTimeOriginal'
It then creates a `UserComment` with the actual measured radiation at the time the photo has been taken and writes the geocoordinates into the appropiate Exif tags.
## Dependencies
Right now it depends on the following non-core Python 3 libraries:
Right now it depends on the following non-core Python 3 libraries. These can be installed using the package manager of your distribution.
* [py3exiv2](https://pypi.org/project/py3exiv2/) A Python 3 binding for (lib)exiv2.
* [boost.python3](http://www.boost.org/libs/python/doc/index.html) Welcome to Boost.Python, a C++ library which enables seamless interoperability between C++ and the Python programming language.
* [exiv2](http://www.exiv2.org/) Exiv2 is a Cross-platform C++ library and a command line utility to manage image metadata.
* [gpxpy](https://github.com/tkrajina/gpxpy) gpx-py is a python GPX parser. GPX (GPS eXchange Format) is an XML based file format for GPS tracks.
* [pytz](https://pypi.org/project/pytz/) World timezone definitions, modern and historical.
* [gpxpy](https://pypi.org/project/gpxpy/) gpx-py is a python GPX parser. GPX (GPS eXchange Format) is an XML based file format for GPS tracks.
### Setting up a virtual environment using pipenv
If you prefer to use more updated versions of the dependencies or you do not want to use Python dependencies into your system, I prepared a pipenv virtual environment for you.
Using `pipenv install` all dependencies will be installed automatically. With `pipenv shell` you can source the venv.
For py3exivv2 to work / compile the following dependencies must be installed - preferably from your system's package manager:
* [exiv2](http://www.exiv2.org/) and it's development package. Exiv2 is a Cross-platform C++ library and a command line utility to manage image metadata.
* [boost](https://www.boost.org/) and it's development package. Boost provides free peer-reviewed portable C++ source libraries.
* [boost.python3](http://www.boost.org/libs/python/doc/index.html) and it's development package. A C++ library which enables seamless interoperability between C++ and the Python programming language.
#### Debian / Ubuntu
sudo apt install pipenv build-essential python-all-dev libexiv2-dev libboost-python-dev
#### Fedora
sudo dnf install pipenv exiv2-devel boost-devel boost-python3-devel make automake gcc gcc-c++
## Requirements
* A bunch of images (jpg, cr2, etc.) with its time of creation stored in `DateTimeOriginal`.
@ -127,7 +144,7 @@ Once imported, you can export the history into a hisdb.his-file, which is basica
## GPS setup
Especially if you use a mobile phone for GPS-logging. Take care, the app can use GPS when turned off, and let it write position sufficiently often. Threshold is 5 minutes by default, but precision will improve when logging more often. Especially "inactivity detection" might become a problem, when staying at one place for a period of time.
Especially if you use a mobile phone for GPS-logging, ensure the app can use GPS when the phone is locked. Let it write position sufficiently often. Threshold is 5 minutes by default, but precision will improve when logging more often. Especially "inactivity detection" might become a problem, when staying at one place for a period of time.
## future possibilities