Skip to content

Initial commit of numbers to words converter in Dutch#218

Open
brentgees wants to merge 1 commit intoespanso:mainfrom
brentgees:main
Open

Initial commit of numbers to words converter in Dutch#218
brentgees wants to merge 1 commit intoespanso:mainfrom
brentgees:main

Conversation

@brentgees
Copy link
Copy Markdown

Based on the website https://www.zegge.nu where you can convert numbers to full written-out words

number.to.words.converter.mp4

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Introduces an Espanso package to convert numeric currency amounts into fully written-out Dutch text (based on zegge.nu).

Changes:

  • Added package metadata via _manifest.yml.
  • Added Espanso match configuration and an embedded Python converter script in package.yml.
  • Added usage and installation documentation in README.md.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
packages/number-to-words-nl/0.1.0/README.md Documents the package purpose, install command, and basic usage.
packages/number-to-words-nl/0.1.0/package.yml Defines the :nr trigger, input form, and Python-based conversion logic.
packages/number-to-words-nl/0.1.0/_manifest.yml Adds Espanso Hub manifest metadata (name/version/tags).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

To install from espanso hub:

```
espanso install number-to-words
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The install command uses espanso install number-to-words, but this package’s manifest name/directory is number-to-words-nl, so the command as written won’t install this package from the hub. Update the README to use the correct package name.

Suggested change
espanso install number-to-words
espanso install number-to-words-nl

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator

@smeech smeech Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or remove the installation instructions entirely - if you look at the Hub entries you'll see these are generated automatically and placed towards the top-right of each package's landing page anyway.

homepage: "https://github.com/brentgees"
version: 0.1.0
author: Brent Gees, zegge.nu
tags: ["Dutch", "Numbers", "Converter", "Utility]
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tags has invalid YAML due to a missing closing quote on Utility (it currently reads "Utility]). This will prevent the manifest from parsing.

Suggested change
tags: ["Dutch", "Numbers", "Converter", "Utility]
tags: ["Dutch", "Numbers", "Converter", "Utility"]

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator

@smeech smeech Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That needs fixing.

Comment on lines +20 to +23
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')

getal = '{{form1.getal}}'

Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

User-provided form input is interpolated directly into the Python source (getal = '{{form1.getal}}'). If the input contains a single quote/newline it can break the string literal and inject arbitrary Python code. Pass the value as a separate argv argument (or encode via JSON) and read it from sys.argv instead of templating it into the script.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not overly concerned about this - all data entered is going to come locally from the user. If they want to try and inject arbitrary Python code that's up to them.

Comment on lines +13 to +18
args:
- python
- -c
- |
# -*- coding: utf-8 -*-
import sys
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Python logic is fairly large to inline under python -c in YAML, which makes it harder to maintain and increases the chance of quoting/templating bugs. Consider moving the converter into a dedicated .py file within the package and invoking it from args (as done in e.g. packages/ask-airia/0.1.0/package.yml:36-38).

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignore.

Comment on lines +3 to +8
**Number to words NL** is an [Espanso](https://espanso.org/) package that enables you to convert numbers directly to full written currencies from your Espanso extension.

This is the same functionality as https://www.zegge.nu/ and also based on that code
## Features

- Easily convert numbers to full written out currencies, e.g.
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor wording issue: “convert numbers directly to full written currencies” is grammatically off/unclear. Consider rephrasing to “convert numbers to fully written-out currency amounts” (or similar).

Suggested change
**Number to words NL** is an [Espanso](https://espanso.org/) package that enables you to convert numbers directly to full written currencies from your Espanso extension.
This is the same functionality as https://www.zegge.nu/ and also based on that code
## Features
- Easily convert numbers to full written out currencies, e.g.
**Number to words NL** is an [Espanso](https://espanso.org/) package that enables you to convert numbers to fully written-out currency amounts from your Espanso extension.
This provides the same functionality as https://www.zegge.nu/ and is also based on that code.
## Features
- Easily convert numbers to fully written-out currency amounts, e.g.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Picky, but I agree.

Copy link
Copy Markdown
Collaborator

@smeech smeech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A fun package to convert numbers to Dutch written currency text. Uses an inline Python script to process the data entered via a form. The script appears benign, with no malicious code.

I've let Copilot do its stuff and it raises a number of issues, some of which need addressing and others which can be ignored - see my notes.

There are some minor inconsistencies in use, but these may be intentional:

12.34→twaalf euro en vierendertig eurocent
12,34→twaalf euro en vierendertig eurocent
12.345→twaalfduizend driehonderdvijfenveertig euro
12,345→twaalfduizend driehonderdvijfenveertig euro

It doesn't distinguish between periods . and commas ,, which I suppose allows for Dutch and English number formats to be used.

To install from espanso hub:

```
espanso install number-to-words
Copy link
Copy Markdown
Collaborator

@smeech smeech Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or remove the installation instructions entirely - if you look at the Hub entries you'll see these are generated automatically and placed towards the top-right of each package's landing page anyway.

Comment on lines +3 to +8
**Number to words NL** is an [Espanso](https://espanso.org/) package that enables you to convert numbers directly to full written currencies from your Espanso extension.

This is the same functionality as https://www.zegge.nu/ and also based on that code
## Features

- Easily convert numbers to full written out currencies, e.g.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Picky, but I agree.

Comment on lines +20 to +23
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')

getal = '{{form1.getal}}'

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not overly concerned about this - all data entered is going to come locally from the user. If they want to try and inject arbitrary Python code that's up to them.

homepage: "https://github.com/brentgees"
version: 0.1.0
author: Brent Gees, zegge.nu
tags: ["Dutch", "Numbers", "Converter", "Utility]
Copy link
Copy Markdown
Collaborator

@smeech smeech Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That needs fixing.

Comment on lines +13 to +18
args:
- python
- -c
- |
# -*- coding: utf-8 -*-
import sys
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants