Module version

This module helps with retrieving version information.

Functions

Version:getCurrentRevision () Returns current KOReader git-rev.
Version:getNormalizedVersion (rev) Returns normalized version of KOReader git-rev input string.
Version:getNormalizedCurrentVersion () Returns current version of KOReader.
Version:getShortVersion () Returns current version of KOReader, in short form.
Version:getBuildDate () Returns the release date of the current version of KOReader, YYYYmmdd, in UTC.
Version:getLastLogLine () Get last line in VERSION_LOG_FILE.
Version:appendToLogFile (text) Append text to a VERSION_LOG_FILE.
Version:updateVersionLog (model) Updates VERSION_LOG_FILE and keep the file small


Functions

Version:getCurrentRevision ()
Returns current KOReader git-rev.

Returns:

    string full KOReader git-rev such as v2015.11-982-g704d4238
Version:getNormalizedVersion (rev)
Returns normalized version of KOReader git-rev input string.

Parameters:

  • rev string full KOReader git-rev such as v2015.11-982-g704d4238

Returns:

  1. int version in the form of a 10 digit number such as 2015110982
  2. string short git commit version hash such as 704d4238
Version:getNormalizedCurrentVersion ()
Returns current version of KOReader.

Returns:

  1. int version in the form of a 10 digit number such as 2015110982
  2. string short git commit version hash such as 704d4238

See also:

Version:getShortVersion ()
Returns current version of KOReader, in short form.

Returns:

    string version, without the git details (i.e., at most YYYY.MM.P-R)
Version:getBuildDate ()
Returns the release date of the current version of KOReader, YYYYmmdd, in UTC. Technically closer to the build date, but close enough where official builds are concerned ;).

Returns:

    int date
Version:getLastLogLine ()
Get last line in VERSION_LOG_FILE.

Returns:

    last line in VERSION_LOG_FILE or an empty string
Version:appendToLogFile (text)
Append text to a VERSION_LOG_FILE.

Parameters:

  • text string text to be appended
Version:updateVersionLog (model)
Updates VERSION_LOG_FILE and keep the file small

Parameters:

  • model string device model (may contain spaces)
generated by LDoc 1.5.0 Last updated 2024-04-20 20:35:50