開放街圖標誌 OpenStreetMap 開放街圖

Rewriting a commonly used template for the wiki

於 2018年九月 4日 由 TigerfellEnglish發表。

I am currently planning to rewrite the Relation template for the OpenStreetMap-Wiki. You can find the current version along with its documentation in the wiki. In the following text I would like to outline the objections behind my proposed rewrite and invite you to participate.

Purpose of the template

  • common appearance and functionality (general goal of templates)
  • maintainability as the wiki markup is just saved once, so if a tool is obsoleted, it can be removed from the template
  • referring to relations in wiki articles
  • creating links to tools automatically
  • often used to document the mapping status of relations in wikitables

Reasons for a rewrite

  • This template is commonly used and causes many pages to exceed their page limits. You can see the effects of this on the bottom of the wiki page about Beijing buses.
  • Some of the tools featured in the template are not accessible anymore.
  • The default settings cause all tool links to appear, but this is often not desired by the editors.
  • The template’s code is hard to maintain as it is currently written in wiki markup including parser functions, thus not allowing line breaks or additional white spaces.

My suggestion

  • Rewriting this template using Lua, based on a forum discussion.
  • Changing its defaults regarding the appearance of tool links.
  • Dropping uncommonly used features.

A documentation of my proposed changes is located at osm.wiki/Module:Sandbox/Tigerfell/doc.

Please feel free to comment your suggestions here or into the forum thread already used.

電子郵件圖示 藍天圖示 Facebook 圖示 LinkedIn 圖示 乳齒象圖示 Telegram 圖示 X 圖示

討論

登入 來留下評論