Taginfo project files

Taylor Smock taylor.smock at kaart.com
Mon Oct 2 14:26:07 UTC 2023


On 10/2/23 7:43 AM, Jochen Topf wrote:
> If I understand this correctly, [the taginfo_external_presets.json] file is generated from *all* the
> user supplied presets together.
I believe this is the case, yes.
> [...] Would it be possible to generate [one file per preset]?

Yes; I believe we are using 
https://josm.openstreetmap.de/browser/josm/trunk/scripts/TagInfoExtract.java 
to perform the extraction, so I can fiddle with it. I don't know how we 
are exporting the output and running the script -- Don-vip or stoecker 
will probably have to modify something server-side.

We /probably/ aren't generating separate files per preset because we 
don't want to have to keep track of when a preset appears or disappears, 
and file a PR against 
https://github.com/taginfo/taginfo-projects/blob/master/project_list.txt 
when those events occur.

For taginfo_presets.json and taginfo_style.json, I don't think we /can/ 
split those up -- the sources for those are single files.

> We then still have to figure out how to feed that into taginfo, because
> you probably have better things to do than add each preset to taginfo
> whenever a new one appears. But if you have (or can generate) a list I
> can add that list to my list somehow.
There are three separate routes we could go:

1. There could there be an extension to the format, such that an /array/ 
of projects can be in the json file. Example:

```

[

{ "data_format": 1, "data_updated": "20231002T000000Z", "project": 
{"name": "Preset name 1"}, "tags": {...}},

{ "data_format": 1, "data_updated": "20231002T000000Z", "project": 
{"name": "Preset name 2"}, "tags": {...}}

]

```

2. Add a specific parent project url and format, e.g.

```

{"Preset name 1": "preset_name_1.json"},

{"Preset name 2": "preset_name_2.json"}

```

3. Use the same format as project_list.txt

```

<name> <relative(?) url>

```


FTR, here are the URLs that taginfo reads:

josm_external_presets 
https://josm.openstreetmap.de/download/taginfo/taginfo_external_presets.json
josm_main_mappaint_style 
https://josm.openstreetmap.de/download/taginfo/taginfo_style.json
josm_main_presets 
https://josm.openstreetmap.de/download/taginfo/taginfo_presets.json


Just to make life "easier", I should probably look into adding a 
josm_external_styles.json file for taginfo while I'm working on the code.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0xEC71911A6CCA47CB.asc
Type: application/pgp-keys
Size: 669 bytes
Desc: OpenPGP public key
URL: <http://lists.openstreetmap.org/pipermail/josm-dev/attachments/20231002/4586ec0f/attachment.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 236 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openstreetmap.org/pipermail/josm-dev/attachments/20231002/4586ec0f/attachment.sig>


More information about the josm-dev mailing list