Giter Club home page Giter Club logo

filetime_tools's Introduction

filetime_tools is a collection of programs for working with files and timestamps. It implements the following functionality:

  • Scan a file system and find all of the files
  • Maintain a database of scans with SQLite3
  • Rescan the file system and report changes
  • Change timestamps embedded in filenames from any recognized timestamp to ISO 8061 format (both batch and with a GUI)
  • Change the EXIF in JPEGs to be consistent with the timestamp in the file's name.
  • Change the name of a JPEG to be consistent with its EXIF timestamp

MySQL Configuration

By default, fchange.py will look to the default.ini file for MySQL authentication credentials. Please see the file default.ini.DIST for how to fill out this file with your MySQL credentials.

You can specify a different configuration file with the --config [path to configuration file] flag.

Available programs:

fchange.py - Scan a directory and report file system changes. fix_jpegs.py - Change filename or timestamps to take into account the time stored in the EXIF fix_timestamps.py - Seek out and rename MDY timestamps in filenames to be YYYY-MM-DD. Optional GUI with --gui

Use Cases

Renaming files so that their embedded timestamps are in ISO8601 format:

python3 fix_timestamps.py [--dry-run] [--gui] root1 [root2 ...]

Find duplicate files in DIR2 that are also in DIR1

python3 fchange.py --db mydb.db --create 
python3 fchange.py --db mydb.db --addroot DIR1
python3 fchange.py --db mydb.db --addroot DIR2
python3 fchange.py --db mydb.db --scan
python3 fchange.py --db mydb.db --reportdups

Scan DIR1 and print the SH1 codes of every file with SQLite3

python3 fchange.py --sqlite3db mydb.db --addroot DIR1 python3 fchange.py --sqlite3db mydb.db --dump

Scan DIR1 and DIR2 and delete files in DIR2 that are anywhere in DIR1 using sqlite3

python3 fchange.py --sqlite3db mydb.db --addroot DIR1 python3 fchange.py --sqlite3db mydb.db --addroot DIR2

Find all of the JPEGs in a directory hiearchy

python3 fchange.py --db images.db --create ~/Photos/         

Find empty directories

You can do this just with Unix command line tools:

find . -type d -empty -print

Delete empty directories

You can do this just with Unix command line tools:

find . -type d -empty -delete

filetime_tools's People

Contributors

simsong avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.