Skip to main content

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.

Metadata

Release files for treepick 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for treepick 0.1.4
File Size Uploaded
treepick-0.1.4.tar.gz 9.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for treepick 0.1.4
File Interpreter ABI Platform
treepick-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 20.6 kB

Release files / treepick-0.1.4.tar.gz

Download URL treepick-0.1.4.tar.gz
Size 9.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b168e1f108d68a5e9c338744c6000a4858dce68ad46e6adc1c61da7ae023b71a
BLAKE2b-256 checksum
How to use checksums
de10b5ad45a24a132b8e8a7ff0fab0b77ba52950eb973f0bdaf2dd4c64153cde
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / treepick-0.1.4-py3-none-any.whl

Download URL treepick-0.1.4-py3-none-any.whl
Size 11.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
017664c48fe814de7018f8912ebc790d0f65f3ef6650405b308842db4882dd46
BLAKE2b-256 checksum
How to use checksums
42049bb8fdb15ed706345394deefcd161e3e7bb50a8872a0caf4a7505aa9046b
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page