Taginfo project files
Jochen Topf
jochen at remote.org
Mon Oct 2 16:01:55 UTC 2023
On Mon, Oct 02, 2023 at 08:26:07AM -0600, Taylor Smock wrote:
> 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>
>
> ```
Option 3 sounds best to me. Simplest. URLs should be absolute. Do you
have a way of giving out unique ids for the name? I would probably read
your file in addition to my project_list.txt and add "josm_presets_" to
all ids or so to make sure they don't overlap.
Jochen
--
Jochen Topf jochen at remote.org https://www.jochentopf.com/ +49-351-31778688
More information about the josm-dev
mailing list