LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to retrieve files from github in LabVIEW

Solved!
Go to solution

Hello All.

 

My question is NOT about using github for source control of vi's or LV projects.

 

I need to retrieve configuration files from github from within applications (.exe) developed in LabVIEW.

It resembles TestStand loading test sequences that are developed/maintained by a team - except I need this from within my apps because I do need to ensure that I always load "certified latest version" of config files.

 

As the main problem - and main use use/purpose of github is source control and ci/cd for code - I did not find anything.

 

Any clues, ideas, help?

 

Much appreciated.

 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
21st November 1905: E=mc² → and Physics would never be the same again...
0 Kudos
Message 1 of 6
(125 Views)
Solution
Accepted by GIC-SAGM

You could use system exec node to execute git commands from within labview.

Actor Framework
Message 2 of 6
(102 Views)

Simple and straightforward, of course, I hoped in a more "elegant" solution.

 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
21st November 1905: E=mc² → and Physics would never be the same again...
0 Kudos
Message 3 of 6
(55 Views)

Hi GIC,

 


@GIC-SAGM wrote:

Simple and straightforward, of course, I hoped in a more "elegant" solution.


Encapsulate the SysExec calls inside our own VIs (library) to provide a "more elegant" solution…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(47 Views)

This is not specifically for github, but simply for programmatic control of git on your system. It's also using the command line and while this may not seem sexy for Windows users (and the creation of a separate process is indeed a bit expensive under Windows), this is by far the most easy way to integrate other tools into your workflow. Under Unix, it is in fact THE standard.

 

If you want to access github directly you would have to read into what their, most likely REST based, web API is and implement it by using the JKI Rest Web Client library or something along those lines. Most likely this is however a path of pain and regret. Web APIs tend to be not that stable, require always some form of authentication or API key, that may have to be refreshed regularly, and in general will cause your perfectly working solution today to fail next year for unobvious reasons.

Rolf Kalbermatter
My Blog
Message 5 of 6
(39 Views)

Thanks Rolf.

 

Hampel solution seems quite nice.

 

And you're right, KISS is always the best solution (but, as someone said, not simpler 😉)

 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
21st November 1905: E=mc² → and Physics would never be the same again...
0 Kudos
Message 6 of 6
(30 Views)