-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconvert.bat
More file actions
73 lines (59 loc) · 3.39 KB
/
Copy pathconvert.bat
File metadata and controls
73 lines (59 loc) · 3.39 KB
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
@echo off
mkdir www\surveys
mkdir www\context
REM for /R Ontology --ns= %%f in (*.ttl) do (
REM echo %%~nf
REM )
mkdir temp
pushd temp
FOR %%f IN (..\Ontology\*.ttl) DO (
REM echo www\%%~nf
echo Converting %%f
call "C:\Storage\Dev\SDK\Python35\Scripts\rdfpipe.exe" -i turtle -o turtle %%f > ..\www\%%~nf.ttl
call "C:\Storage\Dev\SDK\Python35\Scripts\rdfpipe.exe" -i turtle -o xml %%f > ..\www\%%~nf.rdf
call "C:\Storage\Dev\SDK\Python35\Scripts\rdfpipe.exe" -i turtle -o n3 %%f > ..\www\%%~nf.n3
call "C:\Storage\Dev\SDK\Python35\Scripts\rdfpipe.exe" -i turtle -o json-ld %%f > ..\www\%%~nf.jsonld
call "C:\Storage\Dev\Tools\GnuWin32\bin\sed.exe" -i -f ..\json-ld.sed.txt ..\www\%%~nf.jsonld
echo URI: %%~nf > ..\www\%%~nf.var
echo. >> ..\www\%%~nf.var
echo URI: %%~nf.ttl >> ..\www\%%~nf.var
echo Content-type: application/x-turtle; >> ..\www\%%~nf.var
echo. >> ..\www\%%~nf.var
echo URI: %%~nf.rdf >> ..\www\%%~nf.var
echo Content-type: application/rdf+xml; >> ..\www\%%~nf.var
echo. >> ..\www\%%~nf.var
echo URI: %%~nf.n3 >> ..\www\%%~nf.var
echo Content-type: text/n3; >> ..\www\%%~nf.var
echo. >> ..\www\%%~nf.var
echo URI: %%~nf.jsonld >> ..\www\%%~nf.var
echo Content-type: application/ld+json; >> ..\www\%%~nf.var
)
FOR %%f IN (..\Ontology\surveys\*.ttl) DO (
REM echo www\surveys\%%~nf
echo Converting %%f
call "C:\Storage\Dev\SDK\Python35\Scripts\rdfpipe.exe" -i turtle -o turtle %%f > ..\www\surveys\%%~nf.ttl
call "C:\Storage\Dev\SDK\Python35\Scripts\rdfpipe.exe" -i turtle -o xml %%f > ..\www\surveys\%%~nf.rdf
call "C:\Storage\Dev\SDK\Python35\Scripts\rdfpipe.exe" -i turtle -o n3 %%f > ..\www\surveys\%%~nf.n3
call "C:\Storage\Dev\SDK\Python35\Scripts\rdfpipe.exe" -i turtle -o json-ld %%f > ..\www\surveys\%%~nf.jsonld
call "C:\Storage\Dev\Tools\GnuWin32\bin\sed.exe" -i -f ..\json-ld.sed.txt ..\www\surveys\%%~nf.jsonld
echo URI: %%~nf > ..\www\surveys\%%~nf.var
echo. >> ..\www\surveys\%%~nf.var
echo URI: %%~nf.ttl >> ..\www\surveys\%%~nf.var
echo Content-type: application/x-turtle; >> ..\www\surveys\%%~nf.var
echo. >> ..\www\surveys\%%~nf.var
echo URI: %%~nf.rdf >> ..\www\surveys\%%~nf.var
echo Content-type: application/rdf+xml; >> ..\www\surveys\%%~nf.var
echo. >> ..\www\surveys\%%~nf.var
echo URI: %%~nf.n3 >> ..\www\surveys\%%~nf.var
echo Content-type: text/n3; >> ..\www\surveys\%%~nf.var
echo. >> ..\www\surveys\%%~nf.var
echo URI: %%~nf.jsonld >> ..\www\surveys\%%~nf.var
echo Content-type: application/ld+json; >> ..\www\surveys\%%~nf.var
)
popd
del /Q temp\*
rmdir temp
copy Ontology\context\* www\context\
REM
REM pause
REM exit