Skip to main content

No project description provided

Project description

Club

club banner

CLI wrapper for the caveman_compression by wilpel. The name of the tool (club) is a kinda of a joke since this wrapper is a CLI tool and the club was one of the caveman's main tools.

This project was born simply from my curiosity in trying to develop a tool for the CLI. I made some small updates to the original scripts (see updates sections) but all credit for the original code goes to original authors.

List of Contents

Installation

To install club you will first need pipx (you can easily install it through brew, pip or scoop based on your system/preferences)

How to install pipx

pipx installation

MacOs (brew)

brew install pipx

Python (pip)

pip install pipx

Windows

scoop install pipx

Check installation

To check if pipx has been installed correctly you can run the following command :

pipx ensurepath

After installing pipx you can simply install club using the command

pipx install caveman-club

(Don't ask me why but when I upload the packet on Pypi the name club was not allowed for a package, although I couldn't find anyone else using it)

Usage

Club offers the same functionality as the base package but wrapped in a command for CLI. It basically allows you to compress/decompress text through 3 techniques: NLP, MLM and LLM (see here for details about the three methods).

The structure of a command is the following :

club TYPE MODALITY [TEXT] OPTIONS

Where :

  • TYPE is on the 3 techniques implemented (llm, mlm and nlp).
  • MODALITY can be compress or decompress
  • [TEXT] is the text you want to compress or decompress.
  • OPTIONS are optional flags. Some flags are common between all 3 TYPE while others are specific to some of them (see flags sections below for more details).

E.g. if you want to compress your text with nlp then you can run

club nlp compress "your verbose text"

E.g. if you want to decompress your text with nlp then you can run

club nlp decompress "your verbose text"

For more examples see the dedicated section below.

N.B. 1. If you do not specify TYPE and write directly the MODALITY, then club will default to nlp. I.e. running club compress "your verbose text" is equivalent to running club nlp compress "your verbose text".

N.B. 2. [TEXT] is an optional parameter you if you specify input and output files. See common flags and examples sections below.

Common Flags

  • --input : The input file with the text you want to compress/decompress. If passed together with text, the text will take precedence and a copy of the text will be saved to the input file (backup). If a file already exists at the input file path, it will be overwritten without warning.
  • --output : The output file where you want to save the output
  • --verbose : Enable verbose output (TYPE with eventual settings, input, and output, and compression ratio if MODALITY is compression)

nlp Flags

  • --language : Language code. If not specified it will default to en. Possible values are [en|es|de|fr|it|pt|nl|el|nb|lt|ja|zh|pl|ro|ru].

mlp Flags

Examples

Updates

This is a list of small changes/updates from the original scripts

  • Add support for metal (MacOs) for the mlm method
  • Changed spacy models import to make it automated the first time the tool is used

TODO

  • Add support for other LLMs providers.

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

caveman_club-0.2.1.tar.gz (9.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

caveman_club-0.2.1-py2.py3-none-any.whl (19.5 kB view details)

Uploaded Python 2Python 3

File details

Details for the file caveman_club-0.2.1.tar.gz.

File metadata

  • Download URL: caveman_club-0.2.1.tar.gz
  • Upload date:
  • Size: 9.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for caveman_club-0.2.1.tar.gz
Algorithm Hash digest
SHA256 6a2a3c9bc51b2df8cb65737d7e9578306dbd33fa2f55bccffa469cf0822d3aef
MD5 4e49fea7a284d7b94e812132fb5ada9a
BLAKE2b-256 39805464def2e884a7588cf3ab24a65bf24ccaa4ce30ae676ec7203e45d1dd34

See more details on using hashes here.

Provenance

The following attestation bundles were made for caveman_club-0.2.1.tar.gz:

Publisher: python-publish.yml on jesus-333/club

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file caveman_club-0.2.1-py2.py3-none-any.whl.

File metadata

  • Download URL: caveman_club-0.2.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 19.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for caveman_club-0.2.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7bf9363473574c3de9400c937aef1414c54ed380530d2810b8d91b48048ea4cd
MD5 565282ba5d9e18232655bf33c60d215b
BLAKE2b-256 91bb7f54bad79d3a1695f8c33071ef0d8569944c49fe89feb3682b69e7ad5a22

See more details on using hashes here.

Provenance

The following attestation bundles were made for caveman_club-0.2.1-py2.py3-none-any.whl:

Publisher: python-publish.yml on jesus-333/club

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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