forked from robhagemans/robhagemans.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
95342ea
commit 116cfdd
Showing
1 changed file
with
21 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,28 @@ | ||
#!/usr/bin/env python2 | ||
import os, sys, shutil | ||
#!/usr/bin/env python3 | ||
|
||
import os, sys, shutil, subprocess | ||
|
||
here = os.path.dirname(os.path.realpath(os.path.abspath(__file__))) | ||
wd = os.path.join(here, '..', '..', '..', '..', 'pc-basic') | ||
sys.path.insert(0, wd) | ||
from docsrc import makedoc | ||
|
||
from docs import make_htmldoc | ||
|
||
# generate online doc | ||
makedoc(os.path.join(here, 'header.html'), os.path.join(here, 'index.html'), embedded_style=False) | ||
make_htmldoc( | ||
here, 'index.html', | ||
header=os.path.join(here, 'header.html'), | ||
embedded_style=False | ||
) | ||
# generate offline doc | ||
makedoc() | ||
shutil.copy(os.path.join(wd, 'doc', 'PC-BASIC_documentation.html'), here) | ||
make_htmldoc(here, 'PC-BASIC_documentation.html') | ||
# front page | ||
shutil.copy(os.path.join(wd, 'docs', 'source', 'cover.png'), here) | ||
# generate PDF | ||
os.system('prince %s' % os.path.join(wd, 'doc', 'PC-BASIC_documentation.html')) | ||
shutil.copy(os.path.join(wd, 'doc', 'PC-BASIC_documentation.pdf'), here) | ||
subprocess.call( | ||
('prince', os.path.join(here, 'PC-BASIC_documentation.html')) | ||
) | ||
#shutil.copy(os.path.join(wd, 'build', 'doc', 'PC-BASIC_documentation.html'), here) | ||
#shutil.copy(os.path.join(wd, 'build', 'doc', 'PC-BASIC_documentation.pdf'), here) | ||
# get styles | ||
shutil.copy(os.path.join(wd, 'docsrc', 'doc.css'), here) | ||
shutil.copy(os.path.join(wd, 'docs', 'source', 'doc.css'), here) |