This script extracts icons from MacOS applications and system resources, then converts them to a specific JSON format with Base64-encoded images.
# Just run a script with default settings
uv run flexbar_macos_icon_extractor.py
// This script shows a random Scriptable API in a widget. The script is meant to be used with a widget configured on the Home Screen. | |
// You can run the script in the app to preview the widget or you can go to the Home Screen, add a new Scriptable widget and configure the widget to run this script. | |
// You can also try creating a shortcut that runs this script. Running the shortcut will show widget. | |
let api = await randomAPI() | |
let widget = await createWidget(api) | |
if (config.runsInWidget) { | |
// The script runs inside a widget, so we pass our instance of ListWidget to be shown inside the widget on the Home Screen. | |
Script.setWidget(widget) | |
} else { | |
// The script runs inside the app, so we preview the widget. |
// Variables used by Scriptable. | |
// These must be at the very top of the file. Do not edit. | |
// icon-color: blue; icon-glyph: users; | |
// Config | |
// You can change the config here | |
const WIDGET_TITLE = 'Persons at home'; | |
// ========================================= | |
// PLEASE, DON'T CHANGE ANYTHING BELOW THIS COMMENT, | |
// IF YOU DON'T KNOW WHAT YOU ARE DOING | |
// ========================================= |
'use strict' |
# Var 9 | |
# %% | |
# ============================================================================= | |
from logging import debug, basicConfig, DEBUG | |
# basicConfig(level=DEBUG) | |
ID_KEY = "id" | |
# %% | |
# ============================================================================= |
import sys | |
from platform import system | |
from typing import Tuple | |
class Color: | |
COLOR_SYMBOL = "\x1b" | |
# ATTRIBUTES | |
NORMAL = 0 |
from io import TextIOWrapper | |
from sys import stdout | |
from typing import List | |
def print_matrix(matrix: List[List[int]], file: TextIOWrapper = stdout) -> None: | |
width, height = len(matrix), len(matrix[0]) | |
# max length for beautify | |
l: int = len(str(1 + max( | |
width, |
def split_string(string): | |
buf = [] | |
result = [] | |
buffer = "" | |
for i in string: | |
if i in "()[]{}\"'": | |
continue | |
if i in ".?!\n": | |
result.append(buf + [buffer]) | |
buffer = "" |
/usr/local/bin/node /usr/local/lib/node_modules/npm/bin/npm-cli.js run start --scripts-prepend-node-path=auto | |
> [email protected] start /Users/jagk/Yandex.Disk.localized/Projects/secothon | |
> node backend/server.js | |
MIGRATION | |
The "<include>" tag is deprecated. Please use the "<${dynamic}/>" tag or regular text replacement instead. See: https://github.com/marko-js/marko/wiki/Deprecation:-include-tag | |
at backend/view/pages/admin.marko:89:0 |