|
@ -33,7 +33,7 @@ ooooo_graphs="https://pad.constantvzw.org/p/atnofs-insert" |
|
|
|
|
|
|
|
|
indexmd = requests.get('https://pad.vvvvvvaria.org/atnofs-index.md/export/txt').text |
|
|
indexmd = requests.get('https://pad.vvvvvvaria.org/atnofs-index.md/export/txt').text |
|
|
# download the index of all contributions |
|
|
# download the index of all contributions |
|
|
with open('index.md','w') as file: |
|
|
with open(localhost+'index.md','w') as file: |
|
|
file.write(indexmd) |
|
|
file.write(indexmd) |
|
|
|
|
|
|
|
|
basecssget = requests.get(BASECSS).text |
|
|
basecssget = requests.get(BASECSS).text |
|
@ -42,7 +42,7 @@ with open(localhost+'base.css','w') as file: |
|
|
# download the base css style |
|
|
# download the base css style |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
with open('index.md') as file: |
|
|
with open(localhost+'index.md') as file: |
|
|
for line in file: |
|
|
for line in file: |
|
|
|
|
|
|
|
|
# searches for the chapter links |
|
|
# searches for the chapter links |
|
@ -84,8 +84,8 @@ if ooooo_insert: |
|
|
for chapter in chapters: |
|
|
for chapter in chapters: |
|
|
|
|
|
|
|
|
name=str(counter).zfill(2)+'-'+chapter.split('/')[-3] |
|
|
name=str(counter).zfill(2)+'-'+chapter.split('/')[-3] |
|
|
if not os.path.exists(localhost+name): |
|
|
if not os.path.exists(localhost+'.'+name): |
|
|
os.makedirs(localhost+name) |
|
|
os.makedirs(localhost+'.'+name) |
|
|
pdffile=name+'.pdf' |
|
|
pdffile=name+'.pdf' |
|
|
|
|
|
|
|
|
if len(sys.argv)<2 or sys.argv[1]=='nonlocal': |
|
|
if len(sys.argv)<2 or sys.argv[1]=='nonlocal': |
|
@ -97,12 +97,12 @@ for chapter in chapters: |
|
|
preview = requests.get(chapter.replace('pad/','preview.html')) |
|
|
preview = requests.get(chapter.replace('pad/','preview.html')) |
|
|
style = requests.get(chapter.replace('pad/','stylesheet.css')) |
|
|
style = requests.get(chapter.replace('pad/','stylesheet.css')) |
|
|
|
|
|
|
|
|
stylefile=localhost+name+'/stylesheet.css' |
|
|
stylefile=localhost+'.'+name+'/stylesheet.css' |
|
|
with open(stylefile, 'w') as file: |
|
|
with open(stylefile, 'w') as file: |
|
|
file.write(style.text) |
|
|
file.write(style.text) |
|
|
|
|
|
|
|
|
previewfile=localhost+name+'/preview.html' |
|
|
previewfile=localhost+'.'+name+'/preview.html' |
|
|
localpreview=localurl+name+'/preview.html' |
|
|
localpreview=localurl+'.'+name+'/preview.html' |
|
|
|
|
|
|
|
|
with open(previewfile, 'w') as file: |
|
|
with open(previewfile, 'w') as file: |
|
|
file.write(preview.text) |
|
|
file.write(preview.text) |
|
|