Skip to content

Commit 7cf5f85

Browse files
committed
[README] Add installation and usage details of scancode_cli analyzer
Signed-off-by: inishchith <[email protected]>
1 parent 11f75d0 commit 7cf5f85

File tree

1 file changed

+39
-7
lines changed

1 file changed

+39
-7
lines changed

README.md

Lines changed: 39 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,33 @@ For example, in Debian, likely you'll need:
4949
sudo apt-get install pkg-config libglib2.0-dev libjson-c-dev libpq-dev
5050
```
5151

52-
For compiling the tool (`nomossa`):
52+
- For compiling the tool (`nomossa`):
5353

54-
```
55-
$> git clone https://github.com/fossology/fossology
56-
$> cd <...>/fossology/src/nomos/agent
57-
$> make -f Makefile.sa FO_LDFLAGS="-lglib-2.0 -lpq -lglib-2.0 -ljson-c -lpthread -lrt"
58-
```
54+
```
55+
$> git clone https://github.com/fossology/fossology
56+
$> cd <...>/fossology/src/nomos/agent
57+
$> make -f Makefile.sa FO_LDFLAGS="-lglib-2.0 -lpq -lglib-2.0 -ljson-c -lpthread -lrt"
58+
```
5959

6060
- **ScanCode**
6161

62-
Follow the instructions on the [ScanCode](https://github.com/nexB/scancode-toolkit#installation) GitHub repository
62+
```
63+
git clone https://github.com/nexB/scancode-toolkit.git
64+
cd scancode-toolkit
65+
git checkout -b test_scancli 96069fd84066c97549d54f66bd2fe8c7813c6b52
66+
./scancode --help
67+
```
68+
69+
**Note**: We're now using a clone of scancode-toolkit instead of a release, as the latest release is of 15th February 2019 and the `scancli.py` script (required for execution of scancode_cli) was incroporated later i.e 5th March 2019 and there hasn't been a release since.
70+
71+
- **ScanCode Cli**
72+
73+
After successfully executing the above mentioned steps, (if required) we have to install python modules: `simplejson` and `execnet`, for the execution of `scancode_cli` analyzer.
74+
75+
```
76+
pip install simplejson execnet
77+
```
78+
6379

6480
## How to install/uninstall
6581
Graal is being developed and tested mainly on GNU/Linux platforms. Thus it is very likely it will work out of the box
@@ -111,6 +127,8 @@ The example below shows how easy it is to fetch code complexity information from
111127
requires the URL where the repository is located (_https://github.com/chaoss/grimoirelab-perceval_) and the local path
112128
where to mirror the repository (_/tmp/graal-cocom_). Then, the JSON documents produced are redirected to the file _graal-cocom.test_.
113129

130+
- **CoCom Backend**
131+
114132
```
115133
$ graal cocom https://github.com/chaoss/grimoirelab-perceval --git-path /tmp/graal-cocom > /graal-cocom.test
116134
Starting the quest for the Graal.
@@ -121,6 +139,20 @@ Fetch process completed: .. commits inspected
121139
Quest completed.
122140
```
123141

142+
- **CoLic Backend**
143+
144+
```
145+
graal colic https://github.com/chaoss/grimoirelab-toolkit --git-path /tmp/scancode_cli --exec-path /home/scancode-toolkit/etc/scripts/scancli.py --category code_license_scancode_cli
146+
Starting the quest for the Graal.
147+
Git worktree /tmp/... created!
148+
Fetching commits: ...
149+
Git worktree /tmp/... deleted!
150+
Fetch process completed: .. commits inspected
151+
Quest completed.
152+
```
153+
154+
In the above example, we're using scancode_cli analyzer. Similarly, we can use the scancode analyzer by providing the category as `code_license_scancode` and it's corresponding executable path.
155+
124156
### From Python
125157
Graal’s functionalities can be embedded in Python scripts. Again, the effort of using Graal is minimum. In this case the user
126158
only needs some knowledge of Python scripting. The example below shows how to use Graal in a script.

0 commit comments

Comments
 (0)