Skip to main content

Display excels directly on linux cmd line

Project description

xless

xless is a python script that allows display excel files directly on linux command line.

[kai@admin ~]$ xless test.xlsx -s 1 -g -H None -N 
+------+----------+---------+------+----------+----------+
|index |0         |1        |2     |3         |4         |
+------+----------+---------+------+----------+----------+
|0     |Bat25     |KIT      |chr4  |55598212  |55598236  |
|1     |Bat-26    |MSH2     |chr2  |47641560  |47641586  |
|2     |MONO-27   |MAP4K3   |chr2  |39564894  |39564921  |
|3     |NR-21     |SLC7A8   |chr14 |23652347  |23652367  |
|4     |NR-24     |ZNF2     |chr2  |95849362  |95849384  |
|5     |MSI-01    |NAV1     |chr1  |201754411 |201754427 |
|6     |MSI-03    |FAM161A  |chr2  |62063094  |62063110  |
|7     |MSI-04    |RGPD4    |chr2  |108479623 |108479640 |
|8     |MSI-06    |ATP6V0E1 |chr5  |172421761 |172421775 |
|9     |MSI-07    |GPR126   |chr6  |142691951 |142691967 |
|10    |MSI-08    |ELFN1    |chr7  |1787520   |1787536   |
|11    |MSI-09    |GTF2IP1  |chr7  |74608741  |74608753  |
|12    |MSI-11    |GUCY1A2  |chr11 |106695515 |106695526 |
|13    |MSI-12    |BLOC1S6  |chr15 |45897772  |45897785  |
|14    |MSI-13    |SMG1     |chr16 |18882660  |18882674  |
|15    |MSI-14    |RNF112   |chr17 |19314918  |19314935  |
|16    |HSPH1-T17 |HSPH1    |chr13 |31722621  |31722637  |
|17    |EWSR1     |EWSR1    |chr22 |29696469  |29696484  |
+------+----------+---------+------+----------+----------+

Install

xless requires only the pandas and openpyxl library and no other dependencies.

Install xless via pip:

pip3 install xless

or simply clone from Github:

git clone https://github.com/ZKai0801/xless.git 
cp xless/xless /usr/local/bin/

Usage

[kai@admin ~]$ xless -h
usage: xless [-h] [-H HEADER] [-s [SHEET [SHEET ...]]] [-g] [-N] [-F FIELD_SEPARATOR] [-v] excel

Display excel directly on the screen

positional arguments:
  excel                 Input excel, or use '-' to read from stdin

optional arguments:
  -h, --help            show this help message and exit
  -H HEADER, --header HEADER
                        Row (0-indexed) to use for the column labels of the
                        parsed DataFrame; Use None if there is no header.
  -s [SHEET [SHEET ...]], --sheet [SHEET [SHEET ...]]
                        0-indexed sheet position, or sheet name. set 'all' to
                        display all sheets
  -g, --show_grid       Showing grid for cells
  -N, --show_index      Showing index for rows
  -F FIELD_SEPARATOR, --field_separator FIELD_SEPARATOR
                        Use this for the input field separator. If this is
                        specified, then the input file will be treated as a
                        plain-txt file
  -v, --version         show program's version number and exit

The input file could be in xlsx, tsv or csv format. All files will be automatically parsed and output as tab-delimited that could be easily processed by other tools like awk. Files in other format will not be parsed by the xless.

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

xless-1.8.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

xless-1.8-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file xless-1.8.tar.gz.

File metadata

  • Download URL: xless-1.8.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.26.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.1

File hashes

Hashes for xless-1.8.tar.gz
Algorithm Hash digest
SHA256 9ed5e1478b4e707e1397c0209e20c8d140daed6c60c5ec9f3c0efe2d604427bd
MD5 98727fc3d225c64fd6a65415bf96098a
BLAKE2b-256 179271fb4362391a67248cec6dc772e9bc961da2d3f176bf4b33c7f7cb5cdc45

See more details on using hashes here.

File details

Details for the file xless-1.8-py3-none-any.whl.

File metadata

  • Download URL: xless-1.8-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.26.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.1

File hashes

Hashes for xless-1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 67c467c32760c009b1822c8b2e9ea7335ae857089218a8d79c98cb0ceb6657ad
MD5 3e10796dd3bad35c811fdf4fbbb36e34
BLAKE2b-256 75dfc1a990cf450731f1f5e03be2c1038e09e1123f0b4a4ccfca96e3bf908f44

See more details on using hashes here.

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