mirror of
https://github.com/novoid/date2name.git
synced 2026-02-16 12:54:15 +00:00
79 lines
3.3 KiB
Org Mode
79 lines
3.3 KiB
Org Mode
|
|
* Handling time-stamps and date-stamps in file names
|
|
|
|
Per default, date2name gets the modification time of matching files
|
|
and directories and adds a datestamp in standard ISO 8601+ format
|
|
YYYY-MM-DD (http://datestamps.org/index.shtml) at the beginning of
|
|
the file- or directoryname.
|
|
|
|
If an existing timestamp is found, its style will be converted to the
|
|
selected ISO datestamp format but the numbers stays the same.
|
|
Executed with an examplefilename "file" this results e.g. in
|
|
"2008-12-31_file".
|
|
|
|
Note: Other that defined in ISO 8601+ the delimiter between hours,
|
|
minutes, and seconds is not a colon but a dot. Colons are causing
|
|
several problems on different file systems and are there fore replaced
|
|
with the (older) DIN 5008 version with dots.
|
|
|
|
: Usage:
|
|
: date2name [options] file ...
|
|
|
|
Run "date2name --help" for usage hints
|
|
|
|
: Options:
|
|
: -h, --help show this help message and exit
|
|
: -d, --directories modify only directory names
|
|
: -f, --files modify only file names
|
|
: -C, --compact use compact datestamp (YYYYMMDD)
|
|
: -M, --month use datestamp with year and month (YYYY-MM)
|
|
: -w, --withtime use datestamp including seconds (YYYY-MM-DDThh.mm.ss)
|
|
: -m, --mtime take modification time for datestamp [default]
|
|
: -c, --ctime take creation time for datestamp
|
|
: -q, --quiet do not output anything but just errors on console
|
|
: -v, --verbose enable verbose mode
|
|
: --nocorrections do not convert existing datestamps to new format
|
|
: -s, --dryrun enable dryrun mode: just simulate what would happen, do
|
|
: not modify files or directories
|
|
: --version display version and exit
|
|
|
|
* Installation
|
|
|
|
Get it from [[https://github.com/novoid/date2name][GitHub]] or install it via «pip install date2name».
|
|
|
|
* Related tools and workflows
|
|
|
|
This tool is part of a tool-set which I use to manage my digital files
|
|
such as photographs. My work-flows are described in [[http://karl-voit.at/managing-digital-photographs/][this blog posting]]
|
|
you might like to read.
|
|
|
|
In short:
|
|
|
|
For *tagging*, please refer to [[https://github.com/novoid/filetag][filetag]] and its documentation.
|
|
|
|
See [[https://github.com/novoid/date2name][date2name]] for easily adding ISO *time-stamps or date-stamps* to
|
|
files.
|
|
|
|
For *easily naming and tagging* files within file browsers that allow
|
|
integration of external tools, see [[https://github.com/novoid/appendfilename][appendfilename]] (once more) and
|
|
[[https://github.com/novoid/filetag][filetag]].
|
|
|
|
Moving to the archive folders is done using [[https://github.com/novoid/move2archive][move2archive]].
|
|
|
|
Having tagged photographs gives you many advantages. For example, I
|
|
automatically [[https://github.com/novoid/set_desktop_background_according_to_season][choose my *desktop background image* according to the
|
|
current season]].
|
|
|
|
Files containing an ISO time/date-stamp gets indexed by the
|
|
filename-module of [[https://github.com/novoid/Memacs][Memacs]].
|
|
|
|
* How to Thank Me
|
|
|
|
I'm glad you like my tools. If you want to support me:
|
|
|
|
- Send old-fashioned *postcard* per snailmail - I love personal feedback!
|
|
- see [[http://tinyurl.com/j6w8hyo][my address]]
|
|
- Send feature wishes or improvements as an issue on GitHub
|
|
- Create issues on GitHub for bugs
|
|
- Contribute merge requests for bug fixes
|
|
- Check out my other cool [[https://github.com/novoid][projects on GitHub]]
|