Wikiup:Lua/Modul/CoordParse/en

aus Wikipedia, der freien Enzyklopädie
Vorlagenprogrammierung Diskussionen Lua Unterseiten
Modul Deutsch English

Modul: Dokumentation

PageTree – Module for parsing and validation of (geo) coordinates.

Functions for templates

feed
Parse single string
fragments
Process four components
  • 1 – degree
  • 2(optional) minutes
  • 3(optional) seconds
  • 4(optional) direction (N, E, S, W usw.)
  • latitude1 = Breitenkoordinate, sonst Länge
  • parameters for direction configuration
  • parameters for error management
failsafe
Version management

{{Wikipedia:Lua/Modul-Failsafe/en|Modul=CoordParse}}

Functions for Lua modules (API)

Some functions described above can be used by other modules:

local lucky, CoordParse = pcall( require, "Module:CoordParse" )
if type( CoordParse ) == "table" then
    CoordParse = CoordParse()
else
    -- failure; CoordParse is the error message
    return "<span class='error'>" .. CoordParse .. "</span>"
end
Expr.failsafe( atleast )
(see above)

Usage

General library; no limitations.

Dependencies