Simple OS Independent 'cat' Command-line Tool made in Python.
Project description
cat_win
Simple Command-line Tool made in Python
Explore the code »
Report Bug
·
Request Feature
Table of Contents
About The Project
This project copies the fundamental framework of the cat command-line tool from Linux and translates its features to an OS Independent program using Python.
Additionally it includes the feature to strip and reverse the content of any given file, make use of the standard-input, which enables cat piping into each other, generating the checksum of any file, converting decimal, hexadecimal and binary numbers within any text, and much more ...
Contrary to the name of the project it is of course possible to use cat_win on Linux or MacOS!
Made With
Getting Started
Prerequisites
No Prerequisites are neccessary; The stand-alone executable catw.exe
is sufficient.
⚠️ You should never trust any executable file!
Installation
- Clone the repository and move into the root\bin directory with:
git clone git@github.com:SilenZcience/cat_win.git
cd cat_win\bin
- Add the directory to your system-environment
PATH
-variables.
or simply install the python package (PyPI-cat_win):
pip install cat-win
Usage
catw [FILE]... [OPTION]...
catw --help
⚠️ from v1.0.33 to v1.1.0 the entrypoint changes from
cat
tocatw
. If you wish to keep the old command, you will have to define an alias yourself.
Argument | Description |
---|---|
-h, --help | show help message and exit |
-v, --version | output version information |
-d, --debug | show debug information |
-n, --number | number all output lines |
-l, --linelength | display the length of each line |
-e, --ends | display $ at the end of each line |
-t, --tabs | display TAB characters as ^I |
--eof, --eof | display EOF characters as ^EOF |
-u, --unique | suppress repeated output lines |
-b, --blank | hide empty lines |
-r, --reverse | reverse output |
-s, --sum | show sum of lines |
-f, --files | list applied files |
-i, --interactive | use stdin |
-o, --oneline | take only the first stdin-line |
-p, --peek | only print the first and last lines |
-c, --clip | copy output to clipboard |
-m, --checksum | show the checksums of all files |
-a, --attributes | show meta-information about the files |
--dec, --DEC | convert decimal numbers to hexadecimal and binary |
--hex, --HEX | convert hexadecimal numbers to decimal and binary |
--bin, --BIN | convert binary numbers to decimal and hexadecimal |
--b64e, --b64e | encode the input to base64 |
--b64d, --b64d | decode the input from base64 |
--nc, --nocolor | disable colored output |
--config, --config | change color configuration |
enc=X | set file enconding to X (default is utf-8) |
find=X | find substring X in the given files |
match=X | find pattern X in the given files |
trunc=X:Y | truncate file to lines X and Y (python-like) |
[a,b] | replace a with b in every line |
[a:b:c] | python-like string indexing syntax (line by line) |
Examples
Changelog
Take a look at the Changelog here.
License
This project is licensed under the MIT License - see the LICENSE file for details
Contact
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.