Skip to content

Commit ff6e6fd

Browse files
committed
Add italian-cap package
1 parent 6ccccdc commit ff6e6fd

4 files changed

Lines changed: 9389 additions & 0 deletions

File tree

packages/italian-cap/0.1.0/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Alberto Giardino
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Italian ZIP Codes to City Names
2+
3+
An [espanso](https://espanso.org) package that expands an Italian postal code (CAP)
4+
into the code followed by its comune.
5+
6+
```
7+
:00184 → 00184 Roma
8+
:20121 → 20121 Milano
9+
```
10+
11+
The package ships **4657 triggers**, one per distinct CAP.
12+
13+
## Installation
14+
15+
```bash
16+
espanso install italian-cap
17+
```
18+
19+
Or copy `package.yml` and `_manifest.yml` into a folder named `italian-cap`
20+
inside your espanso `packages` directory
21+
22+
## Usage
23+
24+
Type a colon followed by the five-digit CAP `:00184` and espanso replaces it
25+
with `00184 Roma`.
26+
27+
## Data
28+
29+
Triggers are generated from the ISTAT-derived list of
30+
Italian comuni with their CAP.
31+
32+
### One comune per CAP
33+
34+
The source data is a many-to-many mapping: a comune can hold several CAPs, and a
35+
CAP can cover several comuni. Espanso only ever fires the *first* match for a
36+
duplicated trigger, so a file containing every row would carry thousands of dead
37+
entries.
38+
39+
Each CAP therefore resolves to a single comune, chosen by:
40+
41+
1. the comune flagged as capoluogo, if one of the candidates is;
42+
2. otherwise the alphabetically first comune.
43+
44+
That collapses 8456 source rows into 4657 usable matches. If you need a specific
45+
one of the shared comuni instead, override it in your own `match/base.yml`.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
name: "italian-cap"
2+
title: "Italian ZIP Codes to City Names"
3+
description: A package that provides a list of Italian ZIP codes and their corresponding city names. It can be used to quickly look up the city name based on the ZIP code input.
4+
version: 0.1.0
5+
author: blackne0n
6+
tags: ["zip", "italian", "postal-codes"]

0 commit comments

Comments
 (0)