Add templated version of wiki href to link element in presets

Dirk Stöcker openstreetmap at dstoecker.de
Sat Nov 3 15:33:09 UTC 2018


On Sat, 3 Nov 2018, Simon Poole wrote:

> The current default preset has 12'214 lines of which roughly 5'564 are
> used for href attributes in the "link" element. I actually suspect that
> the number of lines used for the href entries is increasing faster than
> the actual preset content and it is only a matter of time before they
> will outnumber the rest. This makes the, already far too large file,
> larger than necessary and requires continuous maintenance of the entries
> for no good reason.

This entries are maintained by an automatic script and most of the data is 
compressed away to zero (remember, JAR is a zipped file format!)

> If we used a template this could be reduced to 1'500 plus a couple of
> potential special cases. My suggestion would be to add a "template"
> attribute to the link element, with a placeholder {country} (or similar)
> for the two letter iso code plus the colon (including the colon makes
> adding a special entry for EN unnecessary).

What you suggest is a more complex approach, which essentially strips away 
the already perfectly compressible parts. Probably the additional code 
required will outweight the save space. So that approach will result in 
the opposite of the wanted goal.

Ciao
-- 
http://www.dstoecker.eu/ (PGP key available)



More information about the josm-dev mailing list