HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
andrewning
sortphotos
Perl2017–2020
andrewning / sortphotos

sortphotos

SortPhotos is a Python script that organizes photos and videos into folders using date/time information

3Distinct people
3Mentions
0Explicit recommenders
1.1KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

SortPhotos is a Python script that organizes photos and videos into folders using date/time information

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year3 dated mentions

Observed mentions: 2017-07-11 21:06:48 UTC to 2020-11-23 14:50:37 UTC.

0122017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20172018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2020

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC101
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC000
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC000
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC202

What Hacker News says

3 sources
One tool I use is this python script called Sort Photos. It will organize photos and videos into folders by date. It especially use full when you use multiple cameras. https://github.com/andrewning/sortphotos I call it from a batch file that will pull in photos from SD cards. I have a few cameras, and my phone will let me backup photos/video to an SD card. This will organize everything into a folder structure by year/month/day. python ./sortphotos.py "/Volumes/CANON_DC" "/volumes/Seagate_2019/Photos" -r --keep-duplicates --sort %Y/%b/%d-%b I have a few lines of these in the batch file, one for each SD card name. So I don't even have to think about the paths. I just put in the SD card and run the batch file to import.
In How I Spend My Attention
I ran into this problem when editing videos. I automated some repetitive tasks that make life easier. I have a scripts to move clips off of SD cards into a date sorted folder structure. I have three cameras and a phone, and usually want to get clips from the same date on different devices (SD cards) into one folder on my backup drive. There's also a problem when you film yourself, that lots of footage is wasted without action. Yesterday I recorded a video that was 10 minutes long, but only used the middle 2 minutes. So I used a script to chop up the video, then deleted the useless parts. I also use Typora (mark down editor) for planning and notes. Highly recommend it. If anyone is interested: https://typora.io/ https://github.com/andrewning/sortphotos https://github.com/c0decracker/video-splitter/blob/master/ff...
In Build tools around workflows, not workflows around tools
I have a library about 90GB in size currently, spanning about 12 years. I've played with all kinds of options, but I have a problem - I'm married to a luddite. My wife just doesn't get online storage and doesn't care about accessibility. She just wants to know where the most recent year's worth of photos are so that she can post to Facebook and create photo books. After toying with Dropbox, Amazon Photos, Google Photos and a host of others, what I ended up doing was connecting a 1TB drive to a Raspberry Pi, then setting up a Samba mount on the local LAN. There's a read/write "dropbox" folder where we can upload photos manually, and I have a Python script running out of cron that sorts everything into date-based folders (https://github.com/andrewning/sortphotos). The date-folders are read-only on the Samba share. I also have Dropbox config
Read the rest
ured on our mobile phones. Photos can be auto-uploaded to Dropbox, and I have CLI scripts that download them from there, and move them into the date-folders. The Python script de-dupes everything, and I move "duplicates" to an S3 folder where they're either purged after 30 days, or I'll review them to double check something wasn't ignored by mistake. Everything on the 1TB drive is synched to S3 weekly, and moved quickly to Glacier. I also have a secondary 1TB drive that I'll sync to the master on a monthly basis. So I don't get on-the-go access to my full photo archives, but I can move what I want to Amazon Photos if I really want something, and I've got enough redundancies to make me feel like I won't lose anything.
In Ask HN: How do you manage your photo library?

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.