Skip to content

mrmagic2020/DirectoryPrinterPro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DirectoryPrinterPro

--use-prev-cmd

Installation

Download or clone the repository to your local machine.

Via CMake

cd /path/to/DirectoryPrinterPro/build
cmake ..
sudo cmake --build .
sudo cmake --install .

This will install the printdir executable in the /usr/local/bin directory.

Via script (CMake required)

In your terminal, enter sh /path/to/DirectoryPrinterPro/install.sh. This basically runs the commands above.

Usage

Navigate to the directory you want to print and run the following command:

printdir [OPTIONS]

Options

-h, --help - Print help message and exit.

--to-file - Print the output to a file under the root directory.

-d,--depth INT - Set recursion depth. A negative value means infinite depth.

-n, --name TEXT - Set the root directory name. Only affects the output.

--ignore TEXT ... - Set the list of files/directories to be ignored. (e.g. .vscode, .git, build, etc.)

--no-content TEXT ... - Ignore the contents of specific directories. (Only prints the directory name.)

--use-prev-cmd - Use the same command executed previously. Commands without this flag and with the --to-file flag will be stored in the file. This will ignore all other flags and options.