Skip to main content

Automated typing in the Vi editor.

Project description

ezvi

ezvi is a python package that allows typing automation for the Vi editor.

Installation

ezvi is distributed as a Pip package. To install the program, simply run

pip install ezvi

Usage

The package can be used via the CLI. ezvi functions can also be imported and used in a Python program.

The CLI

There are two different ways of using EZ-Vi via the command line.

The text command

text can be used to type a pre-written file. It takes one argument (infile and one option (--writefile).

  • infile is the path towards the pre-written file.
  • --writefile tells the program to save the file again after typing it. --writefile takes one argument that corresponds to the path where the typed file will be written.

Example

ezvi text -w ./foo.txt example/message.txt

This takes the message.txt example from the example directory and types it again. The Vi buffer is then written to ./foo.txt.

The yaml command

yaml should be used to take a configuration as instructions to type a new file. The yaml command only takes one argument (config). Everything else should be specified in the config file.

  • config is the path towards the configuration file.

Example

ezvi yaml example/config.yaml

This command would take the config.yaml file from the example directory and use it to type a new file.

Writing a config file

A configuration file is just a yaml file that will be parsed using PyYAML. The structure of the file should be similar to the one in the config.yaml file from the example directory.

- write_line: "Hello!"
- new_line: 2
- write_chars: "-- Good Bot."
- write_file: "message.txt"
- quit_editor:

A - must precede every action.

Development

This package is still in alpha. Not much testing has been done and many things could still change. To see the latest commit, go check the latest branch.

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

ezvi-0.1.0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

ezvi-0.1.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file ezvi-0.1.0.tar.gz.

File metadata

  • Download URL: ezvi-0.1.0.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.8.2 Darwin/20.2.0

File hashes

Hashes for ezvi-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c86f1cde27712ce98b205deae6f86d008f84385edf97907773cc6efa0459c024
MD5 035ed59361c956d14becdfeda89d65f8
BLAKE2b-256 23e5a1eed90be5226108ada2b0fc7ca144ceda85b43d99fdedf9fe38b333fcf0

See more details on using hashes here.

File details

Details for the file ezvi-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ezvi-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.8.2 Darwin/20.2.0

File hashes

Hashes for ezvi-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 237640c173dd295b1ed8a49613b290acbfd53b0e866f4cc84aed257f9001410d
MD5 688b1b67bd6869a3f0beed0d5955e2e4
BLAKE2b-256 a46f5c015a7808de353af9bb1d89ebfb302427897819746bbc41bafb29eb8bc5

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