Skip to main content

Simple OS Independent 'cat' Command-line Tool made in Python.

Project description

OS-Windows OS-Linux OS-MacOS


cat_win

Simple Command-line Tool made in Python
Explore the code »

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. License
  5. Contact

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 file.

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, and even convert decimal, hexadecimal and binary numbers within any text.

Made With

Python

(back to top)

Getting Started

Prerequisites

No Prerequisites are neccessary; The stand-alone executable cat.exe is sufficient.

⚠️ You should never trust any executable file!

Installation

  1. Clone the repository and move into the root\bin directory with:
git clone git@github.com:SilenZcience/cat_win.git
cd cat_win\bin
  1. Add the directory to your system-environment PATH-variables.

or simply install the python package (PyPI-cat_win):

pip install cat-win

(back to top)

Usage

cat [FILE]... [OPTION]...

cat --help

⚠️ on linux or macOS systems you might need to define an alias or use:

python3 -m cat_win [FILE]... [OPTION]...

python3 -m cat_win --help
Argument Description
-n, --number number all output lines
-x, --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
-s, --squeeze suppress repeated output lines
-r, --reverse reverse output
-c, --count show sum of lines
-b, --blank hide empty 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
-l, --clip copy output to clipboard
-m, --checksum show the checksums of all files
-a, --attributes show meta-information about the files
Argument Description
-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
-col, --nocolor disable colored output
--config, --config change color configuration
--b64e, --b64e encode the input to base64
--b64d, --b64d decode the input from base64
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] python-like string manipulation syntax
-h, --help show help message and exit
-v, --version output version information
-d, --debug show debug information

Examples

Example1

Example2

Example3

Example4

(back to top)

License

This project is licensed under the MIT License - see the LICENSE file for details

Contact

SilenZcience
GitHub-SilenZcience

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

cat_win-1.0.33-py3-none-any.whl (23.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page