Automatically organize photo and camera uploads on your Filen.io drive.
Source template: szapp/filen-photo-organizer-template
Based on Github Action: szapp/filen-photo-organizer
Click the link above to set up the photo organizer for your own filen.io drive with minimal effort.
Head to the repository settings and navigate to the secrets and variables configuration, found in the section Security
in Secrets and variables
-> Actions
Create three repository secrets in the Secrets
tab.
FILEN_EMAIL
: Enter your filen.io account login emailFILEN_PASSWORD
: Enter your filen.io account login passwordFILEN_TFA
: Enter your filen.io account two-factor authentication secret, not the generated OTP. This is secret is only needed if you have TFA set up
ℹ️ Note Before submitting, make sure you are creating a secret (obscured) and not variable (plain text)!
Switch to the Variables
tab and create three repository variables.
ROOT_PATH
: Enter the desired path to the photo directory in your filen.io driveDIR_PATTERN
: Enter a date-time pattern for the directory names to sort the photos into. If empty, no directories will be created andFILE_PATTERN
must not be empty. Format, e.g.yyyy-MM
places photos taken in the March 2024 into the sub-directory2024-03
FILE_PATTERN
: Enter a date-time pattern for renaming the files based on date-taken. If empty, files will not be renamed andDIR_PATTERN
must not be empty. E.g.yyyy-MM-dd_HH.mm.ss
renames a JPG photo taken on March 4th, 2024 at 21:15:12 to2024-03-4_21.15.12.jpg
FALLBACK_TIME_ZONE
: Enter your local time zone as TZ/IANA identifier, e.g.Europe/Berlin
. This time zone will be used when no GPS metadata is found, to determine the local time a photo was taken. If omitted, defaults toEurope/Berlin
.
Once the variables and secrets are properly configured, the photo directory will be organized periodically.
The Github workflow runs in intervals of every second hour between 5:00 and 22:00 UTC daily. This time range coincides well with day time in Central and Western European countries. If you live outside of Europe, you might want to update these values. You can adjust the schedule in the file .github/workflows/organize.yml
.
The most frequent a scheduled GitHub workflow can run is every 5 minutes. However, with the monthly 2.000 computing minutes quota for free GitHub accounts and an estimated average run time of this workflow of 5 minutes at generous photographing, the proposed schedule here of every second hour during day time or less is highly recommended.
You can inspect the organization operations in the Actions
tab in your repository in the section Workflows
-> Organize photos
.
With the introduction of time-zone-aware time stamps, there are breaking changes in V2. Please update the time formats in DIR_PATTERN
and FILE_PATTERN
(if used) based on different date formatting. Additionally, a new GitHub variable was added to specify the user default time zone, see above.
When updating from V2 to V3, update twoFactorCode
into twoFactorSecret
in the workflow file.
For more information, visit the repository of the GitHub Action szapp/filen-photo-organizer.