Utility libraries for Scriptable.
All rules almost follow the Scriptable Docs.
- Element tag name support lowercase or capitalize first letter
- Supports 6 prototypes for global
- textColor
- font
- textOpacity
- shadowColor
- shadowRadius
- shadowOffset
- Support conditional:
<Text if="2 > 1" />
const XML2UI = importModule("XML2UI");
const fm = FileManager.iCloud();
const templatePath = fm.joinPath(fm.documentsDirectory(), "template.html");
await fm.downloadFileFromiCloud(templatePath);
const template = fm.readString(templatePath);
const widgetXML = new XML2UI.WidgetXML(template, { debug: true });
const widget = widgetXML.create();
if (config.runsInWidget) {
Script.setWidget(widget);
} else if (config.runsWithSiri) {
} else {
await widget.presentMedium();
}
Script.complete();
No implementation yet.