-
Notifications
You must be signed in to change notification settings - Fork 1
/
cl.sh
executable file
·121 lines (59 loc) · 2 KB
/
cl.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#!/bin/bash
#
# Author: Chunhua Shen
# Creation: Wednesday 13/08/2008 12:06.
# Last Revision: Saturday 18/10/2023 18:48.
jemdoc="./jemdoc3.py"
rm -f eqs/*
# Generate the full paper list
cd bin
# split the bibtex file into individual files
./split_bibtex.sh
./bib2jemdoc.py > fullpaper.jemdoc
mv -f fullpaper.jemdoc ..
./bib2jemdoc2.py > fullpaper2.jemdoc
mv -f fullpaper2.jemdoc ..
./bib2jemdoc_select.py > paper.jemdoc
mv -f paper.jemdoc ..
./bib2jemdoc_select2.py > paper2.jemdoc
mv -f paper2.jemdoc ..
cd ..
cd bin
./gcite.sh
./gcite_chart.sh
# ./count_era.sh
cd ..
for jfile in `ls -1 *jemdoc`
do
echo '... ... ... processing '$jfile' ...'
$jemdoc -c cs.conf $jfile
# tidy -utf8 --wrap 2000 \
# `basename $jfile .jemdoc`.html > 0
# mv -f 0 `basename $jfile .jemdoc`.html
# htmlmin `basename $jfile .jemdoc`.html _0
# mv -f _0 `basename $jfile .jemdoc`.html
done
#
# change <ol> into <ol reversed>
# in paper.html, fullpaper.html, fullpaper2.html
#
cat paper.html | sed s/"<ol>"/"<ol reversed>"/g | sed s/--3px/3px/g > _tmp; mv _tmp paper.html
cat paper2.html | sed s/"<ol>"/"<ol reversed>"/g | sed s/--3px/3px/g > _tmp; mv _tmp paper2.html
cat fullpaper.html | sed s/"<ol>"/"<ol reversed>"/g | sed s/--3px/3px/g > _tmp; mv _tmp fullpaper.html
cat fullpaper2.html | sed s/"<ol>"/"<ol reversed>"/g | sed s/--3px/3px/g > _tmp; mv _tmp fullpaper2.html
cat index.html | sed s/"INSERT_CHINESE_NAME"/"\沈\春\華"/g > _tmp; mv _tmp index.html
#-------------------------------------------------------
# Compile publication list PDF
#
#-------------------------------------------------------
./gen_pdf_list.sh
chmod 777 data/bibtex/*.bib
if [ -z "$1" ]; then
echo " . "
echo " . "
echo " . "
echo "... sync ..."
./scp2srv
fi
pandoc data/cs.bib -s -f biblatex -t markdown > data/cs.yaml
pandoc data/cs.bib -s -f biblatex -t csljson > data/cs.json