Skip to main content

Viliam's Universal Requirements Format

Project description

VURF

Viliam's Universal Requirements Format

What it is

VURF is a format, parser, and CLI for saving packages into Python-ish looking file.

Example packages.vurf

with pip:
  vurf
  black
  if at_work:
    ql-cq
    ql-orange
with brew:
  nnn  # terminal file manager

Usage

!TODO

Grammar

VURF has grammar and LALR(1) parser implemented in Lark. It aims to look like Python code as much as possible.

Keywords

  • with [section] - specifies "section" of requirements file. Different sections usually have different installers.
  • if [condition]: - conditions for including packages. See Conditions sections.
  • elif [condition]:
  • else:
  • ... - ellipsis - placeholder for empty section.

Packages

  • are saved as [name] # [comment]
  • name can be almost any valid package name (cannot start with "." or contain tabs or newline characters)
  • names containing spaces must be quoted. E.g. 'multi word package name'
  • comments are optional

Config

Note: VURF will automatically create config file on the first run.

Config file format

# Where packages file is saved
packages_location = "/Users/viliam/packages.vurf"
# Name of the default section
default_section = "brew"

# Sections can be though of as installers for different packages
# Value of the section is the command for installing packages with `vurf install`
[sections]
brew = "brew install"
cask = "brew install --cask"
python = "pip install --quiet --user"

# Parameters are constants that can be accessed from conditionals
[parameters]
hostname = "mac"
primary_computer = true
fs = "apfs"

CLI

$ vurf
Usage: vurf [OPTIONS] COMMAND [ARGS]...

Options:
  -q, --quiet  Don't produce unnecessary output.
  --version    Show the version and exit.
  --help       Show this message and exit.

Commands:
  add       Add package(s).
  config    Edit config file.
  default   Print default section.
  edit      Edit packages file.
  format    Format packages file.
  has       Exit with indication if package is in packages.
  install   Install packages.
  packages  Print list of packages.
  print     Print contents of packages file.
  remove    Remove package(s).
  sections  Print list of sections.

Conditions

!TODO

Hooks

!TODO

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

vurf-0.10.0a4.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

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

vurf-0.10.0a4-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file vurf-0.10.0a4.tar.gz.

File metadata

  • Download URL: vurf-0.10.0a4.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.10.1 Darwin/21.2.0

File hashes

Hashes for vurf-0.10.0a4.tar.gz
Algorithm Hash digest
SHA256 fa80eeabc5d6b2773b46c3959320d61c6c3396120cbeba4ae2818403aa75c2bf
MD5 9e1d6b24fc6bf37546d1580a8cc4e9f9
BLAKE2b-256 120d3a8da3c21dc53ed63b48099052412cc47cb5be526388bdbb06f0862278e7

See more details on using hashes here.

File details

Details for the file vurf-0.10.0a4-py3-none-any.whl.

File metadata

  • Download URL: vurf-0.10.0a4-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.10.1 Darwin/21.2.0

File hashes

Hashes for vurf-0.10.0a4-py3-none-any.whl
Algorithm Hash digest
SHA256 e97ab543884e33f7d268695876032aab030414ceaae86c77c1156cf9ff0b7cf5
MD5 997ab114b71ff6e24d5e9b11bf7ddbed
BLAKE2b-256 c977d465914a5de50694b5697a4384f0060a777d6ab5c1fd00b2f02351f8f497

See more details on using hashes here.

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