-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreport.py
More file actions
24 lines (17 loc) · 817 Bytes
/
report.py
File metadata and controls
24 lines (17 loc) · 817 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import glob
import subprocess
import os
repoRoot='/home/lou/Public/ELTeC-'
webRoot='/home/lou/Public/distantreading.github.io/ELTeC/'
reporter='/home/lou/Public/Scripts/reporter.xsl'
reportBalance='/home/lou/Public/Scripts/mosaic.R'
outputFile='index.html'
# potential exts are lav lit
LANGS=('cze', 'deu', 'eng', 'fra', 'gre', 'gsw', 'hrv', 'hun', 'ita', 'lav', 'lit-ext', 'nor', 'pol', 'por', 'rom', 'slv', 'spa', 'srp', 'swe', 'ukr')
for LANG in LANGS:
repoName=repoRoot+LANG
print("Reporting on repo "+repoName)
command="saxon -xi -s:" + repoName + "/driver.tei -xsl:" + reporter + ' corpus='+LANG + ' >'+webRoot+LANG+'/'+outputFile
subprocess.check_output(command,shell=True)
command="Rscript "+reportBalance+" --args "+webRoot+LANG
subprocess.check_output(command,shell=True)