Metadata-Version: 2.1
Name: treestamps
Version: 0.4.3
Summary: Create timestamp records for recursive operations on directory trees.
Home-page: https://github.com/ajslater/treestamps
License: GPL-3.0-only
Keywords: timestamps,library,recursive,directory
Author: AJ Slater
Author-email: aj@slater.net
Requires-Python: >=3.9,<4.0
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: ruamel.yaml (>=0.17.21,<0.18.0)
Requires-Dist: termcolor (>=2.0.1,<3.0.0)
Project-URL: Documentation, https://github.com/ajslater/treestamps
Project-URL: Issues, https://github.com/ajslater/treestamps/issues
Project-URL: Source, https://github.com/ajslater/treestamps
Description-Content-Type: text/markdown

# Treestamps

A library to set and retrieve timestamps to speed up operations
run recursively on directory trees.

Documentation is pretty poor. Read the code for now.

## Usage

Used in [picopt](https://github.com/ajsater/picopt) and
[nudebomb](https://github.com/ajsater/nudebomb). You can see how it's
used in those projects.

```python
    from treestamps import Copsestamps, CopsestampsConfig

    config = GrovestampsConfig(
        "MyProgramName",
        paths=["/foo", "/bar"],
        program_config={ "optionA": True, "optionB": False}
    )
    cs = Grovestamps(config)

    timestamp = cs["/foo"].get()
    cs["/foo"].set()

    cs["/foo"].dump()

    cs.dump()
```

## Breaking Changes from 0.3.x

### Renamed

Treestamps.dirpath() -> Treestamps.get_dir()
Treestamps.dir -> Treestamps.root_dir

### Made Private

Treestamps.prune_dict() -> Treestamps.\_prune_dict()
Treestamps.consume_all_child_timestamps() -> Treestamps.\_consume_all_child_timestamps()

### Added

Treestamps.add_consumed_path(), for legacy treestamps importers to remove old files.
Copsestamps() is the ubquitous dir of rootpaths to Treestamps.

### Changed

Grovestamps() and Treestamps() both require a GrovestampsConfig or TreestampsConfig
respectively as their sole param.

Treestamps now record the ignored and symlinks config options in the file and if they
change the file is not loaded.
This is optional with the `check_config` configuration option.

