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.4.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.4.0-py3-none-any.whl (51.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mklicense-0.4.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.14 Linux/7.0.14-arch1-1

File hashes

Hashes for mklicense-0.4.0.tar.gz
Algorithm Hash digest
SHA256 d11f9ce0c8b2ee49a9efc5880d637d0de125715157abab6520ca350783a5e4e3
MD5 ad70257d6ff7962144c5fe094878834f
BLAKE2b-256 dcff0937a1142d1d487d5d2fad16931a13cefe14db6708db20dbd78af81f3927

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mklicense-0.4.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.14 Linux/7.0.14-arch1-1

File hashes

Hashes for mklicense-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a7841a4dfa3343c0543b3d19bc3979dd07cdcfa1edc2841112e7eb8025a6d335
MD5 6c09147d659a612a69d9233f037363bd
BLAKE2b-256 b9e7974125b12b5dd335ebba34411a0fabe1e22c00e1f2982b9bfd5c74568532

See more details on using hashes here.

Release history Release notifications | RSS feed

0.5.0

2 files

This release

0.4.0 This release

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