Code Monkey home page Code Monkey logo

ftreetrawl's Introduction

ftreetrawl

ftreetrawl is a Python command-line tool that recursively processes all files in a specified directory. For each file, it generates a SHA1 hash of the file's contents and its modification time, and stores this hash in a cache file. The tool uses the .ftt-hash-sha1 extension for cache files.

In addition to generating cache files, ftreetrawl also calculates a global hash by concatenating all individual file hashes and computing the SHA1 hash of the result.

The tool also includes a cleanup feature that removes orphaned cache files. If a file has been removed from the directory but its corresponding cache file still exists, ftreetrawl will remove the orphaned cache file.

Usage

Run ftreetrawl with the directory to process as a command-line argument:

python ftreetrawl.py <directory>

You can also disable caching with the --no-cache option:

python ftreetrawl.py --no-cache <directory> 

Also there's a --threads option to specify the number of threads to use for processing files:

python ftreetrawl.py --threads <number> <directory>

By default, ftreetrawl uses as much threads as the number of CPU cores available.

Install

You can run ftreetrawl by cloning the repository and running the script directly with Python 3.x or you can use binary executables provided in the releases section.

Final Remarks

The concept of ftreetrawl is inspired by dtreetrawlby. However, ftreetrawl is designed to be simpler and more efficient, making it ideal for frequently generating SHA hashes for an entire directory.

License

ftreetrawl is available under the MIT License. See LICENSE for more details.

ftreetrawl's People

Contributors

dooshek 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.