Skip to main content

Curses Tree Style Path Picker

Project description

CURSES TREE STYLE PATH PICKER

A Curses based, tree style, path picker. For use as a terminal based file dialog.

img

INSTALLATION

pip install treepick

CLI USAGE

usage: treepick [-h] [-a] [-r] [path]

Select paths from a directory tree.

positional arguments:
  path            A valid path.

optional arguments:
  -h, --help      show this help message and exit
  -a, --hidden    Show all hidden paths too.
  -r, --relative  Output relative paths.

PYTHON USAGE

from treepick import pick

hidden = True

parent_path = '/path/to/directory'

my_list_of_paths = pick(parent_path, hidden)

my_amazing_function(my_list_of_paths)

KEYBINDINGS

KEY ACTION
UP, k Step up one line.
DOWN, j Step down one line.
K Jump to previous parent directory.
J Jump to next parent directory.
PGDN, f Jump down a page of lines.
PGUP, b Jump up a page of lines.
HOME, g Jump to first line.
END, G Jump to last line.
TAB, RET Toggle expansion/collapse of directory.
RIGHT, l Expand and step into directory.
LEFT, h Collapse directory.
SHIFT RIGHT, L Expand directory and child directories.
SHIFT LEFT, H Jump to parent directory and collapse all.
SPC Toggle picking of paths.
v Toggle picking of all currently expanded paths.
: Toggle picking based on entered globs.
p View all currently picked paths.
/ Search for string in currently expanded paths.
n Jump to next occurrence of search string.
N Jump to previous occurrence of search string.
. Toggle display of dotfiles.
s Display total size of path, recursively
S Display totol size of all currently expanded paths.
F5, r Reset marking and expansion.
F1, ? View all keybindings.
q, ESC Quit and display all marked paths.

TODO

  • Support window resizing.
  • Page for viewing all current picks
  • Fix permission exception handling in my du package.
  • Retain traversal position when toggling hidden directories.
  • Different colors for sizes.
  • Prompt to pick via entered globs.
  • Search for string and navigate results.

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

treepick-0.1.4.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

treepick-0.1.4-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file treepick-0.1.4.tar.gz.

File metadata

  • Download URL: treepick-0.1.4.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.7.0

File hashes

Hashes for treepick-0.1.4.tar.gz
Algorithm Hash digest
SHA256 b168e1f108d68a5e9c338744c6000a4858dce68ad46e6adc1c61da7ae023b71a
MD5 941637c7cd4f186e19e6198069369f0f
BLAKE2b-256 de10b5ad45a24a132b8e8a7ff0fab0b77ba52950eb973f0bdaf2dd4c64153cde

See more details on using hashes here.

File details

Details for the file treepick-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: treepick-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.7.0

File hashes

Hashes for treepick-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 017664c48fe814de7018f8912ebc790d0f65f3ef6650405b308842db4882dd46
MD5 de5c91f9dd8a1a3fff09c6c49a0cca6f
BLAKE2b-256 42049bb8fdb15ed706345394deefcd161e3e7bb50a8872a0caf4a7505aa9046b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page