show directory description when ls.
Project description
ls-Improved: descriptive ls-like-command working on Python
What is it?
ls-Improved (lsi) prints out a directory structure with its descriptions. I've been using it when tackling some seriese of experiments.(e.g. machine leaning experiments.)
Example
We have some directories like below.
Sometimes we'd like to access the best result of experiments, but it is not easy. It is necessary to open all of directories or note experiments_summary.txt beforehand in order to do it.
Now we have the ls-Improved(lsi) command here. It allows us to see list of directories with its descriptions simultaneously.
Requirements
developed on Python2.7 and Python3.7 (maybe ≧Python2.7 is ok.)
It is working on Python, so this command dose not depend on OS.
Install
pip install
# PyPI
pip install ls-Improved
manual install
For person who do not like PyPI, manual install version exists.
- download latest manual version from github release.
wget https://github.com/ShotaroKataoka/ls-Improved/archive/v0.3.0.beta1.manual.zip - unzip downloaded zip file.
- set PATH environment to
bin/directory.
(set PATH to unzipedbin/directory or placebin/lsiandbin/mkdirito/usr/local/bin/)
Usage
How works
lsi read .description.lsi files which are in each directories.
.description.lsi is simple text file. It is made by mkdiri command.
In brief:
mkdirimake a directory with the.description.lsitext file.lsiprint out directory structure with.description.lsicontent.
mkdiri
mkdiri make a directory with the .description.lsi.
mkdiri DIRECTORY 'DESCRIPTION': makeDIRECTORYand writeDESCRIPTIONinto.description.lsimkdiri DIRECTORY: makeDIRECTORYand create empty.description.lsimkdiri -a DIRECTORY DESCRIPTION: overwrite or create.description.lsiin existing directory.- mkdiri -h : Show help
Advanced feature:
mkdiri -e: Show current mkdiri mode. (LSI MODE or ANSI MODE)mkdiri --ANSI-MODE: Set ANSI-ESCAPE-SEQUENCE MODE. (convert decoration to ANSI escape sequence)mkdiri --LSI-MODE: Set LSI-ESCAPE-SEQUENCE MODE. (default)
!! Above commands create ~/.lsirc !!
tips:
Add decoration to description :
\n: make new line;r;;g;;b;;w;;p;: add color to text;_;: add underline to text;e;: end decoration
Example
lsi
lsi print out directory structure with .description.lsi content.
lsi: Show directory structure and these descriptions in the current directorylsi DIRECTORY: Show directory structure and these descriptions in theDIRECTORYlsi -a: Show hidden files and directorieslsi -F: Show only fileslsi -D: Show only directorieslsi -s 'SEARCH_WORD': search file-name and description withSEARCH_WORDlsi -n NUMBER: Raise warning if number of files is bigger than NUMBER.lsi -h: Show help
tips:
Adding following alias to .bashrc is useful :
alias clear='clear && lsi ././'
function cdlsi (){
/cd $@ && lsi ././
}
alias cd='cdlsi'
Related projects
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 Distributions
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 ls_Improved-0.5.0-py3-none-any.whl.
File metadata
- Download URL: ls_Improved-0.5.0-py3-none-any.whl
- Upload date:
- Size: 15.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af472a64981f7c0482f63dda54e34ce2d7188b26eea123eaa7a39df12a4c9d3e
|
|
| MD5 |
09ddb05f834153e2bfd2e21a094826bd
|
|
| BLAKE2b-256 |
af9c0f2dd82c4ae82203fb2fb47705bf145e794dcd3f53ed946a24e23a3ae98f
|