https://de.wikipedia.org/w/index.php?action=history&feed=atom&title=Wikipedia%3ALua%2FModul%2FCoordParse%2Fen Wikipedia:Lua/Modul/CoordParse/en - Versionsgeschichte 2025-05-04T08:12:25Z Versionsgeschichte dieser Seite in Wikipedia MediaWiki 1.44.0-wmf.27 https://de.wikipedia.org/w/index.php?title=Wikipedia:Lua/Modul/CoordParse/en&diff=226133406&oldid=prev PerfektesChaos: Setup 2022-09-13T14:36:39Z <p>Setup</p> <p><b>Neue Seite</b></p><div>{{LuaModuleDoc}}<br /> &lt;onlyinclude&gt;&#039;&#039;&#039;&lt;code&gt;PageTree&lt;/code&gt;&#039;&#039;&#039; – Module for parsing and validation of (geo) coordinates.<br /> <br /> == {{Anker|template}} Functions for templates ==<br /> <br /> ; feed {{Anker|feed}}<br /> : Parse single string<br /> :* &#039;&#039;&#039;1&#039;&#039;&#039; – coordinate value, to be parsed<br /> :* &#039;&#039;&#039;latitude&#039;&#039;&#039; – &lt;code&gt;1&lt;/code&gt; = latitude, else longitude<br /> :* parameters for [[#compass|direction configuration]]<br /> :* parameters for [[#errorMgmt|error management]]<br /> ; fragments {{Anker|fragments}}<br /> : Process four components<br /> :* &#039;&#039;&#039;1&#039;&#039;&#039; – degree<br /> :* &#039;&#039;&#039;2&#039;&#039;&#039; – &#039;&#039;(optional)&#039;&#039; minutes<br /> :* &#039;&#039;&#039;3&#039;&#039;&#039; – &#039;&#039;(optional)&#039;&#039; seconds<br /> :* &#039;&#039;&#039;4&#039;&#039;&#039; – &#039;&#039;(optional)&#039;&#039; direction (&lt;code&gt;N&lt;/code&gt;, &lt;code&gt;E&lt;/code&gt;, &lt;code&gt;S&lt;/code&gt;, &lt;code&gt;W&lt;/code&gt; usw.)<br /> :* &#039;&#039;&#039;latitude&#039;&#039;&#039; – &lt;code&gt;1&lt;/code&gt; = Breitenkoordinate, sonst Länge<br /> :* parameters for [[#compass|direction configuration]]<br /> :* parameters for [[#errorMgmt|error management]]<br /> ; failsafe {{Anker|failsafe}}<br /> : Version management<br /> {{Wikipedia:Lua/Modul-Failsafe/en|Modul=CoordParse}}<br /> &lt;/onlyinclude&gt;<br /> == {{Anker|Lua}} Functions for Lua modules (API) ==<br /> Some functions described above can be used by other modules:<br /> &lt;syntaxhighlight lang=&quot;lua&quot;&gt;<br /> local lucky, CoordParse = pcall( require, &quot;Module:CoordParse&quot; )<br /> if type( CoordParse ) == &quot;table&quot; then<br /> CoordParse = CoordParse()<br /> else<br /> -- failure; CoordParse is the error message<br /> return &quot;&lt;span class=&#039;error&#039;&gt;&quot; .. CoordParse .. &quot;&lt;/span&gt;&quot;<br /> end<br /> &lt;/syntaxhighlight&gt;<br /> <br /> ; Expr.[[#failsafe|failsafe]]( atleast )<br /> : &#039;&#039;(see above)&#039;&#039;<br /> <br /> == Usage ==<br /> General library; no limitations.<br /> <br /> == Dependencies ==<br /> * [{{canonicalurl:Special:MyLanguage/Wikipedia:Lua/Modul/Expr}} Expr]<br /> <br /> [[Kategorie:Wikipedia:Lua/Modul/Dokumentation|CoordParse/en]]</div> PerfektesChaos