From 8a28f81e2070e869f0d2279c94e96473accfe068 Mon Sep 17 00:00:00 2001 From: "Mr. Pennyworth" Date: Sun, 4 Aug 2024 06:52:42 -0500 Subject: [PATCH] Use CSS from workflow dir instead of creating per-dict hard link --- dict-entry.css | 2 +- extra-pane-config.json | 5 +++++ info.plist | 2 +- pyapp/BetterDict.py | 6 ------ 4 files changed, 7 insertions(+), 8 deletions(-) create mode 100644 extra-pane-config.json diff --git a/dict-entry.css b/dict-entry.css index 5c9c037..687b93c 100644 --- a/dict-entry.css +++ b/dict-entry.css @@ -21,7 +21,7 @@ body margin-bottom: 1.5em; /* font-size needs to come after font as the included "-apple-system-body" comes with size too. */ - font-size: calc(var(--result-text-size, 16pt) * 0.75); + font-size: calc(var(--result-text-size, 16pt) * 0.85); } html.apple_client-panel body diff --git a/extra-pane-config.json b/extra-pane-config.json new file mode 100644 index 0000000..406d319 --- /dev/null +++ b/extra-pane-config.json @@ -0,0 +1,5 @@ +[{ + "alignment" : { + "horizontal" : {"placement" : "right", "width" : 300, "minHeight" : 400}}, + "customCSSFilename": "dict-entry.css" +}] diff --git a/info.plist b/info.plist index 3586dbb..00b7fe7 100644 --- a/info.plist +++ b/info.plist @@ -890,7 +890,7 @@ Subsequent searches should be snappy variablesdontexport version - 0.2.16 + 0.2.17 webaddress https://github.com/mr-pennyworth/alfred-better-dictionaries diff --git a/pyapp/BetterDict.py b/pyapp/BetterDict.py index 8f4d41e..afe4306 100644 --- a/pyapp/BetterDict.py +++ b/pyapp/BetterDict.py @@ -97,7 +97,6 @@ def create_html_file(word, definitions, html_dir): - {definition} """.encode( @@ -115,11 +114,6 @@ def create_html_files(word_defs_map_items, html_dir): title=title, ) - os.link( - src=f"{WORKFLOW_DIR}/dict-entry.css", - dst=f"{html_dir}/dict-entry.css", - ) - class AccumulatedIndexer: def __init__(self, index):