Skip to content

Commit b6ef09d

Browse files
authored
fill out readme a bit, add CI build status icons
1 parent 5eddc4e commit b6ef09d

File tree

1 file changed

+23
-11
lines changed

1 file changed

+23
-11
lines changed

readme.md

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
[![Build status](https://ci.appveyor.com/api/projects/status/bvfw8fsuy2tt27tl?svg=true)](https://ci.appveyor.com/project/dylemma/codedx-cli-client)
2+
[![Build status](https://api.travis-ci.org/codedx/codedx-cli-client.svg?branch=master)](https://travis-ci.org/codedx/codedx-cli-client)
3+
4+
15
This is a utility intended to make it easier to interact with
26
[Code Dx's REST API](https://codedx.com/Documentation/APIGuide.html) from the command line.
37

@@ -8,6 +12,11 @@ Currently only a couple API actions are supported, but more may come with demand
812
The program runs as a [REPL](https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop).
913
Start it by providing the connection information (Code Dx "base url", and username+password or API Key):
1014

15+
```text
16+
$> ./codedx-client https://localhost/codedx -u johndoe -p supersecret
17+
codedx>
18+
```
19+
1120
```text
1221
$> ./codedx-client https://localhost/codedx --api-key 8e218b38-fcdd-453d-8f78-185f7d1d9fa7
1322
codedx>
@@ -17,6 +26,20 @@ Once in the REPL, type `help` (and hit Enter) for a list of commands.
1726
You can exit the REPL by typing `exit` or `quit`, or with <kbd>Ctrl+C</kbd> or sending an EOF signal.
1827
You can learn more about a command by typing `help <command name>` e.g. `help analyze`.
1928

29+
For any command that takes arguments, each argument should be space-separated.
30+
Arguments that contain spaces should be surrounded with quotes e.g. `'this is one argument'` or `"so is this"`.
31+
Arguments surrounded with quotes treat backslash (`\`) as an escape character.
32+
This means if you have a quoted argument that has a backslash or another quote, it needs a backslash in front of it, e.g. `"a \"quote\" inside"` or `"C:\\my data\\source\\files.zip"`.
33+
34+
Note that you can usually get around needing to escape anything by being clever:
35+
- For file paths with backslashes, just use forward slashes (`/`) instead, e.g. `"C:/my data/source/files.zip"`.
36+
- For arguments with quotes in them, surround them with the other type of quote, e.g. `'a "quoted" string'`
37+
38+
If you see an error message like "The filename, directory name, or volume label syntax is incorrect.",
39+
you likely used backslashes (`\`) without escaping them (`\\`) inside a quoted argument.
40+
41+
# Example
42+
2043
You're probably here because you're trying to configure your CI environment to send files to Code Dx for analysis.
2144
For this, you'll want the `analyze` command.
2245
You can find more details about the `analyze` command by entering `help analyze` in the REPL, but here's an example:
@@ -40,14 +63,3 @@ You can optionally set the name of the analysis with the `--name` flag.
4063
The `analyze` command saves the effort of putting together a complex `curl` request for the initial file upload,
4164
setting up a separate request to set an analysis name,
4265
and setting up a polling loop to wait for the analysis "job" to complete.
43-
44-
> A note about command arguments inside the REPL:
45-
>
46-
> Each argument is separated by a space. If the argument itself needs to have a space in it (e.g. for file paths),
47-
> you must surround it with quotes (single `'` or double `"`). Within a quoted argument, the backslash character (`\`)
48-
> is used as the "escape", e.g. so that if you have another quote or a backslash in the argument (common with windows
49-
> paths), you'll need to escape it e.g. `"C:\\path\\to\\some\\files.zip"` or just use forward slashes
50-
> e.g. `"C:/path/to/some/files.zip"`.
51-
>
52-
> If you see a message like "The filename, directory name, or volume label syntax is incorrect.", you likely used
53-
> backslashes (`\`) without escaping them (`\\`) inside a quoted argument.

0 commit comments

Comments
 (0)