-
Notifications
You must be signed in to change notification settings - Fork 2
/
sample-pipeline.sh
executable file
·30 lines (23 loc) · 1.42 KB
/
sample-pipeline.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#! /bin/sh
# This script demonstrates a component processing pipeline using the sample SSP data files
# in `data/ssps`.
#
# This example uses the pattern matcher in `ssp.py` as opposed to the
# named entity recgonizer, so it does not require training.
#
# Output written to git ignored directory `data/components`.
#
# TODO: provide an example of training!
#
echo "Creating output directory data/components and data/components/markdown"
mkdir -p data/components/markdown
echo "Matching components in data/ssps/ssp1.jsonl: writing data/components/ssp1-components.json"
python ssp.py --reader json-l match --components data/ssp-components.json data/ssps/ssp1.jsonl > data/components/ssp1-components.json
echo "Matching components in data/ssps/ssp2.jsonl: writing data/components/ssp2-components.json"
python ssp.py --reader json-l match --components data/ssp-components.json data/ssps/ssp2.jsonl > data/components/ssp2-components.json
echo "Combining components: writing data/components/combined.json"
python ssp.py combine data/components/ssp1-components.json data/components/ssp2-components.json > data/components/combined.json
echo "Generating OSCAL component-definition: writing data/components/oscal.json"
python oscalize.py --title 'SSP Toolkit Components (subset)' data/components/combined.json > data/components/oscal.json
echo "Generating a markdown summmary"
python component_report.py data/components/combined.json data/components/markdown