CLI for common utility functions
Project description
sjcli package
This package provdie various uitlity functions the details of commands are listed below
Install
pip install sjcli
Usage
Usage: sjcli [OPTIONS] COMMAND [ARGS]...
The CLI utility
Author: Saurabh Jain <jpr.saurabh@gmail.com>
Options:
--version Show the version and exit.
--help Show this message and exit.
Commands:
clarity Clarity CLI commands
create Create a new note.
search Searches the specific pattern/string into the files/directory.
utils Collections of utility functionsl like -> view_csv,view_json...
utils
The utils command provide two commands i.e. csv and json which can be used to view csv and json files on the terminal
-
utils csv {#utils-csv}
-
utils json
utils csv
sjcli utils csv --help Usage: sjcli utils csv [OPTIONS] FILE_NAME Use FILE_NAME to specify path to CSV file to preview Options: -n, --numlines INTEGER RANGE Number of lines to display. Omit to view the entire file [x>=1] --has-header Specify this flag is CSV file has header -f, --format [fancy_grid|fancy_outline|github|grid|html|jira|latex|latex_booktabs|latex_longtable|latex_raw|mediawiki|moinmoin|orgtbl|pipe|plain|presto|pretty|psql|rst|simple|textile|tsv|unsafehtml|youtrack] The formatting style --help Show this message and exit.Example
sjcli utils csv 'CSV_FILE_PATH' --has-header -n 10sjcli utils csv 'CSV_FILE_PATH' --has-header -n 10 -f github
utils json
sjcli utils json --help Usage: sjcli utils json [OPTIONS] FILE_NAME Use FILE_NAME to specify path to JSON file to preview Options: -n, --numlines INTEGER RANGE Number of lines to display. Omit to view the entire file [x>=1] -i, --indent INTEGER RANGE Specifies the indentation level to view JSON object [x>=0] --help Show this message and exit.Example
sjcli utils json 'JSON_FILE_PATH' -n 10 -i 4sjcli utils json 'CSV_FILE_PATH' -i 0
clarity
The clarity command provide two commands i.e. parse-app and session which can be used to parse app-access files and get session details.
sjcli clarity --help
Usage: sjcli clarity [OPTIONS] COMMAND [ARGS]...
Clarity CLI commands
Options:
--help Show this message and exit.
Commands:
parse-app Parse the app-access file/ files into csv.
sessions Get session details from csv file parsed by access
clarity parse-app
sjcli clarity parse-app --help
Usage: sjcli clarity parse-app [OPTIONS] FILENAME OUTPUT
Parse the app-access file/ files into csv. It removes all the lines which
are without any HTTP operations
filename: Path to app-access.*.log or directory containing app-access.*.log.
output: Path to the output directory. prefix: File prefix to search in
directory. Example app-access ignore: The extension to ignore. Example .csv
Options:
-p, --prefix TEXT The file prefix to search if the filename is path to
directory
-i, --ignore TEXT The file extension to be ignore while searching directory
matching criteria defined in 'prefix'
--help Show this message and exit.
Example
sjcli clarity parse-app FILE_OR_DIRECTORY_PATH OUTPUT_DIRsjcli utils json 'CSV_FILE_PATH' -i 0
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sjcli-1.0.4.tar.gz.
File metadata
- Download URL: sjcli-1.0.4.tar.gz
- Upload date:
- Size: 14.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.12.4 Darwin/24.1.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef32dd0261b822351eede8bf85bf577a0d428a31c4cbb8f717f78dd71334ccc6
|
|
| MD5 |
bef107edfec774ecfd4db9a4fb5450fe
|
|
| BLAKE2b-256 |
3600edfb9feb1fcca0a5e738eb54797ce90ebca6cf3e79e9dbcf0cc77b67fcf8
|
File details
Details for the file sjcli-1.0.4-py3-none-any.whl.
File metadata
- Download URL: sjcli-1.0.4-py3-none-any.whl
- Upload date:
- Size: 19.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.12.4 Darwin/24.1.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e595b532766c221580177c36f6f8946431c9b703ad0ff6d2f2d9a35fdf1c175
|
|
| MD5 |
89c410986c1e42a661132bedd2926902
|
|
| BLAKE2b-256 |
94c92331ad72f6e710f0f56db124cab20dada28d03d059fc086f986bc5c023fc
|