Skip to main content

Change file timestamps with a dialog window.

Project description

License: GPL v3

Change file timestamps with a dialog window.

Gui window

GUI automatically fallback to a text interface when display is not available.

Text interface

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]

Browser interface

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

Gui window

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

touch_timestamp-0.3.3.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

touch_timestamp-0.3.3-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file touch_timestamp-0.3.3.tar.gz.

File metadata

  • Download URL: touch_timestamp-0.3.3.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

Hashes for touch_timestamp-0.3.3.tar.gz
Algorithm Hash digest
SHA256 e36618dc62aeaf7b2c8ff88eb2380fa2a5da95eae306e96613bb2ce18844b34a
MD5 accaa922d2a29f782796482ea60fa25d
BLAKE2b-256 1053badbc5a4b89e1133591d0ead0fb416552c4c36fc0d7e6a63387e732346ec

See more details on using hashes here.

File details

Details for the file touch_timestamp-0.3.3-py3-none-any.whl.

File metadata

File hashes

Hashes for touch_timestamp-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 166156848b54ce1ce6af630d0e6cbd900630d267d47d04da6db2e9f02b680232
MD5 6557f923127171f10e0ff1398e4ea67a
BLAKE2b-256 2dc14c0022bcbee19d63bb59719c8984277c04c144670bc81dd52f31de7e3872

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page