View source for Module:Convert/makeunits

MyWikiBiz, Author Your Legacy — Wednesday June 04, 2025
Jump to navigationJump to search

You do not have permission to edit this page, for the following reasons:

  • The action you have requested is limited to users in one of the groups: Users, vuser.
  • You must confirm your email address before editing pages. Please set and validate your email address through your user preferences.

You can view and copy the source of this page.

-- This module generates the wikitext required at Module:Convert/data
-- by reading and processing the wikitext of the master list of units
-- (see conversion_data for the page title).
--
-- Script method:
-- * Read lines, ignoring everything before "== Conversions ==".
-- * Process the following lines:
-- * Find next level-3 heading like "=== Length ===".
-- * Parse each following line starting with "|"
-- (but ignore lines starting with "|-" or "|}".
-- * Split such lines into fields (delimiter "||") and trim
-- leading/trailing whitespace from each field.
-- Remove any "colspan" at front of second field (symbol).
-- * Remove thousand separators (commas) from the scale field.
-- If the scale is a number, do not change it.
-- Otherwise, it should be an expression like "5/9", in
-- which case it is replaced by the value of the expression.
-- * Remove wiki formatting '[[...]]' from the link field.
-- * Remove redundant fields from the unit to reduce size of data table.
-- * Create alternative forms of a unit such as an alias or a combination.
-- * Stop processing when encounter end of text or a line starting
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
000
1:0
Debug console
* The module exports are available as the variable "p", including unsaved modifications. * Precede a line with "=" to evaluate it as an expression or use print(). Use mw.logObject() for tables. * Use mw.log() and mw.logObject() in module code to send messages to this console.

Template used on this page:

Return to Module:Convert/makeunits.