Skip to main content

Code parser tool

Project description

cparse

PyPI version shields.io PyPI pyversions PyPI license readthedocs

Code parsing command line tool.

Installation

With pip via PyPi

pip install cparse

Clone the repository and install

git clone git://github.com/luciancooper/cparse.git
cd cparse
python setup.py install

Documentation

Full documentation can be found here

cparse currently includes 6 commands

  • ls - list files in directory
  • tree - print file tree
  • stat - directory file extension stats
  • py - python code parsing
  • html - html link parsing
  • css - css code parsing

ls

Prints a list of the files in a directory.

cparse ls [-r] [-n <depth>] [-d | -f] [-a] [-lim <count>] [-fmt <format>]
          [-exc <path>] [-inc <path>]
          [-wc <pattern>] [-grep <regexp>] [-ft <filetype>]
          [-m | -M | -c | -C | -b | -B | -i | -I | -g | -G] <path>

tree

Prints a tree representation of the contents of a directory.

cparse tree [-d | -f] [-a] [-n <depth>] [-fmt <format>]
            [-exc <path>] [-inc <path>]
            [-wc <pattern>] [-grep <regular-expression>] [-ft <file-extension>]
            [-m | -M | -c | -C | -b | -B | -i | -I | -g | -G] <path>

stat

Prints a table displaying the file extension proportions of a directory

cparse stat [-a] <path>

py

Parses the code of a provided python file

cparse py <path>

html

Parses the links in an HTML file and represents them as a file tree.

cparse html <path>

css

Parses CSS code, providing options to condense redundant rules and group identical selectors.

cparse css [-g] [-c] [-s] <path>

Dependencies

Project details


Download files

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

Source Distribution

cparse-0.0.2.tar.gz (21.6 kB view hashes)

Uploaded Source

Built Distribution

cparse-0.0.2-py3-none-any.whl (34.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