11-04-2019 09:01 AM
Hi there,
I love the power of NI Package Manager based on my limited experimentation thus far. I'm working to move our TestStand deployment methods to leverage NIPM.
However... Can someone please put the manual on a web page?
I know that this link exists, but it just tells me to refer to the help command. (Which is pretty darned good, by the way... but not perfect.)
Here's what brought me to ask for this today:
I was trying to filter on a package using the info-installed option.
c:\Program Files\National Instruments\NI Package Manager>nipkg help info-installed info-installed - Show attributes for installed packages nipkg info-installed [OPTIONS]... [GLOB] Show attributes for installed packages. [GLOB] - A regular expression used to match against the name of the package. If not specified, it will return all possible matches. OPTIONS --suppress-incompatibility-errors Suppress forward incompatibility errors. WARNING: Suppressing errors could leave your system in an unusable state. GLOBAL OPTIONS --config=[PATH],-c=[PATH] Allows the caller to specify an absolute path to a custom configuration file. ALIASES info_installed
Okay great - I'll just use a regex to find my package containing the word "foo":
c:\Program Files\National Instruments\NI Package Manager>nipkg info-installed foo c:\Program Files\National Instruments\NI Package Manager>
Bummer. Okay, it's looking for a real regular expression.
c:\Program Files\National Instruments\NI Package Manager>nipkg info-installed .+foo.+ c:\Program Files\National Instruments\NI Package Manager>
Ahh, it must need quotes:
c:\Program Files\National Instruments\NI Package Manager>nipkg info-installed ".+foo.+" c:\Program Files\National Instruments\NI Package Manager>
Maybe I'm overthinking this:
c:\Program Files\National Instruments\NI Package Manager>nipkg info-installed "foo" c:\Program Files\National Instruments\NI Package Manager>
Oh, wait - maybe they mean a gimpy "regular expression"
c:\Program Files\National Instruments\NI Package Manager>nipkg info-installed *foo* Architecture: windows_all CompatibilityVersion: 190506 Description: foo test system components Use this package to install foo components on a new test system. . Filename: \\?\C:\Temp\output/foo-lv17-ts17-new-station-setup_1.0.0_windows_all.nipkg MD5sum: 6e1dc35410f0ccf4ccb2241a4f5bc945 Maintainer: Mr. Jim <noway@imgonnapostit.com> Package: foo-lv17-ts17-new-station-setup Plugin: file Provides: foo-lv17-ts17-new-station-setup (= 1.0.0) Size: 78009006 SourceFeed: file:// Version: 1.0.0
This is a case when a short example would have been really helpful, which is why I'm asking for that sort of thing online?
(Okay, I've completely beat this one to death.)
Thanks for this great product, though!
Mr. Jim
08-15-2021 06:46 AM
Correct me if I'm wrong, but nipkg is not really supporting regular expressions but rather Windows-like pattern matching, namely "*" and "?".
08-19-2021 02:33 PM
FWIW, a develop mentioned that we perform command-line matching using an implementation of fnmatch that likely supports the same syntax as this python module. A little more powerful than Windows console pattern matching, however definitely not a full regex. We will look at updating documentation in the future. Thanks!