Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions scripts/gem_full.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,12 @@
# stdlib imports
import os, sys
from pathlib import Path
import json
import argparse
from copy import deepcopy
from subprocess import getstatusoutput
# 3rd party stuff
from colorama import Fore, Back, Style
from colorama import init as color_init
from colorama import Fore, Back, Style # NOQA
from colorama import init as color_init # NOQA
color_init()
# Our own stuff
from keycap import Keycap
Expand Down Expand Up @@ -76,7 +75,7 @@ def __init__(self, **kwargs):
self.stem_side_supports = [0,0,0,0]
self.stem_locations = [[0,0,0]]
self.stem_walls_inset = 0
self.stem_sides_wall_thickness = 0.8; # Thick (good sound/feel)
self.stem_sides_wall_thickness = 0.8 # Thick (good sound/feel)
# Because we do strange things we need legends bigger on the Z
self.scale = [
[1,1,3],
Expand Down Expand Up @@ -750,7 +749,7 @@ def __init__(self, **kwargs):
gem_1_U_text(legends=["CYA"], scale=[[0.75,1,3]]),
gem_1_U_text(legends=["IDK"], scale=[[0.75,1,3]]),
gem_1_U_text(legends=["ASS"], scale=[[0.75,1,3]]),
gem_1_U_text(legends=["ANY", "", "KEY"], scale=[[0.75,1,3]], fonts = [
gem_1_U_text(legends=["ANY", "", "KEY"], scale=[[0.75,1,3]], fonts=[
"Gotham Rounded:style=Bold",
"Gotham Rounded:style=Bold",
"Gotham Rounded:style=Bold",
Expand Down Expand Up @@ -899,7 +898,7 @@ def print_keycaps():
Prints the names of all keycaps in KEYCAPS.
"""
print(Style.BRIGHT +
f"Here's all the keycaps we can render:\n" + Style.RESET_ALL)
"Here's all the keycaps we can render:\n" + Style.RESET_ALL)
keycap_names = ", ".join(a.name for a in KEYCAPS)
print(f"{keycap_names}")

Expand Down
2 changes: 1 addition & 1 deletion scripts/keycap.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ def __str__(self):
f"LEGEND_ROTATION2={self.rotation2}; "
f"LEGEND_SCALE={self.scale}; "
f"LEGEND_UNDERSET={self.underset}; "
# NOTE: For some reason I have to duplicate RENDER here for it to work properly:
# NOTE: For some reason I have to duplicate RENDER here for it to work properly:
f"RENDER={json.dumps(render)};' "
f"{last_part}"
)
Expand Down
7 changes: 3 additions & 4 deletions scripts/riskeyboard_70.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@

# stdlib imports
import os, sys
import json
import argparse
from copy import deepcopy
from subprocess import getstatusoutput
# 3rd party stuff
from colorama import Fore, Back, Style
from colorama import Fore, Back, Style # NOQA
from colorama import init as color_init
color_init()
# Our own stuff
Expand All @@ -42,7 +41,7 @@ def __init__(self, **kwargs):
# Disabled stem side support because it seems it is unnecessary @0.16mm
self.stem_side_supports = [0,0,0,0]
self.stem_locations = [[0,0,0]]
self.stem_sides_wall_thickness = 0.8; # Thick (good sound/feel)
self.stem_sides_wall_thickness = 0.8 # Thick (good sound/feel)
# Because we do strange things we need legends bigger on the Z
self.scale = [
[1,1,3],
Expand Down Expand Up @@ -608,7 +607,7 @@ def print_keycaps():
Prints the names of all keycaps in KEYCAPS.
"""
print(Style.BRIGHT +
f"Here's all the keycaps we can render:\n" + Style.RESET_ALL)
"Here's all the keycaps we can render:\n" + Style.RESET_ALL)
keycap_names = ", ".join(a.name for a in KEYCAPS)
print(f"{keycap_names}")

Expand Down
15 changes: 7 additions & 8 deletions scripts/riskeycap_full.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,17 @@
# stdlib imports
import os, sys
from pathlib import Path
import json
import argparse
from copy import deepcopy
from subprocess import getstatusoutput
# from subprocess import getstatusoutput
import asyncio
import subprocess
from functools import partial
from typing import Sequence, Any
from asyncio import ensure_future
# 3rd party stuff
from colorama import Fore, Back, Style
from colorama import init as color_init
from colorama import Fore, Back, Style # NOQA
from colorama import init as color_init # NOQA
color_init()
# Our own stuff
from keycap import Keycap
Expand Down Expand Up @@ -147,7 +146,7 @@ def __init__(self, **kwargs):
self.stem_inside_tolerance = 0.175
self.stem_side_supports = [0,0,0,0]
self.stem_locations = [[0,0,0]]
self.stem_sides_wall_thickness = 0.8; # Thick (good sound/feel)
self.stem_sides_wall_thickness = 0.8 # Thick (good sound/feel)
# Because we do strange things we need legends bigger on the Z
self.scale = [
[1,1,3],
Expand Down Expand Up @@ -809,7 +808,7 @@ def __init__(self, **kwargs):
riskeycap_1_U_text(legends=["CYA"], scale=[[0.75,1,3]]),
riskeycap_1_U_text(legends=["IDK"], scale=[[0.75,1,3]]),
riskeycap_1_U_text(legends=["ASS"], scale=[[0.75,1,3]]),
riskeycap_1_U_text(legends=["ANY", "", "KEY"], scale=[[0.75,1,3]], fonts = [
riskeycap_1_U_text(legends=["ANY", "", "KEY"], scale=[[0.75,1,3]], fonts=[
"Gotham Rounded:style=Bold",
"Gotham Rounded:style=Bold",
"Gotham Rounded:style=Bold",
Expand Down Expand Up @@ -961,15 +960,15 @@ def __init__(self, **kwargs):
riskeycap_alphas(name="numpadstar", legends=["*"], font_sizes=[8.5]),
# Default width of - is a bit too skinny so we scale/adjust it a bit:
riskeycap_alphas(name="numpadminus", legends=["-"],
font_sizes=[6], scale=[[1.4,1,3]], trans = [[2.9,0,0]]),
font_sizes=[6], scale=[[1.4,1,3]], trans=[[2.9,0,0]]),
]

def print_keycaps():
"""
Prints the names of all keycaps in KEYCAPS.
"""
print(Style.BRIGHT +
f"Here's all the keycaps we can render:\n" + Style.RESET_ALL)
"Here's all the keycaps we can render:\n" + Style.RESET_ALL)
keycap_names = ", ".join(a.name for a in KEYCAPS)
print(f"{keycap_names}")

Expand Down