Skip to main content

A fast & user-friendly command-line interface (CLI) for avro.py.

Project description

avnie

A fast & user-friendly command-line interface (CLI) for avro.py.

Downloads Python Version License



Unit Tests Nightly Builds Linting Formatting




⚡ Overview

avnie provides a fast and sleek command-line based user interface for the avro.py Python package. It allows you to easily do all of the necessary functions avro.py provides - parsing from English, reversing to Bengali, converting to other formats, you name it! And, avnie does this without the need of writing any actual code.

The project is also built on top of the same Python version that avro.py is based on, so that you can have both of these installed on your local machine without needing to cross-interpret between them.

✨ ... but for whom?

The project is made for those who'd like to use their terminal as a way of quickly and conveniently typing Avro Keyboard-based Bengali text without the need for a hefty frontend UI, or for all the terminal geeks out there.


🔨 Installation

  • Pip

This package requires Python 3.8 or higher to be used inside your development environment.

# Install / upgrade.
$ pip install avnie
  • Prebuilt Binaries

Prebuilt binaries are available for Windows, macOS, and Linux. You can download the latest binary from the Releases section for your respective platform. After downloading, you can add the binary to your PATH variable for easy access.


🚀 Usage

🔸 Command Mode

The usage of avnie is pretty straightforward. You can either use avro or avnie as the keyword for executing avnie commands. Here are some examples:

# Get basic help regarding usage.
# This also provides additional functionality like autocompletion (TBA).
$ avnie --help
$ avro --help  # or

# Parse a given English text to Bengali.
$ avro parse "ami banglay gan gaite bhalObasi"

# Reverse a given Bengali text to English.
$ avro reverse "আমি বাংলায় গান গাইতে ভালোবাসি"

More commands and features will be available as the project progresses in its development phase. For now, you can use the commands above to get started with the basic functionalities. Additional options can be found by running avnie <command> --help.

Some universal flags for each commands include:

# Automatically copy the output to clipboard.
$ avnie parse "oiTa ke?" --copy-on-success  # or -c

# Get text from clipboard.
$ avnie parse --from-clip # or -f

# Toggle between remap and full manual mode.
$ avnie parse "wikipedia"  # remap
$ avnie parse "wikipedia" --ignore-remap  # no remap (can also use --i)

# Convert to Bijoy on output.
$ avnie parse "tumi ke?" --bijoy  # or -b

🔸 Interactive Mode

There is also a dedicated "Interactive Mode" in case you don't like typing the same command over and over again. This is enabled in prebuilt binaries by default.

You can start the interactive mode by running the following command:

$ avnie interactive

If you'd like to make it the default way of using the tool, set the AVRO_INTERACTIVE environment variable to 1 in your shell configuration file (e.g. .bashrc, .zshrc, etc.).

# Add this to your shell configuration file.
export AVRO_INTERACTIVE=1

🔨 Building for Python

If you'd like to build the project from source for your local Python installation, you can follow the steps given below to get started:

Requirements

Steps

# Create a virtual environment using the venv command.
$ python -m venv venv && source venv/bin/activate

# Install the required dependencies and optionally update them.
$ make install # or poetry install --sync
$ poetry update

# Start using it!
$ avnie --help

# Optionally, you can also build the Python package locally.
$ poetry build

Optionally, run unit tests to ensure everything is working as expected:

# This uses the inclued Makefile.
$ make test

# or, run the pytest framework from poetry directly.
$ poetry run pytest .

⚒️ Compiling to Binaries

If you'd like to compile the project to a binary for your respective platform, you can follow the steps given below to get started:

Requirements

Steps

# Create a virtual environment using the venv command.
$ python -m venv venv && source venv/bin/activate

# Install the required dependencies and optionally update them.
$ make install && poetry update

# Compile using Nuitka. This uses the included Makefile.
$ make build

After running the command above, you should either see a main.bin or a main.exe file in the project directory depending on what platform you're compiling for. You can then use this binary to run the project on your local machine.



📋 License

Licensed under the MIT License.

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

avnie-2024.10.12.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

avnie-2024.10.12-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file avnie-2024.10.12.tar.gz.

File metadata

  • Download URL: avnie-2024.10.12.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.5.0-1025-azure

File hashes

Hashes for avnie-2024.10.12.tar.gz
Algorithm Hash digest
SHA256 10e9e278b92e90e9246c6d5b4cd7b217b8a86d309b578667bbe78c9d6569e50b
MD5 e88d0f6fa6612b448485cfadf3723c3e
BLAKE2b-256 111cb81965dcab6cc99783f69538d7bcc528476dca4f3c2d28c8bda00e07671f

See more details on using hashes here.

File details

Details for the file avnie-2024.10.12-py3-none-any.whl.

File metadata

  • Download URL: avnie-2024.10.12-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.5.0-1025-azure

File hashes

Hashes for avnie-2024.10.12-py3-none-any.whl
Algorithm Hash digest
SHA256 a3c0f8c9e8f7b755d3fa0ad9fc251b2cec2f64ae2445137065fbf41dbc8d7392
MD5 5aa830b97c06f03a7cad47fc62983ed8
BLAKE2b-256 45b309a7dba44cdabebeb6a667bb345dc84c4163b34769c3f0832627528a4568

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