From 487e279f6f0747f760811dd5a391cf88ba93bc9a Mon Sep 17 00:00:00 2001 From: smeech Date: Sun, 30 Jun 2024 22:45:03 +0100 Subject: [PATCH] New version Version number updated to cause the hub to pick up the package. README.md already amended with an missing tag added. --- packages/calc-macos/0.1.1/README.md | 26 ++++++++++++++++++++ packages/calc-macos/0.1.1/_manifest.yml | 6 +++++ packages/calc-macos/0.1.1/package.yml | 32 +++++++++++++++++++++++++ 3 files changed, 64 insertions(+) create mode 100644 packages/calc-macos/0.1.1/README.md create mode 100644 packages/calc-macos/0.1.1/_manifest.yml create mode 100644 packages/calc-macos/0.1.1/package.yml diff --git a/packages/calc-macos/0.1.1/README.md b/packages/calc-macos/0.1.1/README.md new file mode 100644 index 00000000..fdfdc36d --- /dev/null +++ b/packages/calc-macos/0.1.1/README.md @@ -0,0 +1,26 @@ +# espanso-calc-macos +Basic calculation package for espanso that works in macOS. + +## Example + +![Screen Recording 2022-06-23 at 10 13 21](https://user-images.githubusercontent.com/23709916/175312182-e6372ce2-b296-4d5b-bdc0-a9d8543ab85e.gif) + +## Usage +1. Type `:calc` +2. You'll see a form, type the calculation + image + 3. The text will be replaced with the result + +## Commands + +| Command | Match | Example | Result | +|----------------------------|--------|---------------|------------| +| Calculate | :calc | Input: 10 - 3 | 7 | +| Calculate and show account | :ecalc | Input: 10 - 3 | 10 - 3 = 7 | + +## Implementation + +This package uses `bc` to do the calculations +``` +echo '10 * 4' | bc +``` diff --git a/packages/calc-macos/0.1.1/_manifest.yml b/packages/calc-macos/0.1.1/_manifest.yml new file mode 100644 index 00000000..e2698ba5 --- /dev/null +++ b/packages/calc-macos/0.1.1/_manifest.yml @@ -0,0 +1,6 @@ +name: "calc-macos" +title: "Calc Macos" +description: Espanso package for doing basic arithmetic in the shell. +version: 0.1.1 +author: Tashima42 +tags: ["utility", "math", "calculator"] diff --git a/packages/calc-macos/0.1.1/package.yml b/packages/calc-macos/0.1.1/package.yml new file mode 100644 index 00000000..efb1e60d --- /dev/null +++ b/packages/calc-macos/0.1.1/package.yml @@ -0,0 +1,32 @@ +# Calculator + +name: calc-macos +parent: default + +matches: + # Calculator + - trigger: ":calc" + replace: "{{solved}}" + vars: + - name: "input" + type: "form" + params: + layout: | + [[val]] + - name: "solved" + type: shell + params: + cmd: "echo '{{input.val}}' | bc" + # Calculator w/ input + - trigger: ":ecalc" + replace: "{{input.val}} = {{solved}}" + vars: + - name: "input" + type: "form" + params: + layout: | + [[val]] + - name: "solved" + type: shell + params: + cmd: "echo '{{input.val}}' | bc"