forked from ContentMine/norma
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathexample.sh
57 lines (49 loc) · 1.27 KB
/
example.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!bin/sh
# prints help
target/appassembler/bin/norma
# reads a file and creates a QSN directory
rm -rf target/bmctest # clean target directory
target/appassembler/bin/norma -i examples/trialsjournal_15_1_511.pdf -o target/bmctest/
echo "we have created fulltext.pdf in new directory"
ls -lt target/bmctest/trialsjournal_15_1_511/
echo
echo "=== transform an existing QSN directory ==="
echo
cd examples/http_www.trialsjournal.com_content_16_1_1
pwd
ls -lt
cd ../..
echo
echo "copy to temporary location"
echo
rm -rf target/bmctest # clean old target
cp -R examples/http_www.trialsjournal.com_content_16_1_1 target/bmctest/
cd target/bmctest
echo
pwd
ls -lt
cd ../../
echo
echo " now transform the fulltext.xml into scholarly.html"
echo
target/appassembler/bin/norma -q target/bmctest/ -i fulltext.xml -o scholarly.html --xsl bmc2html
echo
cd target/bmctest/
pwd
echo
ls -lt
cd ../..
echo
echo "run the same process on a directory CONTAINING several SQN directories"
echo
mkdir target/bmctest4
cp -R examples/http* target/bmctest4
cd target/bmctest4
pwd
ls -lt
cd ../..
echo
echo "transforming several files with same args except one is a containing directory"
echo
target/appassembler/bin/norma -q target/bmctest4/ -i fulltext.xml -o scholarly.html --xsl bmc2html
ls -ltR target/bmctest4