scubajeff / lespas

Les Pas, photo album app for Nextcloud user
Apache License 2.0
454 stars 22 forks source link

Improvements to digiimport.py #94

Open andreas1107 opened 1 year ago

andreas1107 commented 1 year ago

Hi, I couldn't find a way to open a ticket for the digiimport script here: https://gitlab.com/steviehs/stevemisc

The script works excellently for images with exif information, however it didn't work for me for Signal images (which has no exif information). The regex rules for the Signal images also need to be more complex as the Signal app saves images in various formats.

I did a 2.3 gb Signal export (3k images) and re-wrote the script to suit my needs. Main changes:

  1. Regex rules updated to suit the various versions of "signal-" filenames in my export
  2. Removal of exif check (this slows the script down immensely)
  3. Output format somewhat changed to accommodate Signal filenames

If anyone wishes to optimise the script more that would be great, I didn't know any regex or python before I did this, most likely it is not done in an optimal way. That said, it I used it for my 3k Signal images in various formats, so works OK.

I hope this can be useful to others as well

Andreas

edit: added v2 as I had the same problem with WhatsApp images

v1: digiimport-NoExif.zip

v2: digiimport-NoExif.zip

scubajeff commented 1 year ago

@steviehs, what do you think?

steviehs commented 1 year ago

I will have a look at it the next days. I have worked on digiimport.py anyway and improved it already to go into pip and also to have some clearer command line switches. I will put it on gitlab in a separate repo, so @andreasmjg hopefully you can pull a change request there - or I will try to incorporate your changes. Checking for exif/whatsapp/signal should as far as I see be always enabled, but perhaps be switchable from command line.

steviehs commented 1 year ago

So, I have reworked digipics and put it on a dedicated gitlab project: https://gitlab.com/steviehs/digipics digipics is now also a python package (pip install digipics) https://pypi.org/project/digipics/

@andreasmjg it would be great, if you could branch, add your improvements and create a merge request. If you have any questions, we could discuss that in the projects issues.

@scubajeff I guess changing the readme to reflect the location changes would be great...

Thx Steve

scubajeff commented 1 year ago

@steviehs readme updated.

andreas1107 commented 1 year ago

Thanks! I'll have a look when I get a moment