Skip to content

Commit 4909985

Browse files
committed
Converting panela to a module for colored HTML render
1 parent a3f504a commit 4909985

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

lib/panela/__init__.py

Whitespace-only changes.

lib/panela/panela_colors.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import sys
55
import colored
66
import itertools
7-
from globals import MYDIR
87

98
"""
109
@@ -634,6 +633,8 @@ def show(self):
634633
def main():
635634
"Only for experiments"
636635

636+
from globals import MYDIR
637+
637638
pagepath = os.path.join(MYDIR, "share/firstpage-v2.pnl")
638639
template = Template()
639640
template.read(pagepath)

lib/pnl2html.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/usr/bin/env python
2+
3+
import sys
4+
import os
5+
6+
head = '''\
7+
<title></title>
8+
<pre>
9+
'''
10+
11+
foot = '''
12+
</pre>
13+
'''
14+
15+
16+
if __name__ == '__main__':
17+
if not sys.argv[1:]:
18+
sys.exit('usage: pnl2html.py <filename.pnl>')
19+
20+
from panela import panela_colors
21+
22+
with open(sys.argv[1], 'rb') as pnlfile:
23+
print(head)
24+
print("... TODO panela html render ...")
25+
print(foot)
26+

0 commit comments

Comments
 (0)