
Show HN: A simple CLI app to organize photos by year/month locally - AlexITC
https://github.com/wiringbits/my-photo-timeline
======
richardhawthorn
I've been looking for something like this for a while to organise photos from
my phone, also without success. I hold all my photos locally and then securely
sync them to a remote NAS.

My photo album folder naming structure is slightly different from this, but
this will still speed up sorting photos.

~~~
AlexITC
What naming structure are you looking for?

The biggest problem I have found is that there are so many metadata tags, with
many different formats, which complicates taking the dates accurately.

I'd say the pain is the manual work that you need to do to organize the photos
without recognized or proper metadata, but still, it's less painful than
organizing everything manually.

~~~
BorisMelnik
I have the same problem. I personally just chunk all my photos into albums
like this

... 2019q4 2020q1 2020q2 2020q3 2020q4

it is too hard with 10+ years of photos to maintain all that metadata when
many of them are from different operating systems / file systems so some times
"sort by date" doesn't work.

~~~
AlexITC
Such album format is actually quite similar to what the app does, its trivial
to add an option to allow that.

Another problem I have with metadata (usually while dealing with times), its
that some cameras include the timezone, which the app isn't parsing right now,
but that means that a photo can get in a previous/next month.

> some times "sort by date" doesn't work

Actually, I forget to mention in the README that the app sets the last
modified time to match the metadata date, so that sorting potentially works
again.

------
bradknowles
How does this compare to PhotoStructure[0]?

[0]: [https://photostructure.com/about/introducing-
photostructure/](https://photostructure.com/about/introducing-photostructure/)

~~~
AlexITC
My app is a quite smaller subset of what PhotoStructure seems to provide.

Unfortunately, I can't try it, but I believe that it can certainly replace my
app, and I wouldn't have built it if PhotoStructure works as it promises.

In fact, my first idea was to build an app like that, with a nice UI, but it's
simply too much effort, and I didn't had the required amount, I just needed
something that worked for my use case to actually get my photo album.

The main difference right now is that you can use my app, and I don't know
when PhotoStructure will be available, but I already signed up to the beta
list.

Thanks for sharing.

~~~
mceachen
Why can't you try it? You're certainly welcome to!

Beta users get installation instructions emailed to them automatically as soon
as they sign up. If you didn't receive that email, email me at
hello@photostructure.com or send me a chat on the website, and I'll send you
the link.

~~~
AlexITC
Apparently signing up was enough to get the download link (which I wasn't
expecting), I'll try it later, and let you know.

Thanks.

------
AlexITC
Hi everybody, this is a command-line app that I created while working with my
wife on filling a family album, where we needed to choose pictures per
month/year, unfortunately, I wasn't able to find any software doing this while
holding my photos out of the cloud, and ended up writing it.

It's pretty simple right now, it takes a source directory, and processes the
photos by taking the creation date from its metadata, producing an output
directory where each photo is inside a specific directory for its year/month,
like 2020/02-february/photo-1.img.

It was build to fulfill my needs, and hopefully, it can be useful for others.

At last, this is was my proof that creating cli apps in Scala is now feasible.

Thanks!

EDIT: Apparently, I'm a guy still in the caverns because most of my friends
seem to prefer to use Google Photos/iCloud/etc, while I prefer to still keep
some privacy, what a time to live it.

------
runariot
Exiftool does it for years

~~~
AlexITC
Really? can you give an example on how to do it?

~~~
runariot
[https://exiftool.org/filename.html](https://exiftool.org/filename.html) Check
2nd and 6th sample...

exiftool -d %Y-%m-%d "-directory<datetimeoriginal" image.jpg Move 'image.jpg'
into a directory with a name given by DateTimeOriginal, in the form
'2006-03-27'.

exiftool -r -d %Y/%m/%d/image_%H%M%S.%%e "-filename<filemodifydate" DIR

Recursively rename all images in 'DIR' and any contained subdirectories to the
form 'image_HHMMSS.EXT' (where 'ext' is the original file extension), and move
them into a new directory hierarchy based on date of file modification, with
path names like '2006/03/27/image_105859.jpg'.

~~~
runariot
here is a command i always use after moving photos from camera

exiftool -r -d %Y/%m/%m_%d/%Y%m%d_%H%M%S%%c.%%e "-filename<CreateDate"
..\2sort\raw

~~~
AlexITC
While it doesn't do exactly the same, it is in fact, a pretty interesting
solution.

I believe it should be good enough if you keep the habit to run such command
each time you grab photos from your devices.

Thanks for sharing.

