Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Simmons <nicestep@gmail.com>2013-07-07 19:33:34 (GMT)
committer James Simmons <nicestep@gmail.com>2013-07-07 19:33:34 (GMT)
commit86c1f54ac86b179f5582a3650908616dfa419f9f (patch)
tree3a354b3a9d05c0a9cf6e4626e4bfa8544a0f20dd
parentaa288e8eb3cf15e5b07d66922fbf511e36d7000f (diff)
modified: striphtml.pyHEADmaster
Change blockquote to be class="blockquote"
-rwxr-xr-xstriphtml.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/striphtml.py b/striphtml.py
index 0a94490..1f21d14 100755
--- a/striphtml.py
+++ b/striphtml.py
@@ -4,7 +4,7 @@ from BeautifulSoup import BeautifulSoup
def _attr_name_whitelisted(attr_name, attr_value):
if attr_name.lower() == "align" and attr_value.lower() == "center":
return True
- elif attr_name.lower() == "style" and attr_value == "margin-left: 0.5in; margin-right: 0.5in; margin-top: 0.1in; margin-bottom: 0.18in; page-break-before: auto":
+ elif attr_name.lower() == "class" and attr_value == "blockquote":
return True
else:
return False
@@ -30,6 +30,7 @@ print "<style type='text/css'>"
print "@font-face {\n font-family: Yataghan;\n src: url('../Fonts/yataghan.ttf');\n }"
print "@font-face {\n font-family: Akashi;\n src: url('../Fonts/akashi.ttf');\n }"
print "p {\n text-align: left;\n text-indent: 0;\n margin-bottom: .5em;\n }\n h1,h2,h3 {\n font-family: Yataghan; text-align: center; margin-top: 3em; margin-bottom: .5em; clear: both; }"
+print "p.blockquote {\n text-align: left;\n text-indent: 0;\n margin-bottom: .5em;\n margin-left: .5in;\n margin-right: .5in; }"
print "</style>\n<head>\n<body>"
print "<h1>Contents</h1>"