a commandline utility to create file backups
Project description
mkbak.py
mkbak
is a commandline utility to painlessly create file backups.
It interfaces with fzf
as a menu for file selection, allowing you to
interactively choose which files to back up.
Installation
With Pip
pip install --user -U mkbak
Building from source
- Download the repository:
git clone https://github.com/sudo-julia/mkbak
- Enter the repo
cd mkbak
- Build the package
python3 setup.py sdist bdist_wheel
- Install from the local build
pip install --user -U .
Usage
- Run
mkbak [options]
to start searching for files to backup from your current directory
Arguments
-h|--help
display all options--version
print version information-d, --delete
iterate through '.bak' files to delete- please note that this search can take a while, as it's only returning '.bak' files
-q [QUERY], --query [QUERY]
start the finder with the given query-a, --all
show hidden and 'dot' files-e, --exact
exact matching--height [HEIGHT]
display fzf window with the given height- Please note that the
--height
argument will be overridden if set to '100' and the environment variable$FZF_DEFAULT_OPTS
contains--height
set to something other than '100'
- Please note that the
-i, --ignore_case
ignore case distinction--no_mouse
disable mouse interaction--no_recursion
run mkbak without recursing through subdirectories-p [PATH], --path [PATH]
directory to iterate through (default '.')--preview [PREVIEW]
starts external process with current line as arg--print_query
print query as the first line--prompt [PROMPT]
input prompt (default: '> ')-v, --verbose
explain what is being done
Example
mkbak -vi --path "$folder" -q 'pdf$'
will launch mkbak searching$folder
, query files ending in 'pdf', ignore case distinctions in file names and print out any errors along with files successfully copied
Requirements
- mkbak-iterfzf for the fzf interface
- rich for text formatting
- Python^3.7
- Linux
Changelog
See CHANGELOG.md
Bugs
Open an issue or PR
ToDo
- Package for pypi
- Define entry point so the program can be run as
mkbak
- Add all options to README
- Shell completions
Credits
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mkbak-1.1.2.tar.gz
(6.2 kB
view details)
Built Distribution
mkbak-1.1.2-py3-none-any.whl
(18.3 kB
view details)
File details
Details for the file mkbak-1.1.2.tar.gz
.
File metadata
- Download URL: mkbak-1.1.2.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 862ee7384797fd926aa3d8d49605bcf44c65160136c2926648f7be6c2dea1a98 |
|
MD5 | 7042bcf7ce31942ce854faa52bf5e22c |
|
BLAKE2b-256 | 5bf2007a43d78ca0df4e447f3300abdbe60efc8d35e17da3e9a6a5d2dce1ce00 |
File details
Details for the file mkbak-1.1.2-py3-none-any.whl
.
File metadata
- Download URL: mkbak-1.1.2-py3-none-any.whl
- Upload date:
- Size: 18.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83e8d56dbe1d69f235d6c31f1c982083ac92c889491481863caef48fe03ef5f5 |
|
MD5 | f74ef3df5a4f95eaf6bcf7b3107538a7 |
|
BLAKE2b-256 | e18e836f4b9bf6238b07c15b852575dfa3c2f74e76a1c6837d0bb15695f89b3c |