Módulo discusión:Ficha de software

Último comentario: hace 2 años por Ahecht en el tema Version sorting

Version type P548 editar

(sorry for English, please discuss in the language of your convenience)

When displaying the version list, the module filters stable versions (d:P548). However, a release/version might be both, stable (d:Q2804309) and a bug-fix release (d:Q55567596). This causes the version list at Opencast to end at 10.6 (not inlcuding 10.7 to 10.9 for instance). Rillke (discusión) 21:10 16 feb 2022 (UTC)Responder

Version sorting editar

(sorry for English, please discuss in the language of your convenience)

Sorting is done by string comparison. So for [1.0.0,2.0.0,...,11.0.0] you'll get [9.0.0,8.0.0,..,2.0.0,11.0.0,10.0.0,1.0.0]. A possible version comparison function is defined on geeksforgeeks or version.lua (docs). Rillke (discusión) 21:18 16 feb 2022 (UTC)Responder

Rillke I replied at en:Wikipedia:Village pump (technical)#Pipe parameter without matching whitetext, but the following function should work:
function paddedcompare(a, b)
  local function zeropad(s)
    local o = ""
    for v in string.gmatch(s, "(%d*%D*)") do
      if tonumber(string.match(v, "(%d*)")) then
        o=o..string.format('%08d', tonumber(string.match(v, "(%d*)")))..(string.match(v, "(%D+)") or '')
      else
        o=o..v
      end
    end
    return o
  end
  return zeropad(a) < zeropad(b)
end

table.sort(t, paddedcompare)
Ahecht (discusión) 15:53 17 feb 2022 (UTC)Responder

Beta version filtering and display editar

(sorry for English, please discuss in the language of your convenience)

A beta release is a fact documented on Wikidata. If a software project decides to drop beta releases, the last beta version will be displayed forever. This, however can be easily overridden by setting the accoring parameter |última_versión_prueba= in the template using the module, so not a big deal. Rillke (discusión) 21:22 16 feb 2022 (UTC)Responder

Volver a la página «Ficha de software».