Giter Site home page Giter Site logo

loenus / synology-add-exif Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 7 KB

Automatically set exif data on uploaded media to synology NAS from android

License: BSD 3-Clause "New" or "Revised" License

Shell 100.00%
exiftool photos synology synology-nas user-defined-script script user-defined videos

synology-add-exif's Introduction

WHY

In some cases, when uploading photos directly from android smartphones to Synology NAS, some crucial exif data are missing. This is not a Synology problem, because basically social media erase not all but most of them. In fact, this workaround doesn't effect at all photos taken with the camera or screenshots, but only photos coming from whatsapp, instagram, telegram... which have not a real creation date info (in their exif data), except for their name.

WHAT IT DOES

It scans the specified folder for photos with this format name:

  • IMG/VID-YYYYMMDD-WAXXXX.ext
  • IMG_YYYYMMDD_HHmmSS-XXX.ext

If it finds matches, it inserts the 'Create Date' exif data to them, based on their name. Then it standardize their name with the format IMG/VID_YYYYMMDD.ext plus HHmmSS in the second match case, plus a counter at the end '-X.ext' if more then one media has the same name.

INSTALLATION

Prerequisite

  • Install Perl from Synology Package Center.
  • Install ExifTool in your Synology NAS. You have to enable SSH for this, then you can follow this official tutorial or this thread (be careful to use the last version of ExifTool and in the 3rd point remove only the Image-ExifTool-XX.XX.tar.gz. Point 6th to 8th are not mandatory but recommended.)

Installing the script

  1. First of all, download the script and the dir.txt. After you download it in your machine, modify the DIR variable and the EXIFTOOL_PATH accordingly. This means that if you have followed the 2nd tutorial, then EXIFTOOL_PATH=/usr/share/applications/ExifTool/exiftool and if you have planned to use it only in in one directory (/Photos for example) you can not use dir.txt and change directly in the shell script the DIR=/volumeX/homes/UserName/Photos/.

  2. If you use absolute paths like I did in the examples in the first point, you can place the script and the dir.txt wherever you want on your Synology NAS, but you have to put them in the same directory (if you use both, so if you have more then one directory in which you want to use the script).

  3. We are going to use the Scheduler Task. Open the Control Panel > Task Scheduler > Create > Scheduled Task > User-defined script. Give it a name, a time schedule, and in Run command (in Task Settings) write bash path/to/script

synology-add-exif's People

Contributors

loenus avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.