mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-21 23:42:14 +00:00
Add OL processing to RML
This commit is contained in:
@@ -77,6 +77,14 @@
|
|||||||
<lineStyle kind="linebelow" start="3,0" stop="3,0" colorName="black"/>
|
<lineStyle kind="linebelow" start="3,0" stop="3,0" colorName="black"/>
|
||||||
<lineStyle kind="linebelow" start="5,0" stop="5,0" colorName="black"/>
|
<lineStyle kind="linebelow" start="5,0" stop="5,0" colorName="black"/>
|
||||||
</blockTableStyle>
|
</blockTableStyle>
|
||||||
|
|
||||||
|
<listStyle name="ol"
|
||||||
|
bulletFormat="%s."
|
||||||
|
bulletFontSize="10" />
|
||||||
|
|
||||||
|
<listStyle name="ul"
|
||||||
|
start="square"
|
||||||
|
bulletFontSize="8" />
|
||||||
</stylesheet>
|
</stylesheet>
|
||||||
|
|
||||||
<template > {# Note: page is 595x842 points (1 point=1/72in) #}
|
<template > {# Note: page is 595x842 points (1 point=1/72in) #}
|
||||||
@@ -128,4 +136,4 @@
|
|||||||
{% include "RIGS/event_print_page.xml" %}
|
{% include "RIGS/event_print_page.xml" %}
|
||||||
</story>
|
</story>
|
||||||
|
|
||||||
</document>
|
</document>
|
||||||
|
|||||||
@@ -30,10 +30,9 @@ def markdown_filter(text, format='html'):
|
|||||||
bq.name = 'pre'
|
bq.name = 'pre'
|
||||||
bq.string = bq.text
|
bq.string = bq.text
|
||||||
|
|
||||||
for ul in soup('ul'):
|
for list in soup.findAll(['ul','ol']):
|
||||||
ul['value'] = 'square'
|
list['style'] = list.name
|
||||||
ul['bulletFontSize'] = '8'
|
for li in list.findAll('li'):
|
||||||
for li in ul.findAll('li'):
|
|
||||||
p = soup.new_tag('p')
|
p = soup.new_tag('p')
|
||||||
p.string = li.text
|
p.string = li.text
|
||||||
li.string = ''
|
li.string = ''
|
||||||
@@ -41,7 +40,7 @@ def markdown_filter(text, format='html'):
|
|||||||
indent = soup.new_tag('indent')
|
indent = soup.new_tag('indent')
|
||||||
indent['left'] = '1.2cm'
|
indent['left'] = '1.2cm'
|
||||||
|
|
||||||
content = ul.replace_with(indent)
|
content = list.replace_with(indent)
|
||||||
indent.append(content)
|
indent.append(content)
|
||||||
|
|
||||||
# Paragraphs have a different tag
|
# Paragraphs have a different tag
|
||||||
|
|||||||
BIN
db.sqlite3
BIN
db.sqlite3
Binary file not shown.
Reference in New Issue
Block a user