Microprint generator
Project description
μPrintGen
click here
{
# Changes the scale of the font in the generated microprint.
# Default: 1
"scale": 2,
# Changes the vertical spacing between each row.
# Default: 1
"vertical_spacing": 1.4,
# Changes the width of the microprint (or each column if there's more than one)
# Default: 120
"microprint_width": 140,
# Changes the max height of the microprint
# If "number_of_columns" is set, this parameter is not used.
# The microprint will be divided in columns to fulfill the desired height.
# Default: Total log height. No limit
"max_microprint_height": 300,
# Changes the number of columns to render.
# If this parameter is set, "max_microprint_height" is not used.
# The height of the microprint will be set automatically to fulfill the desired number of columns
# Default: Total log height. No limit
"number_of_columns": 4,
# Changes the size of the gap between columns
# Default: 0.2
"column_gap_size": 0.3,
# Changes the color of the gap between columns
# Default: "white"
"column_gap_color": "red",
# These define the default colors that are used in case no color was defined for
# a certain rule. If this section is not present, both colors will be the
# default ones.
"default_colors": {
# Default background color in case no background color is set
# Default: white
"background_color": "rgb(30, 30, 30)",
# Default text color in case no background color is set
# Default: black
"text_color": "white"
},
# This section contains all the rules for the colors of the microprint
# Each key corresponds to the word it needs to have in a row to use those
# colors.
# For example, if the key is "error" and the row contains the
# word "error", then the whole row will be colored with the rules inside the
# object
# If any of the two colors is not set (text or background), the default ones
# are used.
"line_rules": {
"error": {
"text_color": "red",
"background_color": "white"
},
"installing": {
"text_color": "white",
"background_color": "green"
},
"command": {
"text_color": "purple"
},
"warning": {
"text_color": "black",
"background_color": "yellow"
},
"fetching": {
"text_color": "black",
"background_color": "orange"
},
"complete": {
"text_color": "green",
"background_color": "white"
}
},
# This section contains fonts to be embedded to the svg. If the fonts work
# natively in the place where you want to see the svg, there's no need to
# do this. Monospace fonts recommended.
"additional_fonts": {
# This sub-section contains fonts to be loaded from google fonts.
# "name" is the name to assign the embedded font. This name is the one that
# needs to be used when setting the font-family of the microprint.
# "google_font_url" is the url from where to load the google font.
# Both are required.
"google_fonts": [
{
"name": "Anton",
"google_font_url": "https://fonts.googleapis.com/css?family=Anton"
},
{
"name": "Acme",
"google_font_url": "https://fonts.googleapis.com/css?family=Acme"
}
],
# This sub-section contains fonts to be loaded from the repo, as a truetype
# font file.
# "name" is the name to assign the embedded font. This name is the one that
# needs to be used when setting the font-family of the microprint
# "truetype_file" is the path to the truetype font file. Includes the name of
# the file with the extension.
# Both are required.
"truetype_fonts": [
{
"name": "NotoSans",
"truetype_file": "./fonts/NotoSans-Regular.ttf"
}
]
},
# This sets the font-family of the svg. If the first font is not available
# or cannot be loaded in the system, the next one is going to be used.
# Default: monospace
"font-family": "Acme, Anton, NotoSans, Sans, Cursive"
}
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
uPrintGen-1.1.1.tar.gz
(44.3 kB
view hashes)
Built Distribution
uPrintGen-1.1.1-py3-none-any.whl
(31.9 kB
view hashes)
Close
Hashes for uPrintGen-1.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc29cad0f9fe9f821faccf21e9fa525308a32dba9b7bfe1dfb52058cddd34532 |
|
MD5 | ba58c2bef907993201705f0a99f7267c |
|
BLAKE2b-256 | ee165b40d99f8855950680bfac9bc485ab28822f9fe857856b8961f575d4bc43 |