VersionMgr

version 0.9.11 – 2021-10-07 – Author : Jean-François Nifenecker, Bordeaux.

A version management tool for LibreOffice documents

VersionMgr helps maintaining a consistent versioning scheme for your documents:

The Toolbar | The Main Dialog | The numbering scheme | Masks Items | Metadata | The Locale | Credits | Author | License

The Toolbar

VersionMgr has a dedicated toolbar that contains three buttons to access its three functionalities (from left to right):

Edit: Set the version information for the current document by calling the main dialog.

Delete: Erase all version information from the current document (asks for confirmation).

Save: Quick save of the current document with auto-increment (only useful when you’ve set the version number auto-increment option).

The toolbuttons icons are from IconDB (https://www.iconsdb.com/) and are freely usable.

The Main Dialog

This dialog helps setting the version information. The following settings are available:

Edit

Contents

Notes

Author name

The author name.

This information can be an arbitrary name, or retrieved from the user data.

Version #

The version number.

Made of three parts :

  • the major version number (0-999).

  • the minor version number (0-999).

  • the revision number (0-9999).

(current numbering settings)

Displays the numbering settings.

From top to bottom: major version / minor version / revision.

A letter by level:

N : number; M : uppercase letter ; m: lowercase letter.

[+1] : auto-increment for a given level if any, otherwise nothing.

Numbering scheme button

Access to the numbering scheme dialogue.


Build ID

The « build » value.

Any arbitrary suite of characters (max. 64 chars).

The build ID may be added to the file name, using the %%B mask.

See the mask items below.

Date

Any date.

The Auto-inc selection implies automatic date updates when saving using the Save button .

Comments

Arbitrary comments for your own use.

Max. 464 characters (8 rows of 58).

File root name

The root name for the document.

This information is mandatory!

This edit label is displayed in red when the root name is not set.

File mask

The file mask for the document.

A preview is displayed below the edit box.

See the mask items below.

This edit label is displayed in red when the mask doesn’t contain the %%F sub-mask (document root name).

Title mask

The document title mask.

A preview is displayed below the edit box.

See the mask items below.

Max. 100 characters.

Leave empty if you don’t want the title to be set by the version manager.

The dialog has five buttons:

The numbering scheme

This dialogue allows for numbering mode and auto-inc step selection.

Item

Contents

Notes

Major Version

Minor Version

Revision

Numbering type selection, among:

  • Number

  • Uppercase letter

  • Lowercase letter


Increment: Type

Select the wanted auto-incrementation level.

Possible values:

  • (none)

  • Revision

  • Minor version

  • Major version

The version manager automatically updates the version number and date every time you click its Save button.

Auto-inc progresses according to the defined step. When the maximum value is reached, it is set to 0 and the next level is in turn incremented. The lower levels are reset to 0.

The auto-inc functionality is only available through the version manager Save button.

Note that then, the version date is also updated to the current one.

Increment: Step

The increment step.

1..10

Masks Items

The document name and title can automatically be set using masks. The following masks items are supported.

Mask

Use to insert…

%%A or %%a

The author name (as per the Author setting of the dialogue), uppercase (%%A) or lowercase (%%a).

See also %%I.

%%B

The build value.

%%D

Date, in ISO format (YYYYMMDD).

%%F

The file root name.

This sub-mask is mandatory in the file root name mask.

%%I or %%i

User initials, uppercase (%%I) or lowercase (%%i).

As defined in the LibreOffice Tools > Options, User data options.

See also %%A.

%%M

Major version number.

If you insert 0 (zeroes) between %% and M, the value is padded to that length with zeroes.

Example : value 5 with a mask of %%00M gives 05.

%%m

Minor version number.

If you insert 0 (zeroes) between %% and m, the value is padded to that length with zeroes.

Example : value 5 with a mask of %%000m gives 005.

%%N or %%n

User full name, uppercase (%%N) or lowercase (%%n).

As defined in the LibreOffice Tools > Options, User data options.

%%R

Revision number.

If you insert 0 (zeroes) between %% and R, the value is padded to that length with zeroes.

Example : value 5 with a mask of %%0000R gives 0005.

Metadata

As a result of saving the dialog settings, you’ll find that these settings are stored as document metadata. Each setting is a property which name starts with _Version.

Using document properties allows that:

The Locale

VersionMgr is developed in English. The UI is designed to automatically adjust to the current LibreOffice environment localization. As of current version, only two UI locales are supported : English, as the default fall-back language, and French, my mother language.

Language localization is made available through PO files (https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html) (for the UI) and an HTML help file (for help). Thus adding other languages is easy.

The PO files are stored into the extension po subdir. HTML help files are stored in the extension help subdir. The localized files are automatically selected when they fit the current locale, otherwise English is the UI fallback language.

Creating a new PO file

  1. Open the .pot template text file provided (en.pot).

  2. Edit it using any text editor and fill the msgstr strings (do not touch to the msgid’s!).

  3. Save as a xx.po file, where xx stand for the language 2-chars code (en : English, de : German, etc.)

  4. Copy it to the po sub dir and that’s it. At the next start, the UI should be adjusted to your strings.

Do not forget to send the author the released PO file. You’ll be credited for that in this help page.

Creating a new Help file

  1. Open the HTML help English version (help_en.html).

  2. Translate it into your language of choice.

  3. Name it accordingly : help_xx.html, where xx stand for the language 2-chars code (en : English, it : Italian, etc.)

  4. Place it in the help directory and that’s all about it. At the next start, the help should be adjusted to your new page.

Do not forget to send the author the released HTML file. You’ll be credited for that in this help page.

Credits

Author

Jean-Francois Nifenecker, Bordeaux (France)

jean-francois.nifenecker@laposte.net

Tests and suggestions

A big thank you to the testers panel. Many of them have preferred to stay anonymous. Thanks to Philippe Hemmel and Éric Hoffmann.

Icons

The icons are from the IconDB web site : https://www.iconsdb.com/

Translations

(currently none)

History

Version

Date

Notes

0.9.11

2020-10-07

First public version.

License

VersionMgr is released under the GNU GPL v3 license and above. More information here:

https://www.gnu.org/licenses/gpl-3.0.en.html

Heckert gnu.small.png