Command Line Usage¶
- Author:
Stefan Eletzhofer
- Date:
2012-05-16
Abstract¶
For convenience and to show example usage, we’ve included a command line tool which offers command line access to the windchill API over the nexiles.tools.api client.
Basic Usage¶
After installation – see Installation – the setup script should have the nxtools script installed.
The nxtools script uses subcommands – i.e. the general syntax is:
$ nxtools [options] command [command options]
Each command has it’s own options and help, which may be accessed using:
$ nxtools command -h
Synopsis¶
usage: nxtools [-h] [-d] [-l LOGFILE] [-u USERNAME] [-p PASSWORD] [-U URL]
[-X] [-v]
{content-add,checkout,checkin,list,undo-checkout,content-list,content-delete}
...
positional arguments:
{content-add,checkout,checkin,list,undo-checkout,content-list,content-delete}
optional arguments:
-h, --help show this help message and exit
-d, --debug
-l LOGFILE, --logfile LOGFILE
-u USERNAME, --username USERNAME
the user name to use
-p PASSWORD, --password PASSWORD
the password
-U URL, --url URL windchill api url
-X, --post-mortem enable post-mortem pdb on exception
-v, --verbose more verbose output -- causes more requests to be
made.
-V, --version Print server side version and exit
Passwords¶
The nxtools CLI programm uses authenticated communication to talk to Windchill. It uses username and password defaults by reading WTUSER and WTPASS system environment vars.
General Options¶
- -h
- Default:
off
- Required:
no
- Type:
flag
Print help
- -d
- Default:
off
- Required:
no
- Type:
flag
enable debug mode
- -l LOGFILE
- Default:
uses stderr
- Required:
no
- Type:
string
Specify a log file. If not specified, the tool will use stderr
- -u USERNAME REQUIRED
- Default:
None
- Required:
yes
- Type:
string
Specify the user name to use for authentication.
- -p PASSWORD REQUIRED
- Default:
None
- Required:
yes
- Type:
string
Specify the password to use for authentication.
- -U URL REQUIRED
- Default:
None
- Required:
yes
- Type:
URL
Specify the windchill base URL
Common Options¶
These options are common to all the commands and have the same meaning in every command.
- –name NAME
- Default:
None
- Required:
depends on query type
- Type:
string
Specifies the name for a query. May contain a wild card. see Example
- –number NUMBER
- Default:
None
- Required:
depends on query type
- Type:
string
Specifies the number for a query. May contain a wildcard. see Example
- –limit limit
- Default:
100
- Required:
No
- Type:
number
Specifies the limit for a query, must be a number. see Example
- –type RESOURCE TYPE
- Default:
document
- Required:
No
- Type:
string
Specifies resource type to operate on. see Resources
- –oid OID
- Default:
None
- Required:
depends on command
- Type:
string OID
Specifies the OID of a business object.
Configuration file¶
The command line tool consults a configuration file in ~/.nxtools/default.ini for run-time configuration options.
This file and directory will be created if not found.
Example configuration file:
[nxtools]
verbose=true
; to enable logging to a file set this to a path
logfile=nxtools.log
; logging level
loglevel = info
; to enter the post-mortem debugger on exceptions
; set this to true
post-mortem = false
Configuration Options¶
- verbose
- Type:
boolean
- Purpose:
the default of the –verbose command line option
- default-url
- Type:
URL
- Purpose:
the default for the –url option.
- default-type
- Type:
resource type string – see Resources
- Purpose:
the default for the –type option.
- logfile
- Type:
file system path
- Purpose:
The filename to use for logging. If not set, stdout is used.
- loglevel
- Type:
error | warning | info | debug
- Purpose:
the log level to use for logging.
- post-mortem
- Type:
boolean
- Purpose:
the default of the –post-mortem command line option.
Command: list¶
- Valid Resources:
all
This command can be used to query for and list business objects.
Synopsis¶
usage: nxtools list [-h] [--name NAME] [--number NUMBER] [--type TYPE]
[--limit LIMIT] [--state STATE] [--latest-released]
[--latest-iteration LATEST_ITERATION]
optional arguments:
-h, --help show this help message and exit
--name NAME
--number NUMBER
--type TYPE
--limit LIMIT
--state STATE
--latest-released
--latest-iteration LATEST_ITERATION
- –latest-iteration
- Default:
None
- Required:
no
- Type:
boolean
If specified, the query uses a optional filter for the LATEST_ITERATION column of business objects.
- –latest-released
- Default:
None
- Required:
no
- Type:
flag
A shorthand for –latest-iteration yes –state ‘RELEASED’
Example¶
Query for documents – e.g. EPMDocument business objects, limit the query to 10 results:
$ nxtools -u user -p pass -U http://example.com/Windchill list \
--type epmdocument --limit 10 --name "din9*"
10 results
nr name OID state version
--------------------------------------------------------------------------------------------
000: din908.prt OR:wt.epm.EPMDocument:37004211 INWORK -.7
001: din908.prt OR:wt.epm.EPMDocument:36929653 INWORK -.6
002: din908.prt OR:wt.epm.EPMDocument:36190182 INWORK -.4
003: din908.prt OR:wt.epm.EPMDocument:36184542 INWORK -.3
004: din908.prt OR:wt.epm.EPMDocument:36241978 INWORK -.5
005: din908.prt OR:wt.epm.EPMDocument:19772355 INWORK -.2
006: din908.prt OR:wt.epm.EPMDocument:47313257 INWORK -.10
007: din908.prt OR:wt.epm.EPMDocument:47429982 INWORK -.11
008: din908.prt OR:wt.epm.EPMDocument:46950452 INWORK -.8
009: din908.prt OR:wt.epm.EPMDocument:47084978 INWORK -.9
Same query, but show only the latest released versions:
$ nxtools -u user -p pass -U http://example.com/Windchill list \
--type epmdocument --limit 10 --latest-released --name "din9*"
10 results
nr name OID state version
--------------------------------------------------------------------------------------------
000: din908.prt OR:wt.epm.EPMDocument:55260152 RELEASED -.20
001: din910.prt OR:wt.epm.EPMDocument:53151967 RELEASED -.14
002: din913.prt OR:wt.epm.EPMDocument:49200190 RELEASED -.7
003: din915.prt OR:wt.epm.EPMDocument:49211707 RELEASED -.15
004: din915_m10x12.prt OR:wt.epm.EPMDocument:49211706 RELEASED -.15
005: din915_m10x16.prt OR:wt.epm.EPMDocument:49211703 RELEASED -.15
006: din915_m10x20.prt OR:wt.epm.EPMDocument:49211701 RELEASED -.15
007: din915_m10x25.prt OR:wt.epm.EPMDocument:49211704 RELEASED -.15
008: din915_m10x30.prt OR:wt.epm.EPMDocument:49211709 RELEASED -.15
009: din915_m10x35.prt OR:wt.epm.EPMDocument:49211705 RELEASED -.15
List all users – up to 100 entries (default limit):
$ nxtools -u user -p pass -U http://example.com/Windchill list --type user
100 results
nr name OID
---------------------------------------------------------------------------
000: trainpart08 OR:wt.org.WTUser:30080482
001: z002333y OR:wt.org.WTUser:30811855
002: opc922 OR:wt.org.WTUser:31441920
003: op2842 OR:wt.org.WTUser:31441929
004: autotest1 OR:wt.org.WTUser:31924313
005: op0148 OR:wt.org.WTUser:35979264
006: op0170 OR:wt.org.WTUser:35979280
007: op0364 OR:wt.org.WTUser:35979296
...
094: nb3a83s0 OR:wt.org.WTUser:35977704
095: nb306320 OR:wt.org.WTUser:35977944
096: nb301200 OR:wt.org.WTUser:35977712
097: nb3a8ak0 OR:wt.org.WTUser:35978192
098: nb3a2an0 OR:wt.org.WTUser:35978400
099: nb306530 OR:wt.org.WTUser:35978104
Commands: checkin, checkout and undo-chekout¶
- Valid Resources:
document, part, epmdocument
The nxtool subcommands below enable the user to iterate Windchill business objects.
Synopsis¶
checkin command:
usage: nxtools checkin [-h] --oid OID --message MESSAGE [--type TYPE]
optional arguments:
-h, --help show this help message and exit
--oid OID
--message MESSAGE
--type TYPE
checkout command:
usage: nxtools checkout [-h] --oid OID --message MESSAGE [--type TYPE]
optional arguments:
-h, --help show this help message and exit
--oid OID
--message MESSAGE
--type TYPE
undo-checkout command:
usage: nxtools undo-checkout [-h] --oid OID [--type TYPE]
optional arguments:
-h, --help show this help message and exit
--oid OID
--type TYPE
Options¶
- –message MESSAGE
- Default:
None
- Required:
yes
- Type:
string
Specifies the message for check-in and check-out operations. The message will be visible in the iteration history of the Windchill UI.
Example¶
Check out a EPMDocument:
$ nxtools checkout --oid OR:wt.epm.EPMDocument:149070323 --type epmdocument --message foo
current iteration: l41__b_in_reactor_dn0000001.asm -.5 INWORK (L41__B_IN_REACTOR_DN0000001.ASM ) OR:wt.epm.EPMDocument:149070323
new iteration: l41__b_in_reactor_dn0000001.asm -.5 INWORK (L41__B_IN_REACTOR_DN0000001.ASM ) OR:wt.epm.EPMDocument:149077587
checkout complete.
Check in a EPMDocument:
$ nxtools checkin --oid OR:wt.epm.EPMDocument:149077587 --type epmdocument --message "bar baz buz"
current iteration: l41__b_in_reactor_dn0000001.asm -.5 INWORK (L41__B_IN_REACTOR_DN0000001.ASM ) OR:wt.epm.EPMDocument:149077587
new iteration: l41__b_in_reactor_dn0000001.asm -.6 INWORK (L41__B_IN_REACTOR_DN0000001.ASM ) OR:wt.epm.EPMDocument:149077587
check in complete.
After a check-out, you’re able to undo the check out. For this, you need to give the undo-checkout command the OID you got as a result of the checkout command. There result of the undo-checkout operation is the OID of the checkout command:
$ nxtools checkout --oid OR:wt.epm.EPMDocument:149077587 --type epmdocument --message "checkout"
current iteration: l41__b_in_reactor_dn0000001.asm -.6 INWORK (L41__B_IN_REACTOR_DN0000001.ASM ) OR:wt.epm.EPMDocument:149077587
new iteration: l41__b_in_reactor_dn0000001.asm -.6 INWORK (L41__B_IN_REACTOR_DN0000001.ASM ) OR:wt.epm.EPMDocument:149079636
checkout complete.
$ nxtools undo-checkout --oid OR:wt.epm.EPMDocument:149079636 --type epmdocument current iteration: l41__b_in_reactor_dn0000001.asm -.6 INWORK (L41__B_IN_REACTOR_DN0000001.ASM ) OR:wt.epm.EPMDocument:149079636
new iteration: l41__b_in_reactor_dn0000001.asm -.6 INWORK (L41__B_IN_REACTOR_DN0000001.ASM ) OR:wt.epm.EPMDocument:149077587
checkout reverted.
Command: content-list¶
- Valid Resources:
document, part, epmdocument
This command is used to list content-items of a business object.
Synopsis¶
usage: nxtools content-list [-h] [--oid OID] [--type TYPE] [--role ROLE]
optional arguments:
-h, --help show this help message and exit
--oid OID
--type TYPE
--role ROLE
If no role argument is given, lists all content items.
Options¶
- –role ROLE
- Default:
None
- Required:
no
- Type:
string role
Specifies the role of the content item. This can be one of:
PRIMARY
SECONDARY
THUMBNAIL
THUMBNAIL_SMALL
THUMBNAIL3D
Example¶
List all secondary content items of a document:
$ nxtools -u user -p pass -U http://example.com/Windchill content-list --oid OR:wt.doc.WTDocument:4711 --role SECONDARY
8 results
nr role filename URL
---------------------------------------------------------------------------
000: SECONDARY licenses-1.rst http://example.com/Windchill/servlet/WindchillAuthGW/wt.content.ContentHttp/viewContent/licenses-1.rst?u8&HttpOperationItem=wt.content.ApplicationData%3A149049622&ContentHolder=wt.doc.WTDocument%3A149049620&originalFileName=licenses-1.rst&forceDownload=true
001: SECONDARY licenses-2.rst http://example.com/Windchill/servlet/WindchillAuthGW/wt.content.ContentHttp/viewContent/licenses-2.rst?u8&HttpOperationItem=wt.content.ApplicationData%3A149049625&ContentHolder=wt.doc.WTDocument%3A149049620&originalFileName=licenses-2.rst&forceDownload=true
002: SECONDARY licenses-3.rst http://example.com/Windchill/servlet/WindchillAuthGW/wt.content.ContentHttp/viewContent/licenses-3.rst?u8&HttpOperationItem=wt.content.ApplicationData%3A149049624&ContentHolder=wt.doc.WTDocument%3A149049620&originalFileName=licenses-3.rst&forceDownload=true
003: SECONDARY licenses-4.rst http://example.com/Windchill/servlet/WindchillAuthGW/wt.content.ContentHttp/viewContent/licenses-4.rst?u8&HttpOperationItem=wt.content.ApplicationData%3A149049623&ContentHolder=wt.doc.WTDocument%3A149049620&originalFileName=licenses-4.rst&forceDownload=true
004: SECONDARY licenses-5.rst http://example.com/Windchill/servlet/WindchillAuthGW/wt.content.ContentHttp/viewContent/licenses-5.rst?u8&HttpOperationItem=wt.content.ApplicationData%3A149049628&ContentHolder=wt.doc.WTDocument%3A149049620&originalFileName=licenses-5.rst&forceDownload=true
005: SECONDARY licenses-6.rst http://example.com/Windchill/servlet/WindchillAuthGW/wt.content.ContentHttp/viewContent/licenses-6.rst?u8&HttpOperationItem=wt.content.ApplicationData%3A149049626&ContentHolder=wt.doc.WTDocument%3A149049620&originalFileName=licenses-6.rst&forceDownload=true
006: SECONDARY licenses-7.rst http://example.com/Windchill/servlet/WindchillAuthGW/wt.content.ContentHttp/viewContent/licenses-7.rst?u8&HttpOperationItem=wt.content.ApplicationData%3A149049629&ContentHolder=wt.doc.WTDocument%3A149049620&originalFileName=licenses-7.rst&forceDownload=true
007: SECONDARY licenses-8.rst http://example.com/Windchill/servlet/WindchillAuthGW/wt.content.ContentHttp/viewContent/licenses-8.rst?u8&HttpOperationItem=wt.content.ApplicationData%3A149049627&ContentHolder=wt.doc.WTDocument%3A149049620&originalFileName=licenses-8.rst&forceDownload=true
List all content items of a epmdocument:
$ nxtools -u user -p pass -U http://example.com/Windchill content-list --type epmdocument --oid OR:wt.epm.EPMDocument:45651056
3 results
nr role filename URL
---------------------------------------------------------------------------
000: PRIMARY k05_winding_assembly_000001.asm http://example.com/Windchill/servlet/WindchillAuthGW/wt.content.ContentHttp/viewContent/k05_winding_assembly_000001.asm?u8&HttpOperationItem=wt.content.ApplicationData%3A45654619&ContentHolder=wt.epm.EPMDocument%3A45651056&originalFileName=k05_winding_assembly_000001.asm&forceDownload=true
001: THUMBNAIL3D k05_winding_assembly_000000_asm.pvt http://example.com/Windchill/servlet/WindchillAuthGW/wt.content.ContentHttp/viewContent/k05_winding_assembly_000000_asm.pvt?u8&HttpOperationItem=wt.content.ApplicationData%3A45660560&ContentHolder=wt.epm.EPMDocument%3A45651056&originalFileName=k05_winding_assembly_000000_asm.pvt&forceDownload=true
002: THUMBNAIL k05_winding_assembly_000000_asm.jpg http://example.com/Windchill/servlet/WindchillAuthGW/wt.content.ContentHttp/viewContent/k05_winding_assembly_000000_asm.jpg?u8&HttpOperationItem=wt.content.ApplicationData%3A45660563&ContentHolder=wt.epm.EPMDocument%3A45651056&originalFileName=k05_winding_assembly_000000_asm.jpg&forceDownload=true
Command: content-add¶
- Valid Resources:
document, part, epmdocument
This command is used to add content-items of a business object.
For content items of role SECONDARY, the server will automatically rename the file if the same name already exists.
For content items of role PRIMARY, the server will refuse to upload a new object if one already exists – you must delete it first.
If –no-iterate is given, then no new iteration is made. For this to work, you must iterate the document yourself – see Commands: checkin, checkout and undo-chekout
Attention
The content file given MUST NOT exist already.
Synopsis¶
usage: nxtools content-add [-h] --oid OID [--type TYPE] [--role ROLE]
[--message MESSAGE] [--iterate] [--no-iterate]
[--mimetype MIMETYPE] --filename FILENAME
optional arguments:
-h, --help show this help message and exit
--oid OID the OID of the business object
--type TYPE the resource type
--role ROLE the content role {PRIMARY|SECONDARY|THUMBNAIL|...}
--message MESSAGE commit message
--iterate automatically iterate
--no-iterate do NOT iterate
--mimetype MIMETYPE the mime type to use
--filename FILENAME local file to upload
Options¶
see also Options
- –filename FILENAME
- Default:
None
- Required:
yes
- Type:
path to a existing file
The file to upload.
- –role FILENAME
- Default:
None
- Required:
yes
- Type:
PRIMARY|SECONDARY|THUMBNAIL
The content role for the new content object.
- –mimetype MIMETYPE
- Default:
None
- Required:
no
- Type:
string
The mime type for the new content item. The server will guess a mime type based on the filename if not specified.
- –iterate, –no-iterate
- Default:
–iterate
- Required:
no
- Type:
flag
Specify whether or not to create a new iteration.
- –message
- Default:
‘nxtools content add’
- Required:
no
- Type:
string
The commit message to use for the check-out and check-in.
Example¶
Create a new content item named foo.pdf using the local file foo.pdf:
$ nxtools -u user -p pass -U http://example.com/Windchill content-add --oid OR:wt.doc.WTDocument:4711 --role SECONDARY --filename foo.pdf
current iteration: mydocument -.1 INWORK (47110815 ) OR:wt.doc.WTDocument:4711
new iteration: mydocument -.2 INWORK (47110815 ) OR:wt.doc.WTDocument:4712
content item upload complete.
Upload several content items, using a manual check-out and check-in:
$ nxtools -u user -p pass -U http://example.com/Windchill checkout --oid OR:wt.doc.WTDocument:149079698 --message "foo"
current iteration: nexiles.demo.app A.4 RELEASED (0000000461 ) OR:wt.doc.WTDocument:149079698
new iteration: nexiles.demo.app A.4 RELEASED (0000000461 ) OR:wt.doc.WTDocument:149083718
checkout complete.
$ nxtools -u user -p pass -U http://example.com/Windchill content-add --oid OR:wt.doc.WTDocument:149083718 --role SECONDARY --filename out.log --no-iterate
current iteration: nexiles.demo.app A.4 RELEASED (0000000461 ) OR:wt.doc.WTDocument:149083718
content item upload complete.
$ nxtools -u user -p pass -U http://example.com/Windchill content-add --oid OR:wt.doc.WTDocument:149083718 --role SECONDARY --no-iterate --filename docs/changelog.rst
current iteration: nexiles.demo.app A.4 RELEASED (0000000461 ) OR:wt.doc.WTDocument:149083718
content item upload complete.
$ nxtools -u user -p pass -U http://example.com/Windchill content-add --oid OR:wt.doc.WTDocument:149083718 --role SECONDARY --no-iterate --filename docs/introduction.rst
current iteration: nexiles.demo.app A.4 RELEASED (0000000461 ) OR:wt.doc.WTDocument:149083718
content item upload complete.
$ nxtools checkin --oid OR:wt.doc.WTDocument:149083718 --message "hallo ramon"
current iteration: nexiles.demo.app A.4 RELEASED (0000000461 ) OR:wt.doc.WTDocument:149083718
new iteration: nexiles.demo.app A.5 RELEASED (0000000461 ) OR:wt.doc.WTDocument:149083718
check in complete.
Notice how content-add does not create a new iteration, and also note the –no-iterate option.
Command: content-delete¶
- Valid Resources:
document, part, epmdocument
This command is used to delete content-items of a business object.
Note
This only works on the latest iteration of a business object.
Synopsis¶
usage: nxtools content-delete [-h] --oid OID [--type TYPE] [--role ROLE]
[--message MESSAGE] [--iterate] [--no-iterate]
--filename FILENAME
optional arguments:
-h, --help show this help message and exit
--oid OID the OID of the business object
--type TYPE the resource type
--role ROLE the content role {PRIMARY|SECONDARY|THUMBNAIL|...}
--message MESSAGE commit message
--iterate automatically iterate
--no-iterate do NOT iterate
--filename FILENAME name of the content item to delete
Options¶
see also Options
- –filename FILENAME
- Default:
None
- Required:
yes
- Type:
path to a existing file
The file name of the content item to delete. see Command: content-list
- –role ROLE
- Default:
None
- Required:
yes
- Type:
PRIMARY|SECONDARY|THUMBNAIL
The content role for the new content object.
- –iterate, –no-iterate
- Default:
–iterate
- Required:
no
- Type:
flag
Specify whether or not to create a new iteration.
- –message
- Default:
‘nxtools content delete’
- Required:
no
- Type:
string
The commit message to use for the check-out and check-in.
Example¶
Delete the content item named foo.pdf:
$ nxtools -u user -p pass -U http://example.com/Windchill content-delete --oid OR:wt.doc.WTDocument:4712 --role SECONDARY --filename foo.pdf
current iteration: mydocument -.2 INWORK (47110815 ) OR:wt.doc.WTDocument:4712
new iteration: mydocument -.3 INWORK (47110815 ) OR:wt.doc.WTDocument:4713
content item deleted.
Deleting content without automatic iterations is done similar to the example given in Example
Command: document-create¶
- Valid Resources:
document
This command allows the user to create new WTDocument business objects.
Parameters for the new document may be given on the command line or using a JSON file.
Synopsis¶
usage: nxtools document-create [-h] [--number NUMBER] [--name NAME]
[--container-name CONTAINER]
[--folder-path FOLDER]
[--description DESCRIPTION]
[--manifest MANIFEST]
optional arguments:
-h, --help show this help message and exit
--number NUMBER the number
--name NAME the name
--container-name CONTAINER
the name of the container (Product, Library) for the
document
--folder-path FOLDER the folder path in the container to store the document
--description DESCRIPTION
the description
--manifest MANIFEST read options from manifest JSON
Options¶
see also Options
- –container CONTAINER
- Default:
None
- Required:
yes
- Type:
string
The name of a Windchill container for the new object.
- –folder FOLDER
- Default:
None
- Required:
no
- Type:
string – folder path.
The path of a folder within the container. This MUST start with /Default – e.g. /Default/some/folder/path. The folders MUST exist, they’re not created.
- –description
- Default:
None
- Required:
no
- Type:
string
A description for the new object.
- –manifest
- Default:
None
- Required:
no
- Type:
path to manifest file in JSON format.
A file containing all the options for the new object.
Example¶
Create a WTDocument using command line options:
$ nxtools -u user -p pass -U http://example.com/Windchill document-create --number 4711-7 --name "test post 7" \
--container TestProduct --folder "/Default/apps" --description "foo"
created: test post 7 -.1 INWORK (4711-7 ) OR:wt.doc.WTDocument:149083989
Or using a manifest file. For example, consider this manifest file:
{
"number": "4711-1",
"name": "document_name",
"container": "TestProduct",
"folder": "/Default/apps",
"description": "A Test Document",
"attributes": {
"CUSTOMER": "nexiles",
"DESCRIPTION_GER": "foo bar baz"
},
"files": [
{"role": "PRIMARY", "file_path": "requirements.txt"},
{"role": "SECONDARY", "file_path": "README.rst"},
{"role": "SECONDARY", "file_path": "document_manifest.json", "mimetype": "application/json"}
]
}
Please notice how you can specify IBA Attributes and Content Files. To use this manifest file, specify the –manifest command line option:
$ nxtools -u user -p pass -U http://example.com/Windchill document-create --manifest document_manifest.json
created: document_name -.1 INWORK (4711-1 ) OR:wt.doc.WTDocument:149084025
Command: file-fetch¶
This command allows the user to download files from WTDocument resources by specifying name or number of the document and a filename.
See also Basic Usage
Synopsis¶
usage: nxtools file-fetch [-h] [--name NAME] [--number NUMBER]
[--filename FILENAME] [--destination DESTINATION]
optional arguments:
-h, --help show this help message and exit
--name NAME the name of the document
--number NUMBER the number of the document
--filename FILENAME the name of the file to download
--destination DESTINATION
the name of the local file
Options¶
- –name
- Default:
None
- Required:
no
- Type:
string
The name of a document. A query is made for this name, if more than one result is found, a error is printed.
- –number
- Default:
None
- Required:
no
- Type:
string
The number of a document. A error is returned and printed if this number can’t be found.
Example¶
Download file page_001.json from the document with number 0000000461:
$ nxtools file-fetch --number 0000000461 --filename page_001.json
$ cat page_001.json
...
The same as above, but specify a destination file name:
$ nxtools file-fetch --number 0000000461 --filename page_001.json --destination somefile.txt
$ cat somefile.txt
...
Again but this time we specify a document name instead of the number:
$ nxtools file-fetch --name documentname --filename page_001.json
$ cat page_001.json
...
Command: version¶
This command allows the user to fetch the version information of the server and client side tools.
See also Basic Usage
Synopsis¶
usage: nxtools version [-h] [--server-version] [--client-version]
optional arguments:
-h, --help show this help message and exit
--server-version
--client-version
Options¶
- –server-version
- Default:
None
- Required:
no
- Type:
flag
Print server side version and exit
- –client-version
- Default:
None
- Required:
no
- Type:
flag
Print client side version and exit
Example¶
Show Server version:
$ nxtools version --server-version
version: 1.3rc3 build: 341 date: 2012-09-20
Show Client version:
$ nxtools version --client-version
0.2dev