Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

treepick

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

treepick

Curses Tree Style Path Picker

  • 0.1.4
  • PyPI
  • Socket score

Maintainers
1

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

KEYACTION
UP, kStep up one line.
DOWN, jStep down one line.
KJump to previous parent directory.
JJump to next parent directory.
PGDN, fJump down a page of lines.
PGUP, bJump up a page of lines.
HOME, gJump to first line.
END, GJump to last line.
TAB, RETToggle expansion/collapse of directory.
RIGHT, lExpand and step into directory.
LEFT, hCollapse directory.
SHIFT RIGHT, LExpand directory and child directories.
SHIFT LEFT, HJump to parent directory and collapse all.
SPCToggle picking of paths.
vToggle picking of all currently expanded paths.
:Toggle picking based on entered globs.
pView all currently picked paths.
/Search for string in currently expanded paths.
nJump to next occurrence of search string.
NJump to previous occurrence of search string.
.Toggle display of dotfiles.
sDisplay total size of path, recursively
SDisplay totol size of all currently expanded paths.
F5, rReset marking and expansion.
F1, ?View all keybindings.
q, ESCQuit 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.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc