bolthole
Project description
bolthole
Automatically backup changes to a directory to git.
Usage
bolthole
[--ignore GLOB [--ignore ...]] # autoignored: .git, .gitignore
[--author AUTHOR] [--message TEXT] # override your git config
[--grace SECONDS] [--bundle SECONDS] # allow for rapid edits to finish
[--remote NAME [--remote ...]] # push changes upstream
[--verbose] [--show-git] [--timeless]
[--watchdog-debug] # control verbosity
[--dry-run] # test it first
[--once] # no ongoing monitoring
source_dir # what to monitor
[dest_dir] # optionally copy to repo
Autocommit a directory
bolthole .
Assumes the directory is already git controlled, and will refuse to start if
not. It will commit any outstanding changes. If --once was used, it will
then stop, otherwise it will watch for changes until killed, committing them.
Autocommit to a different directory
bolthole project/ pristine-copy/
If pristine-copy doesn't exist, it will copy it and create a git repository
there, or it will check that if directory is already git controlled and will
refuse to start if not. It will commit any outstanding changes. If --once
was used, it will then stop, otherwise it will watch for changes until killed,
committing them.
Grace and bundling
The --grace SECONDS option will wait until the amount of time specified
has passed before committing the file, and will restart the timer after
each change. This way, if a file is being edited repeatedly in a short
span of time, the result would be only one commit, not many.
The --bundle SECONDS option allows for multiple file changes to be
bundled together in one commit rather than one commit per file, as long as
they all happened at roughly the same time. The bundle time is how
recently a file needs to have been changed in order to be excluded from the
bundle.
For example, with a grace period of five minutes, and a bundle window of one minute:
- at
t = 0m00s—foo.txtis edited, and a timer for it is set for 300 seconds - at
t = 0m30s—bar.txtis edited, and a timer for it is set for 300s (we now havefoo.txtat 270s,bar.txtat 300s) - at
t = 4m30s—baz.txtis edited, and a timer for it is set for 300s (we now havefoo.txtat 30s,bar.txtat 60s,baz.txtat 300s) - at
t = 5m00s— thefoo.txttimer goes off (we now havefoo.txtat 0s,bar.txtat 30s,baz.txtat 270s); the changes tofoo.txtandbar.txtwere both made earlier than the bundle window, and one commit is made with both changes - at
t = 9m30s—baz.txtis committed
Installation
Bolthole is installed from pypi:
pip install bolthole
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bolthole-1.0.tar.gz.
File metadata
- Download URL: bolthole-1.0.tar.gz
- Upload date:
- Size: 20.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40b8b7f1379e71465743aac6024d1bde35cede192235f0c12a9d46157ae98884
|
|
| MD5 |
a12f6aeaabbcc0c70845fab43a96a605
|
|
| BLAKE2b-256 |
ba4562e5514a37aaf17c686ac8fb35a8372e86bc6ed4f4011167179ce1792dce
|
Provenance
The following attestation bundles were made for bolthole-1.0.tar.gz:
Publisher:
publish.yml on norm/bolthole
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bolthole-1.0.tar.gz -
Subject digest:
40b8b7f1379e71465743aac6024d1bde35cede192235f0c12a9d46157ae98884 - Sigstore transparency entry: 834851446
- Sigstore integration time:
-
Permalink:
norm/bolthole@d019f04f80fa1c61c32cf17fd53348d5f9e332bc -
Branch / Tag:
refs/tags/v1.0 - Owner: https://github.com/norm
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d019f04f80fa1c61c32cf17fd53348d5f9e332bc -
Trigger Event:
push
-
Statement type:
File details
Details for the file bolthole-1.0-py3-none-any.whl.
File metadata
- Download URL: bolthole-1.0-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7a0a20619d7e181bc76a09533a4af5cf42c1ae57204b1ab2fc5a09923b171dc
|
|
| MD5 |
7f2738c385ca4e5e85e8e04cb26ba456
|
|
| BLAKE2b-256 |
553b91a1c95c4674de7fbe1c7e86957526bd54dcba9525755cc68495f3da8515
|
Provenance
The following attestation bundles were made for bolthole-1.0-py3-none-any.whl:
Publisher:
publish.yml on norm/bolthole
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bolthole-1.0-py3-none-any.whl -
Subject digest:
d7a0a20619d7e181bc76a09533a4af5cf42c1ae57204b1ab2fc5a09923b171dc - Sigstore transparency entry: 834851460
- Sigstore integration time:
-
Permalink:
norm/bolthole@d019f04f80fa1c61c32cf17fd53348d5f9e332bc -
Branch / Tag:
refs/tags/v1.0 - Owner: https://github.com/norm
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d019f04f80fa1c61c32cf17fd53348d5f9e332bc -
Trigger Event:
push
-
Statement type: