Stream: Zulip

Topic: OSM key/tag linkifier


view this post on Zulip HellMap (Dec 20 2022 at 14:42):

Droši vien jautājums jaunam topikam - bet vai tad nebija kaut kur teikts, ka OSM tegi linkos uz OSM wiki? Vai arī to es nosapņoju...

view this post on Zulip i-ky (Dec 20 2022 at 14:53):

Es arī par to sapņoju... :D
Var uztaisīt, lai visa key=tag kombinācija ved uz Tag:key%3Dtag lapu, bet tā, kā OSM Wiki taisa divus linkus (arī uz Key%3Akey) laikam neizdosies tehnisku iemeslu dēļ.

view this post on Zulip i-ky (Dec 20 2022 at 15:06):

Test highway=cycleway + bicycle=designated + foot=no

view this post on Zulip i-ky (Dec 20 2022 at 15:07):

Fail - sidewalk:left=yes

view this post on Zulip i-ky (Dec 20 2022 at 15:08):

i-ky said:

Fail - sidewalk:left=yes

Vēlreiz...

view this post on Zulip HellMap (Dec 20 2022 at 15:10):

access=*

view this post on Zulip HellMap (Dec 20 2022 at 15:11):

Bet nu tādu pa taisno arī neaizlinkot, tikai ja izdala access ārā

view this post on Zulip HellMap (Dec 20 2022 at 15:11):

maxspeed:conditional=110 @ (May 1-Oct 1)

view this post on Zulip HellMap (Dec 20 2022 at 15:12):

highway=footway

view this post on Zulip HellMap (Dec 20 2022 at 15:12):

Koda blokos linkus nevar?

view this post on Zulip i-ky (Dec 20 2022 at 15:13):

Jā, koda blokos viss ir "as is".

view this post on Zulip i-ky (Dec 20 2022 at 15:15):

HellMap said:

Bet nu tādu pa taisno arī neaizlinkot, tikai ja izdala access ārā

Ja ir interese paspēlēties, šeit ir aprakstīts, kā tas ir konfigurējams. Pēc būtības, vajag re2 regulāro izteiksmi.

Linkifiers make it easy to refer to issues or tickets in third party issue trackers, like GitHub, Salesforce, Zendesk, and others. For instance, you can add a linkifier that automatically turns #2468 into a link to https://github.com/zulip/zulip/issues/2468. | If the pattern appears in a message topic, Zulip adds a little button to the right of the topic that links to the appropriate URL. | This is best explained by example. | Hash followed by a number of any length. | String of hexadecimal digits between 7 and 40 characters long.
RE2 is a fast, safe, thread-friendly alternative to backtracking regular expression engines like those used in PCRE, Perl, and Python. It is a C++ library. - Syntax · google/re2 Wiki

view this post on Zulip HellMap (Jan 02 2023 at 12:57):

:=D

view this post on Zulip HellMap (Jan 02 2023 at 12:58):

Varētu pielikt tags=* sintaki:
(?P<key>[\w:]+)=\*
https://wiki.openstreetmap.org/wiki/Key%3A%(key)
Linkifierus var tikai organizācijas admini, nevaru pārbaudīt pats

view this post on Zulip HellMap (Jan 02 2023 at 13:27):

:=*

view this post on Zulip HellMap (Jan 02 2023 at 13:27):

But for real, highway=*

view this post on Zulip i-ky (Jan 02 2023 at 13:28):

HellMap said:

Varētu pielikt tags=* sintaki:
(?P<key>[\w:]+)=\*
https://wiki.openstreetmap.org/wiki/Key%3A%(key)
Linkifierus var tikai organizācijas admini, nevaru pārbaudīt pats

Pieliku ar minimālām izmaiņām, paldies! Ja ir idejas par konfigurācijas izmaiņām, bet nav tiesību mainīt, var @Zulip administratori pingot.

view this post on Zulip HellMap (Jan 02 2023 at 20:25):

Rīgas botāniskais dārzs

view this post on Zulip HellMap (Jan 02 2023 at 20:42):

Centos regexu salauzt, bet sapratu tikai to, ka visi online testeri kaut ko ne tā dara

view this post on Zulip i-ky (Jan 02 2023 at 20:51):

Piemēram?

view this post on Zulip HellMap (Jan 02 2023 at 20:54):

Piemēram https://regex101.com/r/NSTqIN/1 - ja ieraksta bota regexu (?i)\bbot(?:(?:s|a|am|u)?\b|ā\W), tur atrod, ka bot esot atrasts no botāniskais. Es tā arī nesapratu, kas tur nav tā.

Regular expression tester with syntax highlighting, explanation, cheat sheet for PHP/PCRE, Python, GO, JavaScript, Java, C#/.NET.
Collection of scripts to update and maintain OpenStreetMap data in Latvia (currently only addresses). See https://wiki.openstreetmap.org/wiki/Automated_edits/Latvia-bot. - GitHub - Davis-Klavins/os...

view this post on Zulip i-ky (Jan 02 2023 at 20:58):

Es arī to nevaru izskaidrot. Var norakstīt uz to, ka varbūt tiek lietotas dažādas re2 bibliotēkas versijas.

view this post on Zulip i-ky (Jan 02 2023 at 21:00):

Vispār ar to "ā" bija liels čakars, jo Unicode atbalsts nav baigi labs.

view this post on Zulip i-ky (Jan 04 2023 at 12:02):

Note to self: jāiemāca linkifier'am prefiksi un sufiksi:

  1. https://wiki.openstreetmap.org/wiki/Lifecycle_prefix
  2. https://wiki.openstreetmap.org/wiki/Conditional_restrictions
  3. https://wiki.openstreetmap.org/wiki/Multilingual_names
  4. https://wiki.openstreetmap.org/wiki/Lanes
  5. https://wiki.openstreetmap.org/wiki/Forward_%26_backward,_left_%26_right

view this post on Zulip i-ky (Jan 04 2023 at 13:48):

Note to self: apraksts, kā tas viss strādā OSM Wiki.

view this post on Zulip HellMap (Jan 04 2023 at 13:51):

A linkifieru var sadalīt tā? teiksim ja oneway:tram=real_value - varēs noparsēt 3 reizes un pielikt gan oneway= gan oneway:tram= gan =real_value?

view this post on Zulip HellMap (Jan 04 2023 at 13:52):

Citiem vārdiem, ja viens linkifiers iebāzīs linku, vai otrs pēc tam mācēs noparsēt to pašu tekstu BEZ pirmā linka?

view this post on Zulip i-ky (Jan 04 2023 at 13:56):

foo:bar=baz

view this post on Zulip HellMap (Jan 04 2023 at 13:57):

re2 ir lookbehind/ahead?

view this post on Zulip i-ky (Jan 04 2023 at 13:57):

HellMap said:

re2 ir lookbehind/ahead?

Nav

view this post on Zulip HellMap (Jan 04 2023 at 13:57):

Un Zupilā linku drošvien nevar tikai daļai no atrastā

view this post on Zulip i-ky (Jan 04 2023 at 13:59):

Ir issue, kas ir tuvu pēc būtības, bet mums ar to nepietiks. Es taisos uzrakstīt jaunu ar mūsu prasībām.

In the Category Theory Zulip server, we're using a linkifier to turn [[text]] into a hyperlink to the corresponding nLab page. This works really well. The only downside is that linkifiers turn ...

view this post on Zulip i-ky (Jan 04 2023 at 14:50):

https://github.com/zulip/zulip/issues/23976

I manage a Zulip organization where we discuss OpenStreetMap. OSM data model is based around key=value pairs called "tags". So when talking about OSM different key=value pairs are mention...

view this post on Zulip Rihards Olups (Sep 20 2023 at 09:46):

Vērtības ar kolu, piem., maxspeed:type=LV:urban , apgriež.

view this post on Zulip HellMap (Sep 20 2023 at 09:48):

Admini var pielikt, tur laikm burtiski \w uz [\w:]

view this post on Zulip i-ky (Sep 20 2023 at 10:51):

Rihards Olups said:

Vērtības ar kolu, piem., maxspeed:type=LV:urban , apgriež.

Tagad labāk?

view this post on Zulip HellMap (Sep 20 2023 at 10:54):

:=: :+1:

view this post on Zulip Rihards Olups (Sep 20 2023 at 11:07):

i-ky said:

Rihards Olups said:

Vērtības ar kolu, piem., maxspeed:type=LV:urban , apgriež.

Tagad labāk?

Ojē, super :)


Last updated: Dec 22 2024 at 05:29 UTC