Skip to content

Instantly share code, notes, and snippets.

View waka-wa's full-sized avatar

waka____ waka-wa

View GitHub Profile
@waka-wa
waka-wa / create_symlinks_only.py
Created March 2, 2025 00:54
A minimal Python script that scans all subdirectories (except the "All" folder) in the current working directory and creates a unified "All" folder populated with symlinks to each file. It replicates the original folder structure within "All", offering a convenient aggregated view of files without moving them.
@waka-wa
waka-wa / picture_organizer.py
Created March 2, 2025 00:53
A Python script that organizes your photos by moving files from an "Unsorted" folder into year-based directories (using file creation/modification dates). It then updates a central "All" folder with symlinks to each file, providing an aggregated view. The script features interactive prompts for setting the year range and confirming symlink updat…
import os
import shutil
from datetime import datetime
from pathlib import Path
def get_file_year(file_path, min_year, max_year):
"""Determine a file's year based on creation or modification date."""
try:
ctime = os.path.getctime(file_path)
mtime = os.path.getmtime(file_path)