Labstache is a pure LabVIEW library for working with logic-free Mustache templates. Logic-less Mustache templates are a simple format using curly bracket delimiters ({{}}
) that works great with any text-based file, especially formats that use a markup language, such as HTML. This library enables LabVIEW developers to interact with and use Mustache templates.
A VI snippet of compiling, or rendering, a mustache template as a string into a string:
- LabVIEW 2014 or newer (All systems)
- Caraya
- HTML Help Workshop (for compiling the help documentation)
- JKI State Machine
- LabVIEW 2014 or newer (for building)
- LabVIEW 2018 or newer
- Labricator (only for automated builds, private package available upon request)
- OpenG Array Library
- OpenG File Library
- VIPM Pro (only for automated builds)
- VIPM API (only for automated builds)
The Caraya, JKI State Machine, OpenG Array Library, OpenG File Library, and VIPM API dependencies must be installed for all versions of LabVIEW (2014 and 2018) to avoid errors during automated builds.
A VI Package (VIP) is available at VIPM.io. The recommended installation instructions are to:
- Navigate to the Labstache package at VIPM.io.
- Click on the Install button to the right. The VI Package Manager (VIPM) (freely available from JKI) will start automatically.
- Follow the on-screen instructions to complete the installation.
Alternatively, the toolkit can be installed by: (i) downloading the source code and building the VIP, (ii) downloading a VIP from the releases section of this project, or (iii) manually copying the VIs from the source code into a project.
Each component in the Labstache project has a Source Distribution build specification. The destination of each source distribution build is the builds
folder relative to the project root, i.e. same folder as the Labstache.lvproj
file. Additionally, the output for the compiled help documentation is also the builds
folder. The builds
folder should not be included in the version control repository. A Build.vi
script is available in the Scripts.lvlib
project library that will build all of the components and the help documentation automatically (VIPM Pro is not needed, but the HTML Help Workshop is needed).
The VI Package Build (.vipb) specification, located in the configs
folder relative to the project root, is configured for the package source to be the builds
folder. Thus, the Source Distribution for each component must be built before opening the Labstache.vipb
file in the VIPM; otherwise, the package configuration will be lost.
Important, if creating a package for LabVIEW 2014 from LabVIEW 2018, the VI Server TCP/IP ports must be different for each version of LabVIEW and verified with the VIPM application before proceeding. An error will occur when the VIPM is started if both LabVIEW 2014 and 2018 are running at the same time. Basically, VIPM will not know which VI server to use if both versions of LabVIEW are using the same TCP/IP port.
If VIPM Pro is available, then open the Labstache.lvproj
file in any version of LabVIEW newer than 2014 and run the Package.vi
located in the Scripts.lvlib
project library of the Project Explorer window. Ensure all dependencies are installed before running the Package.vi
script.
Note, the version number for the package is set in the configs\Labstache.vipb
file. The version number in the VIP build specification file should be modified and saved before running the Package.vi
script.
If VIPM Pro is not available, then the following steps can be executed to do essentially the same thing as the Package.vi
script. Ensure all dependencies, except VIPM Pro and the VIPM API, are installed before completing these steps.
- Start LabVIEW 2018 or newer and open the
Labstache.lvproj
file. - From the Project Explorer window, File>>Save for Previous Version..., a new dialog will appear.
- Select 14.0 from the drop down menu.
- Click Save.... A new dialog will open.
- Create the
target\14.0
folder hierarchy in the project root, i.e. the same folder as theLabstache.lvproj
file, if it does not already exists. - Click Save.
- Close LabVIEW 2018 or newer and the
Labstache.lvproj
file. - Navigate to
<project root>\src
. - Copy the
Help
folder to<project root>\target\14.0\src
. - Start LabVIEW 2014.
- Open the
<project root>\target\14.0\Labstache.lvproj
file. Do NOT open the project in any other version of LabVIEW. - Open each Source Distribution build specification under the "Build Specifications" tree item in the Project Explorer and change the Output Destination to
<project root>\target\14.0\builds
. Save and close each build specification. - Run the
Build.vi
in theScripts
project library to build each Source Distribution under the "Build Specifications" tree item and the compiled help documentation file (Labstache.chm
). The output of each build will be available in<project root>\target\14.0\builds
. - Open the
<project root>\target\14.0\configs\Labstache.vipb
file in VIPM. - Build the VI package with VIPM. The output will be available at
<project root>\target\14.0\packages
. Do NOT modify anything in the package build specification, but ensure the "2014" version of LabVIEW is selected in the upper, right-hand corner of the VIPM application window. - Close VIPM.
- Close LabVIEW 2014 and the
<project root>\target\14.0\Labstache.lvproj
file.
See the in-app LabVIEW Help system for more information and documentation about using the library after it has been installed, or visit the web-based documentation. Examples are also available within the LabVIEW development environment using the "Help->Find Examples..." menu item.
Tests are written in LabVIEW using the Caraya unit testing framework and included in the project via the various Tests.lvlib
project libraries and the tests
on-disk folder. To run the tests, open the Labstache.lvproj
file found in the project root in the LabVIEW Development Environment and run the Test.vi
script located in the Scripts.lvlib
project library. This will run all of the tests defined in all of the various Tests.lvlib
project libraries located in the project.
Labstache is licensed under the MIT license. See the docs
folder for all information about licensing and copyright.