Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/luciancooper/cparse
Code parsing command line tool
https://github.com/luciancooper/cparse
Last synced: 2 days ago
JSON representation
Code parsing command line tool
- Host: GitHub
- URL: https://github.com/luciancooper/cparse
- Owner: luciancooper
- License: mit
- Created: 2019-01-18T04:56:51.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-04-14T08:36:15.000Z (almost 6 years ago)
- Last Synced: 2024-12-30T17:05:48.030Z (28 days ago)
- Language: Python
- Size: 74.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cparse
[![PyPI version shields.io](https://img.shields.io/pypi/v/cparse.svg?style=flat-square)](https://pypi.python.org/pypi/cparse/)
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/cparse.svg?style=flat-square)](https://pypi.python.org/pypi/cparse/)
[![PyPI license](https://img.shields.io/pypi/l/cparse.svg?style=flat-square)](https://pypi.python.org/pypi/cparse/)
[![readthedocs](https://readthedocs.org/projects/cparse/badge/?version=latest&style=flat-square)](https://cparse.readthedocs.io)Code parsing command line tool.
## Installation
With `pip` via [PyPi](https://pypi.org)
```bash
pip install cparse
```Clone the repository and install
```bash
git clone git://github.com/luciancooper/cparse.git
cd cparse
python setup.py install
```## Documentation
Full documentation can be found [**here**](https://cparse.readthedocs.io)`cparse ` currently includes 6 commands
* [`ls`](#ls) - list files in directory
* [`tree`](#tree) - print file tree
* [`stat`](#stat) - directory file extension stats
* [`py`](#py) - python code parsing
* [`html`](#html) - html link parsing
* [`css`](#css) - css code parsing### `ls`
Prints a list of the files in a directory.```bash
cparse ls [-r] [-n ] [-d | -f] [-a] [-lim ] [-fmt ]
[-exc ] [-inc ]
[-wc ] [-grep ] [-ft ]
[-m | -M | -c | -C | -b | -B | -i | -I | -g | -G]
```### `tree`
Prints a tree representation of the contents of a directory.```bash
cparse tree [-d | -f] [-a] [-n ] [-fmt ]
[-exc ] [-inc ]
[-wc ] [-grep ] [-ft ]
[-m | -M | -c | -C | -b | -B | -i | -I | -g | -G]
```### `stat`
Prints a table displaying the file extension proportions of a directory
```bash
cparse stat [-a]
```### `py`
Parses the code of a provided python file
```bash
cparse py
```### `html`
Parses the links in an HTML file and represents them as a file tree.
```bash
cparse html
```### `css`
Parses CSS code, providing options to condense redundant rules and group identical selectors.
```bash
cparse css [-g] [-c] [-s]
```## Dependencies
* [pydecorator](https://github.com/luciancooper/pydecorator)