Skip to main content

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.

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.5.0.tar.gz (42.0 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.5.0-py3-none-any.whl (51.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mklicense-0.5.0.tar.gz
  • Upload date:
  • Size: 42.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.11.14 Linux/7.0.14-arch1-1

File hashes

Hashes for mklicense-0.5.0.tar.gz
Algorithm Hash digest
SHA256 bf33d2af513295bec2c84179ca25c367df9178870b4077fa71541580312db2dc
MD5 2b90238d92aef32fca2993ec7d31da9a
BLAKE2b-256 1c2b1d52dfeecb951c5bae5c6864466844ac1d0a7cc7e5900e1d77eb39e4c5ce

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mklicense-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 51.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.11.14 Linux/7.0.14-arch1-1

File hashes

Hashes for mklicense-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6e3c4b2939dfdfb33527d629bafe88cf1afb56db39e7ab9682abac2003fc5cbc
MD5 62c875d3cf19ea97199fbe6a9ccf51df
BLAKE2b-256 8a2ab8bb36316c121d492b260b12573595f7f79cb101dd065b3e752f113ae73a

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 files

0.4.0

2 files

0.3.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page