Skip to main content

Module dated

Module dated 

Source
Expand description

Uploading files into albums by the day they were taken: <root folder>/YYYY/MM/YYYY-MM-DD (with YYYY-MM-DD (2), … past SmugMug’s per-album limit). Used by upload without --album and by backup.

One run: scan (stat only) → skip files the index knows are unchanged → read the rest (hash, date, render RAWs) on a few blocking threads → upload, link or collect on several async workers.

Re-exports§

pub use run::RunOptions;
pub use run::RunStats;
pub use run::StopFlag;
pub use run::human_bytes;
pub use run::run;

Modules§

date
The day a photo or video was taken, which decides its album.
index
What each local path was last seen as and uploaded to, so an unchanged file (same size and modification time) is skipped without being read.
plan
Where a dated file goes: <root>/YYYY/MM/YYYY-MM-DD, each day an album series (2014-07-12, 2014-07-12 (2), …) so no album passes SmugMug’s limit. Year and month folders and day albums are created only when a file needs uploading into them, and each folder is listed at most once per run.
run
One pass of a dated upload (see crate::dated).
scan
Finding the files to upload: walking the sources without opening any file (just a stat each), so a re-run over a big, unchanged library costs a directory walk and nothing more.

Functions§

print_summary
Print what a run did (or, on a dry run, would do).
stop_on_signal
A stop flag set by Ctrl-C or SIGTERM (docker stop): the run finishes the files it has read and saves its state, so nothing is half done. A second Ctrl-C exits at once.