Commit Graph

435 Commits

Author SHA1 Message Date
Arian Maleki d8cee15f32 Optimize exiftool calls by adding an ExifTool singleton in pyexiftool library (#352)
This fix results in a 10x performance improvement [1] enabling a single exiftool subprocess to elimate spawing exiftool for each image.

Closes #350 #347 

[1] https://github.com/jmathai/elodie/issues/350#issuecomment-573412006
2020-01-13 23:04:33 -08:00
Michael Wong 75e65901a9 Add --exclude-regex parameter to exclude directories on import #340 (#342)
The `--exclude-regex` parameter and `[Exclusions]` config section lets you pass in a regular expression to match against file source file paths and ignore.
2019-10-27 20:19:51 -07:00
Jaisen Mathai 3ad6c0db35
Fix issue where photos without EXIF were not using the correct date for folder or file names #330 (#331)
Fixes #330

Fixes a bug in the code where media.set_original_name() would set the mtime of a photo and then use the newly set mtime for generating the folder and file name.
2019-07-29 23:51:10 -07:00
Jaisen Mathai 6a4c21fc57
Fix an exception that is raised when creating a media item in Google Photos fails #328 (#329)
Fixes #328

When creating a new media item for Google Photos fails it does not return newMediaItemResults in the body. The code checks for this but then returns the key which it verified does not exist.

This change returns the entire response body in its entirety.
2019-07-24 00:50:02 -07:00
Jaisen Mathai 87e0420fba
Make Pillow optional due to external dependencies (#326)
Fixes #325.

`Pillow` has a number of external dependencies needed for installation. Since most media files are detected correctly with `imghdr` and `Pillow` is used as a fallback we can make it optional.

`Pillow` support was added in #320 to fix #281.
2019-07-14 17:36:09 -07:00
Jaisen Mathai 50c6e3597f
Create and use a temporary folder as the application directory when running tests #323
Fixes #322
2019-07-12 21:31:53 -07:00
Jaisen Mathai 12c17c9cac Add a plugin to upload photos to Google Photos (#319)
Fixes #315.

This PR aims to address the [recent changes](https://www.blog.google/products/photos/simplifying-google-photos-and-google-drive/) in Google Photos + Google Drive where syncing between the two is no longer supported.

It works by uploading photos as part of the import process to add a copy of every photo in your library to Google Photos. Google Drive is not required for this plugin to work.

This plugin lets you have all your photos in Google Photos without relying on Google Drive. You can use another cloud storage service like iCloud or Dropbox or no cloud storage at all.

- [x] Add tests for `after()` plugin methods.
- [x] Add support for storage/async support.
- [x] Include plugins into code coverage.
- [x] Sweep code and clean up and add comments.
2019-07-12 01:44:57 -07:00
Jaisen Mathai 9e42edfa76
Create a test runner script in python to run unit tests (#321) 2019-07-11 01:51:34 -07:00
Jaisen Mathai 032e24b204 Use PIL(pillow) as a fallback mechanism image format identification and add HEIC support (#320)
Fixes #281 and #269

When elodie imports images, imghdr.what is used to determine the image
type. imghdr implementation won't support all JPEG variants. Because
of this, even for a valid JPEG file, imghdr.what returns None causing
elodie to skip the image during import.

This commit adds a fallback mechanism which uses PIL(pillow) library to
identify image formats. When imghdr fails, elodie uses pillow to
identify image format. When pillow is unavailable, it will be treated as
an invalid media file. Pillow is imported only when imghdr fails.
2019-07-10 04:05:32 -07:00
Jaisen Mathai 7c3ea1e1d7
Create an extendable plugin framework #315 #316 (#318)
This commit introduces the initial version of a plugin framework with tests and sample plugins. This helps address #315 and closes #316.
2019-07-04 02:57:10 -07:00
Andrew DeMaria 92605764f8 Add configuration to optionally capitalize file names (#313)
This commit adds a `capitalization` field under `[File]` in `config.ini` which allows file names to be capitalized.
2019-06-12 14:27:03 -07:00
Jaisen Mathai 23e3b45e15
Updated Readme to include link. 2019-04-03 20:57:48 -07:00
Jaisen Mathai 19be12b0bb
Make MapQuest parameters configurable #258 (#308) 2019-04-01 00:56:37 -07:00
Jaisen Mathai 7fc5b5ffe0
Make application directory where data files are stored configurable #6 (#307) 2019-03-31 22:10:38 -07:00
Jaisen Mathai 9ddb094ec7
Specify fully qualified path for exiftool program (#304) 2019-03-09 23:01:28 -08:00
Denis 283611a21e Implement unicode-safe print function as part of the log module (#298) 2019-02-12 21:23:52 -08:00
Matt Carey 2e2c103cfb Fix issue #252 to not modify original source files on import (#272) 2019-02-04 14:20:39 -08:00
Vladimir Kuptsov 086c26c198 Add support for mts video files with H264:DateTimeOriginal create date field support (#295) 2019-01-24 07:34:02 +05:30
Jaisen Mathai 5b07386e2c
Add support for customizing file name via config file. #107 #110 #111 (#225) 2019-01-23 01:06:48 +05:30
Denis e5af0dfb4e Implements prefer english names setting for MapQuest API in config.ini (#290)
Implements prefer english names setting in config.ini which adds English as accepted header to MapQuest requests and results in the response location names being mostly in English not their native country language
2019-01-21 20:27:38 -08:00
Jaisen Mathai 69937ca1a3
Add support for a %custom placeholder for more complex folder names than %location or %date provide #279 (#283) 2019-01-18 16:48:32 -08:00
Jaisen Mathai 91bf181575 Include path separator and absolute path when checking if destination is a child of the source. Fixes gh-287 2018-12-03 22:32:35 -08:00
Ben McCann 3f96e09126 Clarify setup of config.ini 2018-12-03 13:26:26 -08:00
Jaisen Mathai ffb26fb5ca Patch vulnerability reported in requests package < 2.20.
https://nvd.nist.gov/vuln/detail/CVE-2018-18074
2018-11-09 21:10:26 -08:00
Qasim K 716dbf67e6 Start using HTTPS MapQuest API (stop HTTP) (#280) 2018-09-03 10:19:03 -07:00
Jaisen Mathai ccd5ada7b2
Remove link to @getelodie on Twitter from Readme. 2018-06-05 01:19:19 +05:30
Jaisen Mathai 411678931d
Remove link to book. (#274) 2018-05-18 22:10:16 -07:00
Matt Carey 6bde29095c Modify generate-db command help (#268) 2018-03-02 00:24:18 -08:00
Jaisen Mathai aa12ffb13b
Fixes proper handling of location.json after failed test runs. #264 2018-02-09 00:01:10 -08:00
Jaisen Mathai 8950f756fe
Make reset_dbs() / restore_dbs() more robust #260 (#263)
* Make reset_dbs() / restore_dbs() more robust

If reset_dbs() is called and the test errors restore_dbs() is not called. On Windows this leads to an error the next time they're called because ~/hash.json-test and ~/location.json-test still exist.

* Add rename function to compatability module for 2.7 support
2017-12-06 15:46:00 -08:00
Jaisen Mathai 4cd91e9f2d
Add support for camera make and model in directory path #254 (#255) 2017-11-14 23:14:26 -08:00
Jaisen Mathai 362b1b1363
Add tests to reproduce error when source path has folder component of numbers #239 (#241) 2017-10-31 23:22:03 -07:00
Ruben Koster fd3cab4035 Fix tests on docker by installing exiftool #248 (#249)
* Install exiftool 10.20 (just like in .travis.yml)

* Configure locales fixes #248
2017-09-09 22:22:30 -07:00
Ove Stavnås f23894d426 fix problem when no geolocation key is provided and invalid dict is cached #214 (#233)
* fix problem when no geolocation key is provided #214
2017-09-07 16:59:16 -07:00
Peter Tiedemann c43570ffac Clarify config.ini usage (#243) 2017-08-27 22:53:24 -07:00
Adam Candy fbc7b04ef2 Fix bug so process_file will set access time on destination instead of source. Closes #237 (#238) 2017-08-06 14:29:34 -07:00
Ove Stavnås e5e811b215 Fix bug with fallback values in full_path variables in config.ini (#234)
* Add test for gh-234

* Force flush of cached configs in test
2017-08-06 14:26:28 -07:00
Jaisen Mathai 00ba7e2604 Add tests to verify unicode checkmark in file name is handled correctly. #226 (#227) 2017-07-11 21:11:51 -07:00
Jaisen Mathai 1535db5aa4 Temporarily disable tests for send2trash until new pip package is released #230. (#231)
See hsoft/send2trash/pull/11 for details
2017-07-11 21:04:28 -07:00
Jaisen Mathai 754897bafe Update Readme to include logo 2017-07-11 20:29:19 -07:00
Michael Manganiello dc95a14e5e Use bash as Docker's executable command (#222)
Change `sh` to `bash`, as `sh` is provided by `dash` in Debian, and it lacks
some features (like arrows movement) that makes it easier to use elodie from
the shell
2017-05-16 22:54:35 -07:00
Jaisen Mathai efd1a1ca13 Update docs to add headers and remove graphics (#220) 2017-05-12 23:59:53 -07:00
Jaisen Mathai 793f353bc3 Remove GUI instructions from Readme (temporary) #169 (#218) 2017-05-12 23:47:14 -07:00
Jaisen Mathai bb2b0496f7 Add --debug option for command line to override value in constants.py. #153 (#217) 2017-05-11 23:43:16 -07:00
Jaisen Mathai a6b805207b Fix documentation error for directory syntax in config.ini. #215 (#216) 2017-05-11 20:41:16 -07:00
Jaisen Mathai 8f9c7fc348 Fix docs to remove "kkkk" (thanks, vim) #212 (#213) 2017-04-13 00:09:16 -07:00
Jaisen Mathai 9be5ab13fc Skip copying file if source is identical to destination. #210 (#211)
This prevents a zero byte file from being written
2017-04-12 23:42:44 -07:00
Jaisen Mathai e3123872c4 Add fallback folder support when configuring folder hierarchy. #199 (#209)
* add test
2017-04-12 23:33:18 -07:00
Jaisen Mathai 6777c32588 Do not store "Unknown Location" in the location.json database. #203 (#208) 2017-04-08 02:10:55 +05:30
Jaisen Mathai 8082b739af Fix bug where code makes assumption of 2 levels of folders in the update command. #206 (#207) 2017-04-01 16:26:29 +05:30