Skip to main content

Quickly generate a license file

Project description

MkLicense

MkLicense is a command-line tool for generating an Open Source License.

Preview

MkLicense makes use of the Textual TUI framework and is inspired by choosealicense.

[!IMPORTANT] MkLicense is not responsible for correctness and comes with no warranty.

Installation

pipx install mklicense

Design

Factory

You can use a "factory" to dynamically create default values for certain parameters. The factory is an executable that accepts the name of the parameter as the only argument. The factory should print a line representing the default value to be used or no value to omit the value. Here is an example for a factory written in Python:

#!/usr/bin/env python3

from datetime import date
import sys

param = sys.argv[1]
match param:
    case "Year":
        print(date.today().year)
    case "Name":
        print("John Doe")

MkLicense will use the environment variable MKLICENSE_FACTORY to infer the path to the executable (or the name of the executable if in PATH). If that environment variable is not set, MkLicense looks if mklicense/factory exists in your config directory (e.g. ~/.config/ in Linux) and use that script. The script must be an executable so make sure to use chmod +x script_path and use a shebang at the top of the script.

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

mklicense-0.3.0.tar.gz (41.8 kB view details)

Uploaded Source

Built Distribution

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

mklicense-0.3.0-py3-none-any.whl (51.5 kB view details)

Uploaded Python 3

File details

Details for the file mklicense-0.3.0.tar.gz.

File metadata

  • Download URL: mklicense-0.3.0.tar.gz
  • Upload date:
  • Size: 41.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.11.13 Linux/6.17.3-arch2-1

File hashes

Hashes for mklicense-0.3.0.tar.gz
Algorithm Hash digest
SHA256 8763d69b022808810b61d1d8b55046d1e2c280e8b176eb68133853d1e69d6edf
MD5 294695925dbc0fe918659a2af7c86cd8
BLAKE2b-256 958d9d7f33d8b6d9b2cbd5ec8cd5beb728ccff8440c335210bac8d329a7c2b8b

See more details on using hashes here.

File details

Details for the file mklicense-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: mklicense-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 51.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.11.13 Linux/6.17.3-arch2-1

File hashes

Hashes for mklicense-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 470cd3cbba68c0ecd705786e1ff3bbd54596e94a106c52fbfacc714676b6f74f
MD5 bdd09306637814c6847eda807a04e283
BLAKE2b-256 c19aff66c782e4abc801f0ce02234b22c2d2999e9585db75dfa0936bc31a16e1

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