Change file timestamps with a dialog window.
Project description
Change files timestamp with a dialog window.
GUI automatically fallback to a text interface when display is not available.
Installation
Install with a single command from PyPi.
pip install touch-timestamp
Or eventually add eel to provide browser-like GUI window.
pip install touch-timestamp[eel]
Docs
Methods to set the date
When invoked with file paths, the program sets their modification times
- to the specified time
- to the date from the Exif through jhead
- to a relative time
Fetch the time from the file name
Should you end up with files that keep the date in the file name, use the --from-name
parameter.
$ touch-timestamp 20240828_160619.heic --from-name True
Changed 2001-01-01T12:00:00 → 2024-08-28T16:06:19: 20240828_160619.heic
Full help
Use the --help
to see full options.
$ touch-timestamp --help
usage: Touch [-h] [--eel | --no-eel] [--from-name {True,False}|STR]
[[PATH [PATH ...]]]
╭─ positional arguments ─────────────────────────────────────────────────────╮
│ [[PATH [PATH ...]]] │
│ Files the modification date is to be changed. (default: ) │
╰────────────────────────────────────────────────────────────────────────────╯
╭─ options ──────────────────────────────────────────────────────────────────╮
│ -h, --help │
│ show this help message and exit │
│ --eel, --no-eel │
│ Prefer Eel GUI. (Set the date as in a chromium browser.) │
│ Does not allow setting from EXIF and relative set. (default: False) │
│ --from-name {True,False}|STR │
│ Fetch the modification time from the file names stem. Set the format │
│ as for `datetime.strptime` like '%Y%m%d_%H%M%S'. │
│ If set to True, the format will be auto-detected. │
│ If a file name does not match the format or the format cannot be │
│ auto-detected, the file remains unchanged. │
│ │
│ │
│ Ex: `--from-name True 20240827_154252.heic` → modification time = │
│ 27.8.2024 15:42 (default: False) │
╰────────────────────────────────────────────────────────────────────────────╯
Krusader user action
To change the file timestamps easily from Krusader, import this user action: touch-timestamp %aList("Selected")%
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file touch_timestamp-0.3.4.tar.gz
.
File metadata
- Download URL: touch_timestamp-0.3.4.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5fcf67a4c5e7c943ebdbb8170dc64fc096856f57e3785911bd88e6cb247bca0b |
|
MD5 | 86b26c2ec7e431ec5d96119267b6a5ef |
|
BLAKE2b-256 | bf8255e0d754a7e05a6476dce4de6b79e931160b183d4eaf9b93cc5a5ee162b0 |
File details
Details for the file touch_timestamp-0.3.4-py3-none-any.whl
.
File metadata
- Download URL: touch_timestamp-0.3.4-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c717e1d752c2353113816c2609ff240844f6d5aaf2389436e88a520a9d4fbc01 |
|
MD5 | 067aecd137fae46e3732a653bdb811b9 |
|
BLAKE2b-256 | 77741b379a46d0716a1e622bccd4514444848f55f1d5c71b504280d94f172894 |