Skip to content
Browse files

Refs #74 - add support for multiple markup types

  • Loading branch information...
1 parent 29c2f81 commit 553bcd01445c91e64f920aef54e7d6f2999ade0e Thomas Schreiber committed Mar 21, 2011
View
3 biblion/admin.py
@@ -3,7 +3,7 @@
from biblion.models import Post, Image
from biblion.forms import AdminPostForm
-from biblion.utils import can_tweet
+from biblion.utils.twitter import can_tweet
class ImageInline(admin.TabularInline):
@@ -22,6 +22,7 @@ class PostAdmin(admin.ModelAdmin):
"author",
"teaser",
"content",
+ "markup_type",
"publish",
]
if can_tweet():
View
9 biblion/forms.py
@@ -2,9 +2,8 @@
from django import forms
-from biblion.creole_parser import parse, BiblionHtmlEmitter
from biblion.models import Post, Revision
-from biblion.utils import can_tweet
+from biblion.utils.twitter import can_tweet
class AdminPostForm(forms.ModelForm):
@@ -60,7 +59,7 @@ def __init__(self, *args, **kwargs):
# @@@ can a post be unpublished then re-published? should be pulled
# from latest revision maybe?
self.fields["publish"].initial = bool(post.published)
-
+
def save(self):
post = super(AdminPostForm, self).save(commit=False)
@@ -72,8 +71,8 @@ def save(self):
if self.cleaned_data["publish"]:
post.published = datetime.now()
- post.teaser_html = parse(self.cleaned_data["teaser"], emitter=BiblionHtmlEmitter)
- post.content_html = parse(self.cleaned_data["content"], emitter=BiblionHtmlEmitter)
+ post.teaser = self.cleaned_data["teaser"]
+ post.content = self.cleaned_data["content"]
post.updated = datetime.now()
post.save()
View
9 biblion/models.py
@@ -19,7 +19,7 @@
from biblion.managers import PostManager
from biblion.settings import ALL_SECTION_NAME, SECTIONS
-from biblion.utils import can_tweet
+from biblion.utils.twitter import can_tweet
@@ -31,15 +31,18 @@ def ig(L, i):
class Post(models.Model):
SECTION_CHOICES = [(1, ALL_SECTION_NAME)] + zip(range(2, 2 + len(SECTIONS)), ig(SECTIONS, 1))
+ markup_types = ["HTML", "Creole", "Markdown", "reStructuredText", "Textile"]
+ MARKUP_CHOICES = zip(range(1, len(markup_types)), markup_types)
section = models.IntegerField(choices=SECTION_CHOICES)
title = models.CharField(max_length=90)
slug = models.SlugField()
author = models.ForeignKey(User, related_name="posts")
- teaser_html = models.TextField(editable=False)
- content_html = models.TextField(editable=False)
+ teaser = models.TextField(editable=False)
+ content = models.TextField(editable=False)
+ markup_type = models.IntegerField(choices=MARKUP_CHOICES, default=1)
tweet_text = models.CharField(max_length=140, editable=False)
View
20 biblion/static/css/pygments-css/README.rst
@@ -0,0 +1,20 @@
+pygments-css
+============
+
+Pygments_, a Python-based code highlighting tool, comes with a set of builtin styles_ (not css files) for code highlighting. You have to generate a CSS file using the command line. I just figured I'd save someone this work in the future and generate all the CSS files based on the Pygments builtins.
+
+Pretty simple stuff here. These css files were generated using pygmentize
+on the command line like so::
+
+ pygmentize -S default -f html > default.css
+
+I'm using a combination of Pygments and Markdown on a django project that has a model with the following save method::
+
+ def save(self):
+ self.html = markdown(self.body, 'codehilite')
+ super(Entry, self).save()
+
+That's why the CSS styles all have .codehilite in front of them. You should change the .codehilite to work with the style name that you use for your Pygments HTML output.
+
+.. _Pygments: http://pygments.org
+.. _styles: http://dev.pocoo.org/projects/pygments/browser/pygments/styles
View
58 biblion/static/css/pygments-css/autumn.css
@@ -0,0 +1,58 @@
+.codehilite .hll { background-color: #ffffcc }
+.codehilite .c { color: #aaaaaa; font-style: italic } /* Comment */
+.codehilite .err { color: #F00000; background-color: #F0A0A0 } /* Error */
+.codehilite .k { color: #0000aa } /* Keyword */
+.codehilite .cm { color: #aaaaaa; font-style: italic } /* Comment.Multiline */
+.codehilite .cp { color: #4c8317 } /* Comment.Preproc */
+.codehilite .c1 { color: #aaaaaa; font-style: italic } /* Comment.Single */
+.codehilite .cs { color: #0000aa; font-style: italic } /* Comment.Special */
+.codehilite .gd { color: #aa0000 } /* Generic.Deleted */
+.codehilite .ge { font-style: italic } /* Generic.Emph */
+.codehilite .gr { color: #aa0000 } /* Generic.Error */
+.codehilite .gh { color: #000080; font-weight: bold } /* Generic.Heading */
+.codehilite .gi { color: #00aa00 } /* Generic.Inserted */
+.codehilite .go { color: #888888 } /* Generic.Output */
+.codehilite .gp { color: #555555 } /* Generic.Prompt */
+.codehilite .gs { font-weight: bold } /* Generic.Strong */
+.codehilite .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+.codehilite .gt { color: #aa0000 } /* Generic.Traceback */
+.codehilite .kc { color: #0000aa } /* Keyword.Constant */
+.codehilite .kd { color: #0000aa } /* Keyword.Declaration */
+.codehilite .kn { color: #0000aa } /* Keyword.Namespace */
+.codehilite .kp { color: #0000aa } /* Keyword.Pseudo */
+.codehilite .kr { color: #0000aa } /* Keyword.Reserved */
+.codehilite .kt { color: #00aaaa } /* Keyword.Type */
+.codehilite .m { color: #009999 } /* Literal.Number */
+.codehilite .s { color: #aa5500 } /* Literal.String */
+.codehilite .na { color: #1e90ff } /* Name.Attribute */
+.codehilite .nb { color: #00aaaa } /* Name.Builtin */
+.codehilite .nc { color: #00aa00; text-decoration: underline } /* Name.Class */
+.codehilite .no { color: #aa0000 } /* Name.Constant */
+.codehilite .nd { color: #888888 } /* Name.Decorator */
+.codehilite .ni { color: #800000; font-weight: bold } /* Name.Entity */
+.codehilite .nf { color: #00aa00 } /* Name.Function */
+.codehilite .nn { color: #00aaaa; text-decoration: underline } /* Name.Namespace */
+.codehilite .nt { color: #1e90ff; font-weight: bold } /* Name.Tag */
+.codehilite .nv { color: #aa0000 } /* Name.Variable */
+.codehilite .ow { color: #0000aa } /* Operator.Word */
+.codehilite .w { color: #bbbbbb } /* Text.Whitespace */
+.codehilite .mf { color: #009999 } /* Literal.Number.Float */
+.codehilite .mh { color: #009999 } /* Literal.Number.Hex */
+.codehilite .mi { color: #009999 } /* Literal.Number.Integer */
+.codehilite .mo { color: #009999 } /* Literal.Number.Oct */
+.codehilite .sb { color: #aa5500 } /* Literal.String.Backtick */
+.codehilite .sc { color: #aa5500 } /* Literal.String.Char */
+.codehilite .sd { color: #aa5500 } /* Literal.String.Doc */
+.codehilite .s2 { color: #aa5500 } /* Literal.String.Double */
+.codehilite .se { color: #aa5500 } /* Literal.String.Escape */
+.codehilite .sh { color: #aa5500 } /* Literal.String.Heredoc */
+.codehilite .si { color: #aa5500 } /* Literal.String.Interpol */
+.codehilite .sx { color: #aa5500 } /* Literal.String.Other */
+.codehilite .sr { color: #009999 } /* Literal.String.Regex */
+.codehilite .s1 { color: #aa5500 } /* Literal.String.Single */
+.codehilite .ss { color: #0000aa } /* Literal.String.Symbol */
+.codehilite .bp { color: #00aaaa } /* Name.Builtin.Pseudo */
+.codehilite .vc { color: #aa0000 } /* Name.Variable.Class */
+.codehilite .vg { color: #aa0000 } /* Name.Variable.Global */
+.codehilite .vi { color: #aa0000 } /* Name.Variable.Instance */
+.codehilite .il { color: #009999 } /* Literal.Number.Integer.Long */
View
46 biblion/static/css/pygments-css/borland.css
@@ -0,0 +1,46 @@
+.codehilite .hll { background-color: #ffffcc }
+.codehilite .c { color: #008800; font-style: italic } /* Comment */
+.codehilite .err { color: #a61717; background-color: #e3d2d2 } /* Error */
+.codehilite .k { color: #000080; font-weight: bold } /* Keyword */
+.codehilite .cm { color: #008800; font-style: italic } /* Comment.Multiline */
+.codehilite .cp { color: #008080 } /* Comment.Preproc */
+.codehilite .c1 { color: #008800; font-style: italic } /* Comment.Single */
+.codehilite .cs { color: #008800; font-weight: bold } /* Comment.Special */
+.codehilite .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
+.codehilite .ge { font-style: italic } /* Generic.Emph */
+.codehilite .gr { color: #aa0000 } /* Generic.Error */
+.codehilite .gh { color: #999999 } /* Generic.Heading */
+.codehilite .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
+.codehilite .go { color: #888888 } /* Generic.Output */
+.codehilite .gp { color: #555555 } /* Generic.Prompt */
+.codehilite .gs { font-weight: bold } /* Generic.Strong */
+.codehilite .gu { color: #aaaaaa } /* Generic.Subheading */
+.codehilite .gt { color: #aa0000 } /* Generic.Traceback */
+.codehilite .kc { color: #000080; font-weight: bold } /* Keyword.Constant */
+.codehilite .kd { color: #000080; font-weight: bold } /* Keyword.Declaration */
+.codehilite .kn { color: #000080; font-weight: bold } /* Keyword.Namespace */
+.codehilite .kp { color: #000080; font-weight: bold } /* Keyword.Pseudo */
+.codehilite .kr { color: #000080; font-weight: bold } /* Keyword.Reserved */
+.codehilite .kt { color: #000080; font-weight: bold } /* Keyword.Type */
+.codehilite .m { color: #0000FF } /* Literal.Number */
+.codehilite .s { color: #0000FF } /* Literal.String */
+.codehilite .na { color: #FF0000 } /* Name.Attribute */
+.codehilite .nt { color: #000080; font-weight: bold } /* Name.Tag */
+.codehilite .ow { font-weight: bold } /* Operator.Word */
+.codehilite .w { color: #bbbbbb } /* Text.Whitespace */
+.codehilite .mf { color: #0000FF } /* Literal.Number.Float */
+.codehilite .mh { color: #0000FF } /* Literal.Number.Hex */
+.codehilite .mi { color: #0000FF } /* Literal.Number.Integer */
+.codehilite .mo { color: #0000FF } /* Literal.Number.Oct */
+.codehilite .sb { color: #0000FF } /* Literal.String.Backtick */
+.codehilite .sc { color: #800080 } /* Literal.String.Char */
+.codehilite .sd { color: #0000FF } /* Literal.String.Doc */
+.codehilite .s2 { color: #0000FF } /* Literal.String.Double */
+.codehilite .se { color: #0000FF } /* Literal.String.Escape */
+.codehilite .sh { color: #0000FF } /* Literal.String.Heredoc */
+.codehilite .si { color: #0000FF } /* Literal.String.Interpol */
+.codehilite .sx { color: #0000FF } /* Literal.String.Other */
+.codehilite .sr { color: #0000FF } /* Literal.String.Regex */
+.codehilite .s1 { color: #0000FF } /* Literal.String.Single */
+.codehilite .ss { color: #0000FF } /* Literal.String.Symbol */
+.codehilite .il { color: #0000FF } /* Literal.Number.Integer.Long */
View
34 biblion/static/css/pygments-css/bw.css
@@ -0,0 +1,34 @@
+.codehilite .hll { background-color: #ffffcc }
+.codehilite .c { font-style: italic } /* Comment */
+.codehilite .err { border: 1px solid #FF0000 } /* Error */
+.codehilite .k { font-weight: bold } /* Keyword */
+.codehilite .cm { font-style: italic } /* Comment.Multiline */
+.codehilite .c1 { font-style: italic } /* Comment.Single */
+.codehilite .cs { font-style: italic } /* Comment.Special */
+.codehilite .ge { font-style: italic } /* Generic.Emph */
+.codehilite .gh { font-weight: bold } /* Generic.Heading */
+.codehilite .gp { font-weight: bold } /* Generic.Prompt */
+.codehilite .gs { font-weight: bold } /* Generic.Strong */
+.codehilite .gu { font-weight: bold } /* Generic.Subheading */
+.codehilite .kc { font-weight: bold } /* Keyword.Constant */
+.codehilite .kd { font-weight: bold } /* Keyword.Declaration */
+.codehilite .kn { font-weight: bold } /* Keyword.Namespace */
+.codehilite .kr { font-weight: bold } /* Keyword.Reserved */
+.codehilite .s { font-style: italic } /* Literal.String */
+.codehilite .nc { font-weight: bold } /* Name.Class */
+.codehilite .ni { font-weight: bold } /* Name.Entity */
+.codehilite .ne { font-weight: bold } /* Name.Exception */
+.codehilite .nn { font-weight: bold } /* Name.Namespace */
+.codehilite .nt { font-weight: bold } /* Name.Tag */
+.codehilite .ow { font-weight: bold } /* Operator.Word */
+.codehilite .sb { font-style: italic } /* Literal.String.Backtick */
+.codehilite .sc { font-style: italic } /* Literal.String.Char */
+.codehilite .sd { font-style: italic } /* Literal.String.Doc */
+.codehilite .s2 { font-style: italic } /* Literal.String.Double */
+.codehilite .se { font-weight: bold; font-style: italic } /* Literal.String.Escape */
+.codehilite .sh { font-style: italic } /* Literal.String.Heredoc */
+.codehilite .si { font-weight: bold; font-style: italic } /* Literal.String.Interpol */
+.codehilite .sx { font-style: italic } /* Literal.String.Other */
+.codehilite .sr { font-style: italic } /* Literal.String.Regex */
+.codehilite .s1 { font-style: italic } /* Literal.String.Single */
+.codehilite .ss { font-style: italic } /* Literal.String.Symbol */
View
61 biblion/static/css/pygments-css/colorful.css
@@ -0,0 +1,61 @@
+.codehilite .hll { background-color: #ffffcc }
+.codehilite .c { color: #808080 } /* Comment */
+.codehilite .err { color: #F00000; background-color: #F0A0A0 } /* Error */
+.codehilite .k { color: #008000; font-weight: bold } /* Keyword */
+.codehilite .o { color: #303030 } /* Operator */
+.codehilite .cm { color: #808080 } /* Comment.Multiline */
+.codehilite .cp { color: #507090 } /* Comment.Preproc */
+.codehilite .c1 { color: #808080 } /* Comment.Single */
+.codehilite .cs { color: #cc0000; font-weight: bold } /* Comment.Special */
+.codehilite .gd { color: #A00000 } /* Generic.Deleted */
+.codehilite .ge { font-style: italic } /* Generic.Emph */
+.codehilite .gr { color: #FF0000 } /* Generic.Error */
+.codehilite .gh { color: #000080; font-weight: bold } /* Generic.Heading */
+.codehilite .gi { color: #00A000 } /* Generic.Inserted */
+.codehilite .go { color: #808080 } /* Generic.Output */
+.codehilite .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
+.codehilite .gs { font-weight: bold } /* Generic.Strong */
+.codehilite .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+.codehilite .gt { color: #0040D0 } /* Generic.Traceback */
+.codehilite .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
+.codehilite .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
+.codehilite .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
+.codehilite .kp { color: #003080; font-weight: bold } /* Keyword.Pseudo */
+.codehilite .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
+.codehilite .kt { color: #303090; font-weight: bold } /* Keyword.Type */
+.codehilite .m { color: #6000E0; font-weight: bold } /* Literal.Number */
+.codehilite .s { background-color: #fff0f0 } /* Literal.String */
+.codehilite .na { color: #0000C0 } /* Name.Attribute */
+.codehilite .nb { color: #007020 } /* Name.Builtin */
+.codehilite .nc { color: #B00060; font-weight: bold } /* Name.Class */
+.codehilite .no { color: #003060; font-weight: bold } /* Name.Constant */
+.codehilite .nd { color: #505050; font-weight: bold } /* Name.Decorator */
+.codehilite .ni { color: #800000; font-weight: bold } /* Name.Entity */
+.codehilite .ne { color: #F00000; font-weight: bold } /* Name.Exception */
+.codehilite .nf { color: #0060B0; font-weight: bold } /* Name.Function */
+.codehilite .nl { color: #907000; font-weight: bold } /* Name.Label */
+.codehilite .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
+.codehilite .nt { color: #007000 } /* Name.Tag */
+.codehilite .nv { color: #906030 } /* Name.Variable */
+.codehilite .ow { color: #000000; font-weight: bold } /* Operator.Word */
+.codehilite .w { color: #bbbbbb } /* Text.Whitespace */
+.codehilite .mf { color: #6000E0; font-weight: bold } /* Literal.Number.Float */
+.codehilite .mh { color: #005080; font-weight: bold } /* Literal.Number.Hex */
+.codehilite .mi { color: #0000D0; font-weight: bold } /* Literal.Number.Integer */
+.codehilite .mo { color: #4000E0; font-weight: bold } /* Literal.Number.Oct */
+.codehilite .sb { background-color: #fff0f0 } /* Literal.String.Backtick */
+.codehilite .sc { color: #0040D0 } /* Literal.String.Char */
+.codehilite .sd { color: #D04020 } /* Literal.String.Doc */
+.codehilite .s2 { background-color: #fff0f0 } /* Literal.String.Double */
+.codehilite .se { color: #606060; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */
+.codehilite .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */
+.codehilite .si { background-color: #e0e0e0 } /* Literal.String.Interpol */
+.codehilite .sx { color: #D02000; background-color: #fff0f0 } /* Literal.String.Other */
+.codehilite .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */
+.codehilite .s1 { background-color: #fff0f0 } /* Literal.String.Single */
+.codehilite .ss { color: #A06000 } /* Literal.String.Symbol */
+.codehilite .bp { color: #007020 } /* Name.Builtin.Pseudo */
+.codehilite .vc { color: #306090 } /* Name.Variable.Class */
+.codehilite .vg { color: #d07000; font-weight: bold } /* Name.Variable.Global */
+.codehilite .vi { color: #3030B0 } /* Name.Variable.Instance */
+.codehilite .il { color: #0000D0; font-weight: bold } /* Literal.Number.Integer.Long */
View
62 biblion/static/css/pygments-css/default.css
@@ -0,0 +1,62 @@
+.codehilite .hll { background-color: #ffffcc }
+.codehilite { background: #f8f8f8; }
+.codehilite .c { color: #408080; font-style: italic } /* Comment */
+.codehilite .err { border: 1px solid #FF0000 } /* Error */
+.codehilite .k { color: #008000; font-weight: bold } /* Keyword */
+.codehilite .o { color: #666666 } /* Operator */
+.codehilite .cm { color: #408080; font-style: italic } /* Comment.Multiline */
+.codehilite .cp { color: #BC7A00 } /* Comment.Preproc */
+.codehilite .c1 { color: #408080; font-style: italic } /* Comment.Single */
+.codehilite .cs { color: #408080; font-style: italic } /* Comment.Special */
+.codehilite .gd { color: #A00000 } /* Generic.Deleted */
+.codehilite .ge { font-style: italic } /* Generic.Emph */
+.codehilite .gr { color: #FF0000 } /* Generic.Error */
+.codehilite .gh { color: #000080; font-weight: bold } /* Generic.Heading */
+.codehilite .gi { color: #00A000 } /* Generic.Inserted */
+.codehilite .go { color: #808080 } /* Generic.Output */
+.codehilite .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
+.codehilite .gs { font-weight: bold } /* Generic.Strong */
+.codehilite .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+.codehilite .gt { color: #0040D0 } /* Generic.Traceback */
+.codehilite .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
+.codehilite .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
+.codehilite .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
+.codehilite .kp { color: #008000 } /* Keyword.Pseudo */
+.codehilite .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
+.codehilite .kt { color: #B00040 } /* Keyword.Type */
+.codehilite .m { color: #666666 } /* Literal.Number */
+.codehilite .s { color: #BA2121 } /* Literal.String */
+.codehilite .na { color: #7D9029 } /* Name.Attribute */
+.codehilite .nb { color: #008000 } /* Name.Builtin */
+.codehilite .nc { color: #0000FF; font-weight: bold } /* Name.Class */
+.codehilite .no { color: #880000 } /* Name.Constant */
+.codehilite .nd { color: #AA22FF } /* Name.Decorator */
+.codehilite .ni { color: #999999; font-weight: bold } /* Name.Entity */
+.codehilite .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
+.codehilite .nf { color: #0000FF } /* Name.Function */
+.codehilite .nl { color: #A0A000 } /* Name.Label */
+.codehilite .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
+.codehilite .nt { color: #008000; font-weight: bold } /* Name.Tag */
+.codehilite .nv { color: #19177C } /* Name.Variable */
+.codehilite .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
+.codehilite .w { color: #bbbbbb } /* Text.Whitespace */
+.codehilite .mf { color: #666666 } /* Literal.Number.Float */
+.codehilite .mh { color: #666666 } /* Literal.Number.Hex */
+.codehilite .mi { color: #666666 } /* Literal.Number.Integer */
+.codehilite .mo { color: #666666 } /* Literal.Number.Oct */
+.codehilite .sb { color: #BA2121 } /* Literal.String.Backtick */
+.codehilite .sc { color: #BA2121 } /* Literal.String.Char */
+.codehilite .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
+.codehilite .s2 { color: #BA2121 } /* Literal.String.Double */
+.codehilite .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
+.codehilite .sh { color: #BA2121 } /* Literal.String.Heredoc */
+.codehilite .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
+.codehilite .sx { color: #008000 } /* Literal.String.Other */
+.codehilite .sr { color: #BB6688 } /* Literal.String.Regex */
+.codehilite .s1 { color: #BA2121 } /* Literal.String.Single */
+.codehilite .ss { color: #19177C } /* Literal.String.Symbol */
+.codehilite .bp { color: #008000 } /* Name.Builtin.Pseudo */
+.codehilite .vc { color: #19177C } /* Name.Variable.Class */
+.codehilite .vg { color: #19177C } /* Name.Variable.Global */
+.codehilite .vi { color: #19177C } /* Name.Variable.Instance */
+.codehilite .il { color: #666666 } /* Literal.Number.Integer.Long */
View
61 biblion/static/css/pygments-css/emacs.css
@@ -0,0 +1,61 @@
+.codehilite .hll { background-color: #ffffcc }
+.codehilite .c { color: #008800; font-style: italic } /* Comment */
+.codehilite .err { border: 1px solid #FF0000 } /* Error */
+.codehilite .k { color: #AA22FF; font-weight: bold } /* Keyword */
+.codehilite .o { color: #666666 } /* Operator */
+.codehilite .cm { color: #008800; font-style: italic } /* Comment.Multiline */
+.codehilite .cp { color: #008800 } /* Comment.Preproc */
+.codehilite .c1 { color: #008800; font-style: italic } /* Comment.Single */
+.codehilite .cs { color: #008800; font-weight: bold } /* Comment.Special */
+.codehilite .gd { color: #A00000 } /* Generic.Deleted */
+.codehilite .ge { font-style: italic } /* Generic.Emph */
+.codehilite .gr { color: #FF0000 } /* Generic.Error */
+.codehilite .gh { color: #000080; font-weight: bold } /* Generic.Heading */
+.codehilite .gi { color: #00A000 } /* Generic.Inserted */
+.codehilite .go { color: #808080 } /* Generic.Output */
+.codehilite .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
+.codehilite .gs { font-weight: bold } /* Generic.Strong */
+.codehilite .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+.codehilite .gt { color: #0040D0 } /* Generic.Traceback */
+.codehilite .kc { color: #AA22FF; font-weight: bold } /* Keyword.Constant */
+.codehilite .kd { color: #AA22FF; font-weight: bold } /* Keyword.Declaration */
+.codehilite .kn { color: #AA22FF; font-weight: bold } /* Keyword.Namespace */
+.codehilite .kp { color: #AA22FF } /* Keyword.Pseudo */
+.codehilite .kr { color: #AA22FF; font-weight: bold } /* Keyword.Reserved */
+.codehilite .kt { color: #00BB00; font-weight: bold } /* Keyword.Type */
+.codehilite .m { color: #666666 } /* Literal.Number */
+.codehilite .s { color: #BB4444 } /* Literal.String */
+.codehilite .na { color: #BB4444 } /* Name.Attribute */
+.codehilite .nb { color: #AA22FF } /* Name.Builtin */
+.codehilite .nc { color: #0000FF } /* Name.Class */
+.codehilite .no { color: #880000 } /* Name.Constant */
+.codehilite .nd { color: #AA22FF } /* Name.Decorator */
+.codehilite .ni { color: #999999; font-weight: bold } /* Name.Entity */
+.codehilite .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
+.codehilite .nf { color: #00A000 } /* Name.Function */
+.codehilite .nl { color: #A0A000 } /* Name.Label */
+.codehilite .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
+.codehilite .nt { color: #008000; font-weight: bold } /* Name.Tag */
+.codehilite .nv { color: #B8860B } /* Name.Variable */
+.codehilite .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
+.codehilite .w { color: #bbbbbb } /* Text.Whitespace */
+.codehilite .mf { color: #666666 } /* Literal.Number.Float */
+.codehilite .mh { color: #666666 } /* Literal.Number.Hex */
+.codehilite .mi { color: #666666 } /* Literal.Number.Integer */
+.codehilite .mo { color: #666666 } /* Literal.Number.Oct */
+.codehilite .sb { color: #BB4444 } /* Literal.String.Backtick */
+.codehilite .sc { color: #BB4444 } /* Literal.String.Char */
+.codehilite .sd { color: #BB4444; font-style: italic } /* Literal.String.Doc */
+.codehilite .s2 { color: #BB4444 } /* Literal.String.Double */
+.codehilite .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
+.codehilite .sh { color: #BB4444 } /* Literal.String.Heredoc */
+.codehilite .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
+.codehilite .sx { color: #008000 } /* Literal.String.Other */
+.codehilite .sr { color: #BB6688 } /* Literal.String.Regex */
+.codehilite .s1 { color: #BB4444 } /* Literal.String.Single */
+.codehilite .ss { color: #B8860B } /* Literal.String.Symbol */
+.codehilite .bp { color: #AA22FF } /* Name.Builtin.Pseudo */
+.codehilite .vc { color: #B8860B } /* Name.Variable.Class */
+.codehilite .vg { color: #B8860B } /* Name.Variable.Global */
+.codehilite .vi { color: #B8860B } /* Name.Variable.Instance */
+.codehilite .il { color: #666666 } /* Literal.Number.Integer.Long */
View
61 biblion/static/css/pygments-css/friendly.css
@@ -0,0 +1,61 @@
+.codehilite .hll { background-color: #ffffcc }
+.codehilite .c { color: #60a0b0; font-style: italic } /* Comment */
+.codehilite .err { border: 1px solid #FF0000 } /* Error */
+.codehilite .k { color: #007020; font-weight: bold } /* Keyword */
+.codehilite .o { color: #666666 } /* Operator */
+.codehilite .cm { color: #60a0b0; font-style: italic } /* Comment.Multiline */
+.codehilite .cp { color: #007020 } /* Comment.Preproc */
+.codehilite .c1 { color: #60a0b0; font-style: italic } /* Comment.Single */
+.codehilite .cs { color: #60a0b0; background-color: #fff0f0 } /* Comment.Special */
+.codehilite .gd { color: #A00000 } /* Generic.Deleted */
+.codehilite .ge { font-style: italic } /* Generic.Emph */
+.codehilite .gr { color: #FF0000 } /* Generic.Error */
+.codehilite .gh { color: #000080; font-weight: bold } /* Generic.Heading */
+.codehilite .gi { color: #00A000 } /* Generic.Inserted */
+.codehilite .go { color: #808080 } /* Generic.Output */
+.codehilite .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
+.codehilite .gs { font-weight: bold } /* Generic.Strong */
+.codehilite .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+.codehilite .gt { color: #0040D0 } /* Generic.Traceback */
+.codehilite .kc { color: #007020; font-weight: bold } /* Keyword.Constant */
+.codehilite .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */
+.codehilite .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */
+.codehilite .kp { color: #007020 } /* Keyword.Pseudo */
+.codehilite .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */
+.codehilite .kt { color: #902000 } /* Keyword.Type */
+.codehilite .m { color: #40a070 } /* Literal.Number */
+.codehilite .s { color: #4070a0 } /* Literal.String */
+.codehilite .na { color: #4070a0 } /* Name.Attribute */
+.codehilite .nb { color: #007020 } /* Name.Builtin */
+.codehilite .nc { color: #0e84b5; font-weight: bold } /* Name.Class */
+.codehilite .no { color: #60add5 } /* Name.Constant */
+.codehilite .nd { color: #555555; font-weight: bold } /* Name.Decorator */
+.codehilite .ni { color: #d55537; font-weight: bold } /* Name.Entity */
+.codehilite .ne { color: #007020 } /* Name.Exception */
+.codehilite .nf { color: #06287e } /* Name.Function */
+.codehilite .nl { color: #002070; font-weight: bold } /* Name.Label */
+.codehilite .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
+.codehilite .nt { color: #062873; font-weight: bold } /* Name.Tag */
+.codehilite .nv { color: #bb60d5 } /* Name.Variable */
+.codehilite .ow { color: #007020; font-weight: bold } /* Operator.Word */
+.codehilite .w { color: #bbbbbb } /* Text.Whitespace */
+.codehilite .mf { color: #40a070 } /* Literal.Number.Float */
+.codehilite .mh { color: #40a070 } /* Literal.Number.Hex */
+.codehilite .mi { color: #40a070 } /* Literal.Number.Integer */
+.codehilite .mo { color: #40a070 } /* Literal.Number.Oct */
+.codehilite .sb { color: #4070a0 } /* Literal.String.Backtick */
+.codehilite .sc { color: #4070a0 } /* Literal.String.Char */
+.codehilite .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */
+.codehilite .s2 { color: #4070a0 } /* Literal.String.Double */
+.codehilite .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */
+.codehilite .sh { color: #4070a0 } /* Literal.String.Heredoc */
+.codehilite .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */
+.codehilite .sx { color: #c65d09 } /* Literal.String.Other */
+.codehilite .sr { color: #235388 } /* Literal.String.Regex */
+.codehilite .s1 { color: #4070a0 } /* Literal.String.Single */
+.codehilite .ss { color: #517918 } /* Literal.String.Symbol */
+.codehilite .bp { color: #007020 } /* Name.Builtin.Pseudo */
+.codehilite .vc { color: #bb60d5 } /* Name.Variable.Class */
+.codehilite .vg { color: #bb60d5 } /* Name.Variable.Global */
+.codehilite .vi { color: #bb60d5 } /* Name.Variable.Instance */
+.codehilite .il { color: #40a070 } /* Literal.Number.Integer.Long */
View
69 biblion/static/css/pygments-css/fruity.css
@@ -0,0 +1,69 @@
+.codehilite .hll { background-color: #333333 }
+.codehilite .c { color: #008800; font-style: italic; background-color: #0f140f } /* Comment */
+.codehilite .err { color: #ffffff } /* Error */
+.codehilite .g { color: #ffffff } /* Generic */
+.codehilite .k { color: #fb660a; font-weight: bold } /* Keyword */
+.codehilite .l { color: #ffffff } /* Literal */
+.codehilite .n { color: #ffffff } /* Name */
+.codehilite .o { color: #ffffff } /* Operator */
+.codehilite .x { color: #ffffff } /* Other */
+.codehilite .p { color: #ffffff } /* Punctuation */
+.codehilite .cm { color: #008800; font-style: italic; background-color: #0f140f } /* Comment.Multiline */
+.codehilite .cp { color: #ff0007; font-weight: bold; font-style: italic; background-color: #0f140f } /* Comment.Preproc */
+.codehilite .c1 { color: #008800; font-style: italic; background-color: #0f140f } /* Comment.Single */
+.codehilite .cs { color: #008800; font-style: italic; background-color: #0f140f } /* Comment.Special */
+.codehilite .gd { color: #ffffff } /* Generic.Deleted */
+.codehilite .ge { color: #ffffff } /* Generic.Emph */
+.codehilite .gr { color: #ffffff } /* Generic.Error */
+.codehilite .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */
+.codehilite .gi { color: #ffffff } /* Generic.Inserted */
+.codehilite .go { color: #444444; background-color: #222222 } /* Generic.Output */
+.codehilite .gp { color: #ffffff } /* Generic.Prompt */
+.codehilite .gs { color: #ffffff } /* Generic.Strong */
+.codehilite .gu { color: #ffffff; font-weight: bold } /* Generic.Subheading */
+.codehilite .gt { color: #ffffff } /* Generic.Traceback */
+.codehilite .kc { color: #fb660a; font-weight: bold } /* Keyword.Constant */
+.codehilite .kd { color: #fb660a; font-weight: bold } /* Keyword.Declaration */
+.codehilite .kn { color: #fb660a; font-weight: bold } /* Keyword.Namespace */
+.codehilite .kp { color: #fb660a } /* Keyword.Pseudo */
+.codehilite .kr { color: #fb660a; font-weight: bold } /* Keyword.Reserved */
+.codehilite .kt { color: #cdcaa9; font-weight: bold } /* Keyword.Type */
+.codehilite .ld { color: #ffffff } /* Literal.Date */
+.codehilite .m { color: #0086f7; font-weight: bold } /* Literal.Number */
+.codehilite .s { color: #0086d2 } /* Literal.String */
+.codehilite .na { color: #ff0086; font-weight: bold } /* Name.Attribute */
+.codehilite .nb { color: #ffffff } /* Name.Builtin */
+.codehilite .nc { color: #ffffff } /* Name.Class */
+.codehilite .no { color: #0086d2 } /* Name.Constant */
+.codehilite .nd { color: #ffffff } /* Name.Decorator */
+.codehilite .ni { color: #ffffff } /* Name.Entity */
+.codehilite .ne { color: #ffffff } /* Name.Exception */
+.codehilite .nf { color: #ff0086; font-weight: bold } /* Name.Function */
+.codehilite .nl { color: #ffffff } /* Name.Label */
+.codehilite .nn { color: #ffffff } /* Name.Namespace */
+.codehilite .nx { color: #ffffff } /* Name.Other */
+.codehilite .py { color: #ffffff } /* Name.Property */
+.codehilite .nt { color: #fb660a; font-weight: bold } /* Name.Tag */
+.codehilite .nv { color: #fb660a } /* Name.Variable */
+.codehilite .ow { color: #ffffff } /* Operator.Word */
+.codehilite .w { color: #888888 } /* Text.Whitespace */
+.codehilite .mf { color: #0086f7; font-weight: bold } /* Literal.Number.Float */
+.codehilite .mh { color: #0086f7; font-weight: bold } /* Literal.Number.Hex */
+.codehilite .mi { color: #0086f7; font-weight: bold } /* Literal.Number.Integer */
+.codehilite .mo { color: #0086f7; font-weight: bold } /* Literal.Number.Oct */
+.codehilite .sb { color: #0086d2 } /* Literal.String.Backtick */
+.codehilite .sc { color: #0086d2 } /* Literal.String.Char */
+.codehilite .sd { color: #0086d2 } /* Literal.String.Doc */
+.codehilite .s2 { color: #0086d2 } /* Literal.String.Double */
+.codehilite .se { color: #0086d2 } /* Literal.String.Escape */
+.codehilite .sh { color: #0086d2 } /* Literal.String.Heredoc */
+.codehilite .si { color: #0086d2 } /* Literal.String.Interpol */
+.codehilite .sx { color: #0086d2 } /* Literal.String.Other */
+.codehilite .sr { color: #0086d2 } /* Literal.String.Regex */
+.codehilite .s1 { color: #0086d2 } /* Literal.String.Single */
+.codehilite .ss { color: #0086d2 } /* Literal.String.Symbol */
+.codehilite .bp { color: #ffffff } /* Name.Builtin.Pseudo */
+.codehilite .vc { color: #fb660a } /* Name.Variable.Class */
+.codehilite .vg { color: #fb660a } /* Name.Variable.Global */
+.codehilite .vi { color: #fb660a } /* Name.Variable.Instance */
+.codehilite .il { color: #0086f7; font-weight: bold } /* Literal.Number.Integer.Long */
View
61 biblion/static/css/pygments-css/manni.css
@@ -0,0 +1,61 @@
+.codehilite .hll { background-color: #ffffcc }
+.codehilite .c { color: #0099FF; font-style: italic } /* Comment */
+.codehilite .err { color: #AA0000; background-color: #FFAAAA } /* Error */
+.codehilite .k { color: #006699; font-weight: bold } /* Keyword */
+.codehilite .o { color: #555555 } /* Operator */
+.codehilite .cm { color: #0099FF; font-style: italic } /* Comment.Multiline */
+.codehilite .cp { color: #009999 } /* Comment.Preproc */
+.codehilite .c1 { color: #0099FF; font-style: italic } /* Comment.Single */
+.codehilite .cs { color: #0099FF; font-weight: bold; font-style: italic } /* Comment.Special */
+.codehilite .gd { background-color: #FFCCCC; border: 1px solid #CC0000 } /* Generic.Deleted */
+.codehilite .ge { font-style: italic } /* Generic.Emph */
+.codehilite .gr { color: #FF0000 } /* Generic.Error */
+.codehilite .gh { color: #003300; font-weight: bold } /* Generic.Heading */
+.codehilite .gi { background-color: #CCFFCC; border: 1px solid #00CC00 } /* Generic.Inserted */
+.codehilite .go { color: #AAAAAA } /* Generic.Output */
+.codehilite .gp { color: #000099; font-weight: bold } /* Generic.Prompt */
+.codehilite .gs { font-weight: bold } /* Generic.Strong */
+.codehilite .gu { color: #003300; font-weight: bold } /* Generic.Subheading */
+.codehilite .gt { color: #99CC66 } /* Generic.Traceback */
+.codehilite .kc { color: #006699; font-weight: bold } /* Keyword.Constant */
+.codehilite .kd { color: #006699; font-weight: bold } /* Keyword.Declaration */
+.codehilite .kn { color: #006699; font-weight: bold } /* Keyword.Namespace */
+.codehilite .kp { color: #006699 } /* Keyword.Pseudo */
+.codehilite .kr { color: #006699; font-weight: bold } /* Keyword.Reserved */
+.codehilite .kt { color: #007788; font-weight: bold } /* Keyword.Type */
+.codehilite .m { color: #FF6600 } /* Literal.Number */
+.codehilite .s { color: #CC3300 } /* Literal.String */
+.codehilite .na { color: #330099 } /* Name.Attribute */
+.codehilite .nb { color: #336666 } /* Name.Builtin */
+.codehilite .nc { color: #00AA88; font-weight: bold } /* Name.Class */
+.codehilite .no { color: #336600 } /* Name.Constant */
+.codehilite .nd { color: #9999FF } /* Name.Decorator */
+.codehilite .ni { color: #999999; font-weight: bold } /* Name.Entity */
+.codehilite .ne { color: #CC0000; font-weight: bold } /* Name.Exception */
+.codehilite .nf { color: #CC00FF } /* Name.Function */
+.codehilite .nl { color: #9999FF } /* Name.Label */
+.codehilite .nn { color: #00CCFF; font-weight: bold } /* Name.Namespace */
+.codehilite .nt { color: #330099; font-weight: bold } /* Name.Tag */
+.codehilite .nv { color: #003333 } /* Name.Variable */
+.codehilite .ow { color: #000000; font-weight: bold } /* Operator.Word */
+.codehilite .w { color: #bbbbbb } /* Text.Whitespace */
+.codehilite .mf { color: #FF6600 } /* Literal.Number.Float */
+.codehilite .mh { color: #FF6600 } /* Literal.Number.Hex */
+.codehilite .mi { color: #FF6600 } /* Literal.Number.Integer */
+.codehilite .mo { color: #FF6600 } /* Literal.Number.Oct */
+.codehilite .sb { color: #CC3300 } /* Literal.String.Backtick */
+.codehilite .sc { color: #CC3300 } /* Literal.String.Char */
+.codehilite .sd { color: #CC3300; font-style: italic } /* Literal.String.Doc */
+.codehilite .s2 { color: #CC3300 } /* Literal.String.Double */
+.codehilite .se { color: #CC3300; font-weight: bold } /* Literal.String.Escape */
+.codehilite .sh { color: #CC3300 } /* Literal.String.Heredoc */
+.codehilite .si { color: #AA0000 } /* Literal.String.Interpol */
+.codehilite .sx { color: #CC3300 } /* Literal.String.Other */
+.codehilite .sr { color: #33AAAA } /* Literal.String.Regex */
+.codehilite .s1 { color: #CC3300 } /* Literal.String.Single */
+.codehilite .ss { color: #FFCC33 } /* Literal.String.Symbol */
+.codehilite .bp { color: #336666 } /* Name.Builtin.Pseudo */
+.codehilite .vc { color: #003333 } /* Name.Variable.Class */
+.codehilite .vg { color: #003333 } /* Name.Variable.Global */
+.codehilite .vi { color: #003333 } /* Name.Variable.Instance */
+.codehilite .il { color: #FF6600 } /* Literal.Number.Integer.Long */
View
61 biblion/static/css/pygments-css/murphy.css
@@ -0,0 +1,61 @@
+.codehilite .hll { background-color: #ffffcc }
+.codehilite .c { color: #606060; font-style: italic } /* Comment */
+.codehilite .err { color: #F00000; background-color: #F0A0A0 } /* Error */
+.codehilite .k { color: #208090; font-weight: bold } /* Keyword */
+.codehilite .o { color: #303030 } /* Operator */
+.codehilite .cm { color: #606060; font-style: italic } /* Comment.Multiline */
+.codehilite .cp { color: #507090 } /* Comment.Preproc */
+.codehilite .c1 { color: #606060; font-style: italic } /* Comment.Single */
+.codehilite .cs { color: #c00000; font-weight: bold; font-style: italic } /* Comment.Special */
+.codehilite .gd { color: #A00000 } /* Generic.Deleted */
+.codehilite .ge { font-style: italic } /* Generic.Emph */
+.codehilite .gr { color: #FF0000 } /* Generic.Error */
+.codehilite .gh { color: #000080; font-weight: bold } /* Generic.Heading */
+.codehilite .gi { color: #00A000 } /* Generic.Inserted */
+.codehilite .go { color: #808080 } /* Generic.Output */
+.codehilite .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
+.codehilite .gs { font-weight: bold } /* Generic.Strong */
+.codehilite .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+.codehilite .gt { color: #0040D0 } /* Generic.Traceback */
+.codehilite .kc { color: #208090; font-weight: bold } /* Keyword.Constant */
+.codehilite .kd { color: #208090; font-weight: bold } /* Keyword.Declaration */
+.codehilite .kn { color: #208090; font-weight: bold } /* Keyword.Namespace */
+.codehilite .kp { color: #0080f0; font-weight: bold } /* Keyword.Pseudo */
+.codehilite .kr { color: #208090; font-weight: bold } /* Keyword.Reserved */
+.codehilite .kt { color: #6060f0; font-weight: bold } /* Keyword.Type */
+.codehilite .m { color: #6000E0; font-weight: bold } /* Literal.Number */
+.codehilite .s { background-color: #e0e0ff } /* Literal.String */
+.codehilite .na { color: #000070 } /* Name.Attribute */
+.codehilite .nb { color: #007020 } /* Name.Builtin */
+.codehilite .nc { color: #e090e0; font-weight: bold } /* Name.Class */
+.codehilite .no { color: #50e0d0; font-weight: bold } /* Name.Constant */
+.codehilite .nd { color: #505050; font-weight: bold } /* Name.Decorator */
+.codehilite .ni { color: #800000 } /* Name.Entity */
+.codehilite .ne { color: #F00000; font-weight: bold } /* Name.Exception */
+.codehilite .nf { color: #50e0d0; font-weight: bold } /* Name.Function */
+.codehilite .nl { color: #907000; font-weight: bold } /* Name.Label */
+.codehilite .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
+.codehilite .nt { color: #007000 } /* Name.Tag */
+.codehilite .nv { color: #003060 } /* Name.Variable */
+.codehilite .ow { color: #000000; font-weight: bold } /* Operator.Word */
+.codehilite .w { color: #bbbbbb } /* Text.Whitespace */
+.codehilite .mf { color: #6000E0; font-weight: bold } /* Literal.Number.Float */
+.codehilite .mh { color: #005080; font-weight: bold } /* Literal.Number.Hex */
+.codehilite .mi { color: #6060f0; font-weight: bold } /* Literal.Number.Integer */
+.codehilite .mo { color: #4000E0; font-weight: bold } /* Literal.Number.Oct */
+.codehilite .sb { background-color: #e0e0ff } /* Literal.String.Backtick */
+.codehilite .sc { color: #8080F0 } /* Literal.String.Char */
+.codehilite .sd { color: #D04020 } /* Literal.String.Doc */
+.codehilite .s2 { background-color: #e0e0ff } /* Literal.String.Double */
+.codehilite .se { color: #606060; font-weight: bold; background-color: #e0e0ff } /* Literal.String.Escape */
+.codehilite .sh { background-color: #e0e0ff } /* Literal.String.Heredoc */
+.codehilite .si { background-color: #e0e0e0 } /* Literal.String.Interpol */
+.codehilite .sx { color: #f08080; background-color: #e0e0ff } /* Literal.String.Other */
+.codehilite .sr { color: #000000; background-color: #e0e0ff } /* Literal.String.Regex */
+.codehilite .s1 { background-color: #e0e0ff } /* Literal.String.Single */
+.codehilite .ss { color: #f0c080 } /* Literal.String.Symbol */
+.codehilite .bp { color: #007020 } /* Name.Builtin.Pseudo */
+.codehilite .vc { color: #c0c0f0 } /* Name.Variable.Class */
+.codehilite .vg { color: #f08040 } /* Name.Variable.Global */
+.codehilite .vi { color: #a0a0f0 } /* Name.Variable.Instance */
+.codehilite .il { color: #6060f0; font-weight: bold } /* Literal.Number.Integer.Long */
View
69 biblion/static/css/pygments-css/native.css
@@ -0,0 +1,69 @@
+.codehilite .hll { background-color: #404040 }
+.codehilite .c { color: #999999; font-style: italic } /* Comment */
+.codehilite .err { color: #a61717; background-color: #e3d2d2 } /* Error */
+.codehilite .g { color: #d0d0d0 } /* Generic */
+.codehilite .k { color: #6ab825; font-weight: bold } /* Keyword */
+.codehilite .l { color: #d0d0d0 } /* Literal */
+.codehilite .n { color: #d0d0d0 } /* Name */
+.codehilite .o { color: #d0d0d0 } /* Operator */
+.codehilite .x { color: #d0d0d0 } /* Other */
+.codehilite .p { color: #d0d0d0 } /* Punctuation */
+.codehilite .cm { color: #999999; font-style: italic } /* Comment.Multiline */
+.codehilite .cp { color: #cd2828; font-weight: bold } /* Comment.Preproc */
+.codehilite .c1 { color: #999999; font-style: italic } /* Comment.Single */
+.codehilite .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */
+.codehilite .gd { color: #d22323 } /* Generic.Deleted */
+.codehilite .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */
+.codehilite .gr { color: #d22323 } /* Generic.Error */
+.codehilite .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */
+.codehilite .gi { color: #589819 } /* Generic.Inserted */
+.codehilite .go { color: #cccccc } /* Generic.Output */
+.codehilite .gp { color: #aaaaaa } /* Generic.Prompt */
+.codehilite .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */
+.codehilite .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */
+.codehilite .gt { color: #d22323 } /* Generic.Traceback */
+.codehilite .kc { color: #6ab825; font-weight: bold } /* Keyword.Constant */
+.codehilite .kd { color: #6ab825; font-weight: bold } /* Keyword.Declaration */
+.codehilite .kn { color: #6ab825; font-weight: bold } /* Keyword.Namespace */
+.codehilite .kp { color: #6ab825 } /* Keyword.Pseudo */
+.codehilite .kr { color: #6ab825; font-weight: bold } /* Keyword.Reserved */
+.codehilite .kt { color: #6ab825; font-weight: bold } /* Keyword.Type */
+.codehilite .ld { color: #d0d0d0 } /* Literal.Date */
+.codehilite .m { color: #3677a9 } /* Literal.Number */
+.codehilite .s { color: #ed9d13 } /* Literal.String */
+.codehilite .na { color: #bbbbbb } /* Name.Attribute */
+.codehilite .nb { color: #24909d } /* Name.Builtin */
+.codehilite .nc { color: #447fcf; text-decoration: underline } /* Name.Class */
+.codehilite .no { color: #40ffff } /* Name.Constant */
+.codehilite .nd { color: #ffa500 } /* Name.Decorator */
+.codehilite .ni { color: #d0d0d0 } /* Name.Entity */
+.codehilite .ne { color: #bbbbbb } /* Name.Exception */
+.codehilite .nf { color: #447fcf } /* Name.Function */
+.codehilite .nl { color: #d0d0d0 } /* Name.Label */
+.codehilite .nn { color: #447fcf; text-decoration: underline } /* Name.Namespace */
+.codehilite .nx { color: #d0d0d0 } /* Name.Other */
+.codehilite .py { color: #d0d0d0 } /* Name.Property */
+.codehilite .nt { color: #6ab825; font-weight: bold } /* Name.Tag */
+.codehilite .nv { color: #40ffff } /* Name.Variable */
+.codehilite .ow { color: #6ab825; font-weight: bold } /* Operator.Word */
+.codehilite .w { color: #666666 } /* Text.Whitespace */
+.codehilite .mf { color: #3677a9 } /* Literal.Number.Float */
+.codehilite .mh { color: #3677a9 } /* Literal.Number.Hex */
+.codehilite .mi { color: #3677a9 } /* Literal.Number.Integer */
+.codehilite .mo { color: #3677a9 } /* Literal.Number.Oct */
+.codehilite .sb { color: #ed9d13 } /* Literal.String.Backtick */
+.codehilite .sc { color: #ed9d13 } /* Literal.String.Char */
+.codehilite .sd { color: #ed9d13 } /* Literal.String.Doc */
+.codehilite .s2 { color: #ed9d13 } /* Literal.String.Double */
+.codehilite .se { color: #ed9d13 } /* Literal.String.Escape */
+.codehilite .sh { color: #ed9d13 } /* Literal.String.Heredoc */
+.codehilite .si { color: #ed9d13 } /* Literal.String.Interpol */
+.codehilite .sx { color: #ffa500 } /* Literal.String.Other */
+.codehilite .sr { color: #ed9d13 } /* Literal.String.Regex */
+.codehilite .s1 { color: #ed9d13 } /* Literal.String.Single */
+.codehilite .ss { color: #ed9d13 } /* Literal.String.Symbol */
+.codehilite .bp { color: #24909d } /* Name.Builtin.Pseudo */
+.codehilite .vc { color: #40ffff } /* Name.Variable.Class */
+.codehilite .vg { color: #40ffff } /* Name.Variable.Global */
+.codehilite .vi { color: #40ffff } /* Name.Variable.Instance */
+.codehilite .il { color: #3677a9 } /* Literal.Number.Integer.Long */
View
60 biblion/static/css/pygments-css/pastie.css
@@ -0,0 +1,60 @@
+.codehilite .hll { background-color: #ffffcc }
+.codehilite .c { color: #888888 } /* Comment */
+.codehilite .err { color: #a61717; background-color: #e3d2d2 } /* Error */
+.codehilite .k { color: #008800; font-weight: bold } /* Keyword */
+.codehilite .cm { color: #888888 } /* Comment.Multiline */
+.codehilite .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
+.codehilite .c1 { color: #888888 } /* Comment.Single */
+.codehilite .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
+.codehilite .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
+.codehilite .ge { font-style: italic } /* Generic.Emph */
+.codehilite .gr { color: #aa0000 } /* Generic.Error */
+.codehilite .gh { color: #303030 } /* Generic.Heading */
+.codehilite .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
+.codehilite .go { color: #888888 } /* Generic.Output */
+.codehilite .gp { color: #555555 } /* Generic.Prompt */
+.codehilite .gs { font-weight: bold } /* Generic.Strong */
+.codehilite .gu { color: #606060 } /* Generic.Subheading */
+.codehilite .gt { color: #aa0000 } /* Generic.Traceback */
+.codehilite .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
+.codehilite .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
+.codehilite .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
+.codehilite .kp { color: #008800 } /* Keyword.Pseudo */
+.codehilite .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
+.codehilite .kt { color: #888888; font-weight: bold } /* Keyword.Type */
+.codehilite .m { color: #0000DD; font-weight: bold } /* Literal.Number */
+.codehilite .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
+.codehilite .na { color: #336699 } /* Name.Attribute */
+.codehilite .nb { color: #003388 } /* Name.Builtin */
+.codehilite .nc { color: #bb0066; font-weight: bold } /* Name.Class */
+.codehilite .no { color: #003366; font-weight: bold } /* Name.Constant */
+.codehilite .nd { color: #555555 } /* Name.Decorator */
+.codehilite .ne { color: #bb0066; font-weight: bold } /* Name.Exception */
+.codehilite .nf { color: #0066bb; font-weight: bold } /* Name.Function */
+.codehilite .nl { color: #336699; font-style: italic } /* Name.Label */
+.codehilite .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */
+.codehilite .py { color: #336699; font-weight: bold } /* Name.Property */
+.codehilite .nt { color: #bb0066; font-weight: bold } /* Name.Tag */
+.codehilite .nv { color: #336699 } /* Name.Variable */
+.codehilite .ow { color: #008800 } /* Operator.Word */
+.codehilite .w { color: #bbbbbb } /* Text.Whitespace */
+.codehilite .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */
+.codehilite .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */
+.codehilite .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
+.codehilite .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */
+.codehilite .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */
+.codehilite .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */
+.codehilite .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */
+.codehilite .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */
+.codehilite .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */
+.codehilite .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */
+.codehilite .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */
+.codehilite .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */
+.codehilite .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */
+.codehilite .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */
+.codehilite .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */
+.codehilite .bp { color: #003388 } /* Name.Builtin.Pseudo */
+.codehilite .vc { color: #336699 } /* Name.Variable.Class */
+.codehilite .vg { color: #dd7700 } /* Name.Variable.Global */
+.codehilite .vi { color: #3333bb } /* Name.Variable.Instance */
+.codehilite .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
View
58 biblion/static/css/pygments-css/perldoc.css
@@ -0,0 +1,58 @@
+.codehilite .hll { background-color: #ffffcc }
+.codehilite .c { color: #228B22 } /* Comment */
+.codehilite .err { color: #a61717; background-color: #e3d2d2 } /* Error */
+.codehilite .k { color: #8B008B; font-weight: bold } /* Keyword */
+.codehilite .cm { color: #228B22 } /* Comment.Multiline */
+.codehilite .cp { color: #1e889b } /* Comment.Preproc */
+.codehilite .c1 { color: #228B22 } /* Comment.Single */
+.codehilite .cs { color: #8B008B; font-weight: bold } /* Comment.Special */
+.codehilite .gd { color: #aa0000 } /* Generic.Deleted */
+.codehilite .ge { font-style: italic } /* Generic.Emph */
+.codehilite .gr { color: #aa0000 } /* Generic.Error */
+.codehilite .gh { color: #000080; font-weight: bold } /* Generic.Heading */
+.codehilite .gi { color: #00aa00 } /* Generic.Inserted */
+.codehilite .go { color: #888888 } /* Generic.Output */
+.codehilite .gp { color: #555555 } /* Generic.Prompt */
+.codehilite .gs { font-weight: bold } /* Generic.Strong */
+.codehilite .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+.codehilite .gt { color: #aa0000 } /* Generic.Traceback */
+.codehilite .kc { color: #8B008B; font-weight: bold } /* Keyword.Constant */
+.codehilite .kd { color: #8B008B; font-weight: bold } /* Keyword.Declaration */
+.codehilite .kn { color: #8B008B; font-weight: bold } /* Keyword.Namespace */
+.codehilite .kp { color: #8B008B; font-weight: bold } /* Keyword.Pseudo */
+.codehilite .kr { color: #8B008B; font-weight: bold } /* Keyword.Reserved */
+.codehilite .kt { color: #a7a7a7; font-weight: bold } /* Keyword.Type */
+.codehilite .m { color: #B452CD } /* Literal.Number */
+.codehilite .s { color: #CD5555 } /* Literal.String */
+.codehilite .na { color: #658b00 } /* Name.Attribute */
+.codehilite .nb { color: #658b00 } /* Name.Builtin */
+.codehilite .nc { color: #008b45; font-weight: bold } /* Name.Class */
+.codehilite .no { color: #00688B } /* Name.Constant */
+.codehilite .nd { color: #707a7c } /* Name.Decorator */
+.codehilite .ne { color: #008b45; font-weight: bold } /* Name.Exception */
+.codehilite .nf { color: #008b45 } /* Name.Function */
+.codehilite .nn { color: #008b45; text-decoration: underline } /* Name.Namespace */
+.codehilite .nt { color: #8B008B; font-weight: bold } /* Name.Tag */
+.codehilite .nv { color: #00688B } /* Name.Variable */
+.codehilite .ow { color: #8B008B } /* Operator.Word */
+.codehilite .w { color: #bbbbbb } /* Text.Whitespace */
+.codehilite .mf { color: #B452CD } /* Literal.Number.Float */
+.codehilite .mh { color: #B452CD } /* Literal.Number.Hex */
+.codehilite .mi { color: #B452CD } /* Literal.Number.Integer */
+.codehilite .mo { color: #B452CD } /* Literal.Number.Oct */
+.codehilite .sb { color: #CD5555 } /* Literal.String.Backtick */
+.codehilite .sc { color: #CD5555 } /* Literal.String.Char */
+.codehilite .sd { color: #CD5555 } /* Literal.String.Doc */
+.codehilite .s2 { color: #CD5555 } /* Literal.String.Double */
+.codehilite .se { color: #CD5555 } /* Literal.String.Escape */
+.codehilite .sh { color: #1c7e71; font-style: italic } /* Literal.String.Heredoc */
+.codehilite .si { color: #CD5555 } /* Literal.String.Interpol */
+.codehilite .sx { color: #cb6c20 } /* Literal.String.Other */
+.codehilite .sr { color: #1c7e71 } /* Literal.String.Regex */
+.codehilite .s1 { color: #CD5555 } /* Literal.String.Single */
+.codehilite .ss { color: #CD5555 } /* Literal.String.Symbol */
+.codehilite .bp { color: #658b00 } /* Name.Builtin.Pseudo */
+.codehilite .vc { color: #00688B } /* Name.Variable.Class */
+.codehilite .vg { color: #00688B } /* Name.Variable.Global */
+.codehilite .vi { color: #00688B } /* Name.Variable.Instance */
+.codehilite .il { color: #B452CD } /* Literal.Number.Integer.Long */
View
69 biblion/static/css/pygments-css/tango.css
@@ -0,0 +1,69 @@
+.codehilite .hll { background-color: #ffffcc }
+.codehilite .c { color: #8f5902; font-style: italic } /* Comment */
+.codehilite .err { color: #a40000; border: 1px solid #ef2929 } /* Error */
+.codehilite .g { color: #000000 } /* Generic */
+.codehilite .k { color: #204a87; font-weight: bold } /* Keyword */
+.codehilite .l { color: #000000 } /* Literal */
+.codehilite .n { color: #000000 } /* Name */
+.codehilite .o { color: #ce5c00; font-weight: bold } /* Operator */
+.codehilite .x { color: #000000 } /* Other */
+.codehilite .p { color: #000000; font-weight: bold } /* Punctuation */
+.codehilite .cm { color: #8f5902; font-style: italic } /* Comment.Multiline */
+.codehilite .cp { color: #8f5902; font-style: italic } /* Comment.Preproc */
+.codehilite .c1 { color: #8f5902; font-style: italic } /* Comment.Single */
+.codehilite .cs { color: #8f5902; font-style: italic } /* Comment.Special */
+.codehilite .gd { color: #a40000 } /* Generic.Deleted */
+.codehilite .ge { color: #000000; font-style: italic } /* Generic.Emph */
+.codehilite .gr { color: #ef2929 } /* Generic.Error */
+.codehilite .gh { color: #000080; font-weight: bold } /* Generic.Heading */
+.codehilite .gi { color: #00A000 } /* Generic.Inserted */
+.codehilite .go { color: #000000; font-style: italic } /* Generic.Output */
+.codehilite .gp { color: #8f5902 } /* Generic.Prompt */
+.codehilite .gs { color: #000000; font-weight: bold } /* Generic.Strong */
+.codehilite .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+.codehilite .gt { color: #a40000; font-weight: bold } /* Generic.Traceback */
+.codehilite .kc { color: #204a87; font-weight: bold } /* Keyword.Constant */
+.codehilite .kd { color: #204a87; font-weight: bold } /* Keyword.Declaration */
+.codehilite .kn { color: #204a87; font-weight: bold } /* Keyword.Namespace */
+.codehilite .kp { color: #204a87; font-weight: bold } /* Keyword.Pseudo */
+.codehilite .kr { color: #204a87; font-weight: bold } /* Keyword.Reserved */
+.codehilite .kt { color: #204a87; font-weight: bold } /* Keyword.Type */
+.codehilite .ld { color: #000000 } /* Literal.Date */
+.codehilite .m { color: #0000cf; font-weight: bold } /* Literal.Number */
+.codehilite .s { color: #4e9a06 } /* Literal.String */
+.codehilite .na { color: #c4a000 } /* Name.Attribute */
+.codehilite .nb { color: #204a87 } /* Name.Builtin */
+.codehilite .nc { color: #000000 } /* Name.Class */
+.codehilite .no { color: #000000 } /* Name.Constant */
+.codehilite .nd { color: #5c35cc; font-weight: bold } /* Name.Decorator */
+.codehilite .ni { color: #ce5c00 } /* Name.Entity */
+.codehilite .ne { color: #cc0000; font-weight: bold } /* Name.Exception */
+.codehilite .nf { color: #000000 } /* Name.Function */
+.codehilite .nl { color: #f57900 } /* Name.Label */
+.codehilite .nn { color: #000000 } /* Name.Namespace */
+.codehilite .nx { color: #000000 } /* Name.Other */
+.codehilite .py { color: #000000 } /* Name.Property */
+.codehilite .nt { color: #204a87; font-weight: bold } /* Name.Tag */
+.codehilite .nv { color: #000000 } /* Name.Variable */
+.codehilite .ow { color: #204a87; font-weight: bold } /* Operator.Word */
+.codehilite .w { color: #f8f8f8; text-decoration: underline } /* Text.Whitespace */
+.codehilite .mf { color: #0000cf; font-weight: bold } /* Literal.Number.Float */
+.codehilite .mh { color: #0000cf; font-weight: bold } /* Literal.Number.Hex */
+.codehilite .mi { color: #0000cf; font-weight: bold } /* Literal.Number.Integer */
+.codehilite .mo { color: #0000cf; font-weight: bold } /* Literal.Number.Oct */
+.codehilite .sb { color: #4e9a06 } /* Literal.String.Backtick */
+.codehilite .sc { color: #4e9a06 } /* Literal.String.Char */
+.codehilite .sd { color: #8f5902; font-style: italic } /* Literal.String.Doc */
+.codehilite .s2 { color: #4e9a06 } /* Literal.String.Double */
+.codehilite .se { color: #4e9a06 } /* Literal.String.Escape */
+.codehilite .sh { color: #4e9a06 } /* Literal.String.Heredoc */
+.codehilite .si { color: #4e9a06 } /* Literal.String.Interpol */
+.codehilite .sx { color: #4e9a06 } /* Literal.String.Other */
+.codehilite .sr { color: #4e9a06 } /* Literal.String.Regex */
+.codehilite .s1 { color: #4e9a06 } /* Literal.String.Single */
+.codehilite .ss { color: #4e9a06 } /* Literal.String.Symbol */
+.codehilite .bp { color: #3465a4 } /* Name.Builtin.Pseudo */
+.codehilite .vc { color: #000000 } /* Name.Variable.Class */
+.codehilite .vg { color: #000000 } /* Name.Variable.Global */
+.codehilite .vi { color: #000000 } /* Name.Variable.Instance */
+.codehilite .il { color: #0000cf; font-weight: bold } /* Literal.Number.Integer.Long */
View
59 biblion/static/css/pygments-css/trac.css
@@ -0,0 +1,59 @@
+.codehilite .hll { background-color: #ffffcc }
+.codehilite .c { color: #999988; font-style: italic } /* Comment */
+.codehilite .err { color: #a61717; background-color: #e3d2d2 } /* Error */
+.codehilite .k { font-weight: bold } /* Keyword */
+.codehilite .o { font-weight: bold } /* Operator */
+.codehilite .cm { color: #999988; font-style: italic } /* Comment.Multiline */
+.codehilite .cp { color: #999999; font-weight: bold } /* Comment.Preproc */
+.codehilite .c1 { color: #999988; font-style: italic } /* Comment.Single */
+.codehilite .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
+.codehilite .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
+.codehilite .ge { font-style: italic } /* Generic.Emph */
+.codehilite .gr { color: #aa0000 } /* Generic.Error */
+.codehilite .gh { color: #999999 } /* Generic.Heading */
+.codehilite .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
+.codehilite .go { color: #888888 } /* Generic.Output */
+.codehilite .gp { color: #555555 } /* Generic.Prompt */
+.codehilite .gs { font-weight: bold } /* Generic.Strong */
+.codehilite .gu { color: #aaaaaa } /* Generic.Subheading */
+.codehilite .gt { color: #aa0000 } /* Generic.Traceback */
+.codehilite .kc { font-weight: bold } /* Keyword.Constant */
+.codehilite .kd { font-weight: bold } /* Keyword.Declaration */
+.codehilite .kn { font-weight: bold } /* Keyword.Namespace */
+.codehilite .kp { font-weight: bold } /* Keyword.Pseudo */
+.codehilite .kr { font-weight: bold } /* Keyword.Reserved */
+.codehilite .kt { color: #445588; font-weight: bold } /* Keyword.Type */
+.codehilite .m { color: #009999 } /* Literal.Number */
+.codehilite .s { color: #bb8844 } /* Literal.String */
+.codehilite .na { color: #008080 } /* Name.Attribute */
+.codehilite .nb { color: #999999 } /* Name.Builtin */
+.codehilite .nc { color: #445588; font-weight: bold } /* Name.Class */
+.codehilite .no { color: #008080 } /* Name.Constant */
+.codehilite .ni { color: #800080 } /* Name.Entity */
+.codehilite .ne { color: #990000; font-weight: bold } /* Name.Exception */
+.codehilite .nf { color: #990000; font-weight: bold } /* Name.Function */
+.codehilite .nn { color: #555555 } /* Name.Namespace */
+.codehilite .nt { color: #000080 } /* Name.Tag */
+.codehilite .nv { color: #008080 } /* Name.Variable */
+.codehilite .ow { font-weight: bold } /* Operator.Word */
+.codehilite .w { color: #bbbbbb } /* Text.Whitespace */
+.codehilite .mf { color: #009999 } /* Literal.Number.Float */
+.codehilite .mh { color: #009999 } /* Literal.Number.Hex */
+.codehilite .mi { color: #009999 } /* Literal.Number.Integer */
+.codehilite .mo { color: #009999 } /* Literal.Number.Oct */
+.codehilite .sb { color: #bb8844 } /* Literal.String.Backtick */
+.codehilite .sc { color: #bb8844 } /* Literal.String.Char */
+.codehilite .sd { color: #bb8844 } /* Literal.String.Doc */
+.codehilite .s2 { color: #bb8844 } /* Literal.String.Double */
+.codehilite .se { color: #bb8844 } /* Literal.String.Escape */
+.codehilite .sh { color: #bb8844 } /* Literal.String.Heredoc */
+.codehilite .si { color: #bb8844 } /* Literal.String.Interpol */
+.codehilite .sx { color: #bb8844 } /* Literal.String.Other */
+.codehilite .sr { color: #808000 } /* Literal.String.Regex */
+.codehilite .s1 { color: #bb8844 } /* Literal.String.Single */
+.codehilite .ss { color: #bb8844 } /* Literal.String.Symbol */
+.codehilite .bp { color: #999999 } /* Name.Builtin.Pseudo */
+.codehilite .vc { color: #008080 } /* Name.Variable.Class */
+.codehilite .vg { color: #008080 } /* Name.Variable.Global */
+.codehilite .vi { color: #008080 } /* Name.Variable.Instance */
+.codehilite .il { color: #009999 } /* Literal.Number.Integer.Long */
View
69 biblion/static/css/pygments-css/vim.css
@@ -0,0 +1,69 @@
+.codehilite .hll { background-color: #222222 }
+.codehilite .c { color: #000080 } /* Comment */
+.codehilite .err { color: #cccccc; border: 1px solid #FF0000 } /* Error */
+.codehilite .g { color: #cccccc } /* Generic */
+.codehilite .k { color: #cdcd00 } /* Keyword */
+.codehilite .l { color: #cccccc } /* Literal */
+.codehilite .n { color: #cccccc } /* Name */
+.codehilite .o { color: #3399cc } /* Operator */
+.codehilite .x { color: #cccccc } /* Other */
+.codehilite .p { color: #cccccc } /* Punctuation */
+.codehilite .cm { color: #000080 } /* Comment.Multiline */
+.codehilite .cp { color: #000080 } /* Comment.Preproc */
+.codehilite .c1 { color: #000080 } /* Comment.Single */
+.codehilite .cs { color: #cd0000; font-weight: bold } /* Comment.Special */
+.codehilite .gd { color: #cd0000 } /* Generic.Deleted */
+.codehilite .ge { color: #cccccc; font-style: italic } /* Generic.Emph */
+.codehilite .gr { color: #FF0000 } /* Generic.Error */
+.codehilite .gh { color: #000080; font-weight: bold } /* Generic.Heading */
+.codehilite .gi { color: #00cd00 } /* Generic.Inserted */
+.codehilite .go { color: #808080 } /* Generic.Output */
+.codehilite .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
+.codehilite .gs { color: #cccccc; font-weight: bold } /* Generic.Strong */
+.codehilite .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+.codehilite .gt { color: #0040D0 } /* Generic.Traceback */
+.codehilite .kc { color: #cdcd00 } /* Keyword.Constant */
+.codehilite .kd { color: #00cd00 } /* Keyword.Declaration */
+.codehilite .kn { color: #cd00cd } /* Keyword.Namespace */
+.codehilite .kp { color: #cdcd00 } /* Keyword.Pseudo */
+.codehilite .kr { color: #cdcd00 } /* Keyword.Reserved */
+.codehilite .kt { color: #00cd00 } /* Keyword.Type */
+.codehilite .ld { color: #cccccc } /* Literal.Date */
+.codehilite .m { color: #cd00cd } /* Literal.Number */
+.codehilite .s { color: #cd0000 } /* Literal.String */
+.codehilite .na { color: #cccccc } /* Name.Attribute */
+.codehilite .nb { color: #cd00cd } /* Name.Builtin */
+.codehilite .nc { color: #00cdcd } /* Name.Class */
+.codehilite .no { color: #cccccc } /* Name.Constant */
+.codehilite .nd { color: #cccccc } /* Name.Decorator */
+.codehilite .ni { color: #cccccc } /* Name.Entity */
+.codehilite .ne { color: #666699; font-weight: bold } /* Name.Exception */
+.codehilite .nf { color: #cccccc } /* Name.Function */
+.codehilite .nl { color: #cccccc } /* Name.Label */
+.codehilite .nn { color: #cccccc } /* Name.Namespace */
+.codehilite .nx { color: #cccccc } /* Name.Other */
+.codehilite .py { color: #cccccc } /* Name.Property */
+.codehilite .nt { color: #cccccc } /* Name.Tag */
+.codehilite .nv { color: #00cdcd } /* Name.Variable */
+.codehilite .ow { color: #cdcd00 } /* Operator.Word */
+.codehilite .w { color: #cccccc } /* Text.Whitespace */
+.codehilite .mf { color: #cd00cd } /* Literal.Number.Float */
+.codehilite .mh { color: #cd00cd } /* Literal.Number.Hex */
+.codehilite .mi { color: #cd00cd } /* Literal.Number.Integer */
+.codehilite .mo { color: #cd00cd } /* Literal.Number.Oct */
+.codehilite .sb { color: #cd0000 } /* Literal.String.Backtick */
+.codehilite .sc { color: #cd0000 } /* Literal.String.Char */
+.codehilite .sd { color: #cd0000 } /* Literal.String.Doc */
+.codehilite .s2 { color: #cd0000 } /* Literal.String.Double */
+.codehilite .se { color: #cd0000 } /* Literal.String.Escape */
+.codehilite .sh { color: #cd0000 } /* Literal.String.Heredoc */
+.codehilite .si { color: #cd0000 } /* Literal.String.Interpol */
+.codehilite .sx { color: #cd0000 } /* Literal.String.Other */
+.codehilite .sr { color: #cd0000 } /* Literal.String.Regex */
+.codehilite .s1 { color: #cd0000 } /* Literal.String.Single */
+.codehilite .ss { color: #cd0000 } /* Literal.String.Symbol */
+.codehilite .bp { color: #cd00cd } /* Name.Builtin.Pseudo */
+.codehilite .vc { color: #00cdcd } /* Name.Variable.Class */
+.codehilite .vg { color: #00cdcd } /* Name.Variable.Global */
+.codehilite .vi { color: #00cdcd } /* Name.Variable.Instance */
+.codehilite .il { color: #cd00cd } /* Literal.Number.Integer.Long */
View
33 biblion/static/css/pygments-css/vs.css
@@ -0,0 +1,33 @@
+.codehilite .hll { background-color: #ffffcc }
+.codehilite .c { color: #008000 } /* Comment */
+.codehilite .err { border: 1px solid #FF0000 } /* Error */
+.codehilite .k { color: #0000ff } /* Keyword */
+.codehilite .cm { color: #008000 } /* Comment.Multiline */
+.codehilite .cp { color: #0000ff } /* Comment.Preproc */
+.codehilite .c1 { color: #008000 } /* Comment.Single */
+.codehilite .cs { color: #008000 } /* Comment.Special */
+.codehilite .ge { font-style: italic } /* Generic.Emph */
+.codehilite .gh { font-weight: bold } /* Generic.Heading */
+.codehilite .gp { font-weight: bold } /* Generic.Prompt */
+.codehilite .gs { font-weight: bold } /* Generic.Strong */
+.codehilite .gu { font-weight: bold } /* Generic.Subheading */
+.codehilite .kc { color: #0000ff } /* Keyword.Constant */
+.codehilite .kd { color: #0000ff } /* Keyword.Declaration */
+.codehilite .kn { color: #0000ff } /* Keyword.Namespace */
+.codehilite .kp { color: #0000ff } /* Keyword.Pseudo */
+.codehilite .kr { color: #0000ff } /* Keyword.Reserved */
+.codehilite .kt { color: #2b91af } /* Keyword.Type */
+.codehilite .s { color: #a31515 } /* Literal.String */
+.codehilite .nc { color: #2b91af } /* Name.Class */
+.codehilite .ow { color: #0000ff } /* Operator.Word */
+.codehilite .sb { color: #a31515 } /* Literal.String.Backtick */
+.codehilite .sc { color: #a31515 } /* Literal.String.Char */
+.codehilite .sd { color: #a31515 } /* Literal.String.Doc */
+.codehilite .s2 { color: #a31515 } /* Literal.String.Double */
+.codehilite .se { color: #a31515 } /* Literal.String.Escape */
+.codehilite .sh { color: #a31515 } /* Literal.String.Heredoc */
+.codehilite .si { color: #a31515 } /* Literal.String.Interpol */
+.codehilite .sx { color: #a31515 } /* Literal.String.Other */
+.codehilite .sr { color: #a31515 } /* Literal.String.Regex */
+.codehilite .s1 { color: #a31515 } /* Literal.String.Single */
+.codehilite .ss { color: #a31515 } /* Literal.String.Symbol */
View
10 biblion/templates/biblion/atom_entry.xml
@@ -1,3 +1,5 @@
+{% load biblion_tags %}
+
<entry xml:base="http://{{ current_site.domain }}/">
<id>http://{{ current_site.domain }}{{ entry.get_absolute_url }}</id>
<title>{{ entry.title }}</title>
@@ -12,14 +14,14 @@
<summary type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
- {{ entry.teaser_html|safe }}
+ {{ entry.teaser|safe }}
</div>
</summary>
<content type="xhtml" xml:lang="en">
<div xmlns="http://www.w3.org/1999/xhtml">
- {{ entry.teaser_html|safe }}
- {{ entry.content_html|safe }}
+ {{ entry.teaser|safe }}
+ {{ entry|to_html }}
</div>
</content>
-</entry>
+</entry>
View
4 biblion/templatetags/biblion_tags.py
@@ -2,11 +2,15 @@
from biblion.models import Post
from biblion.settings import ALL_SECTION_NAME, SECTIONS
+from biblion.utils.code_hilite import to_html
register = template.Library()
+register.filter("to_html", to_html)
+
+
class LatestBlogPostsNode(template.Node):
def __init__(self, context_var):
View
0 biblion/utils/__init__.py
No changes.
View
97 biblion/utils/code_hilite.py
@@ -0,0 +1,97 @@
+from pygments import highlight
+from pygments.formatters import HtmlFormatter
+from pygments.lexers import get_lexer_by_name, TextLexer
+
+from docutils import nodes
+from docutils.writers import html4css1
+from docutils.core import publish_parts
+from docutils.parsers.rst import directives
+
+import markdown
+import textile
+
+from django.utils.safestring import mark_safe
+
+from mdx_codehilite import makeExtension
+from biblion.utils import creole_parser
+
+
+VARIANTS = {}
+
+
+def pygments_directive(name, arguments, options, content, lineno,
+ content_offset, block_text, state, state_machine):
+ try:
+ lexer = get_lexer_by_name(arguments[0])
+ except (ValueError, IndexError):
+ # no lexer found - use the text one instead of an exception
+ lexer = TextLexer()
+ parsed = highlight(u"\n".join(content), lexer, HtmlFormatter())
+ return [nodes.raw("", parsed, format="html")]
+pygments_directive.arguments = (0, 1, False)
+pygments_directive.content = 1
+pygments_directive.options = dict([(key, directives.flag) for key in VARIANTS])
+
+directives.register_directive("sourcecode", pygments_directive)
+
+
+class HTMLWriter(html4css1.Writer):
+ def __init__(self):
+ html4css1.Writer.__init__(self)
+ self.translator_class = HTMLTranslator
+
+
+class HTMLTranslator(html4css1.HTMLTranslator):
+ named_tags = []
+
+ def visit_literal(self, node):
+ # @@@ wrapping fixes.
+ self.body.append("<code>%s</code>" % node.astext())
+ raise nodes.SkipNode
+
+
+def rst_to_html(value):
+ parts = publish_parts(source=value, writer=HTMLWriter(),
+ settings_overrides={"initial_header_level": 2})
+ return parts["fragment"]
+
+
+def markdown_to_html(text):
+ """
+ Convert markdown to HTML with code hiliting
+ """
+ return unicode(markdown.markdown(text, extensions=('codehilite',)))
+
+
+def textile_to_html(text):
+ """
+ Convert textile to HTML
+ @@@ add code hiliting support
+ """
+ return unicode(textile.textile(text))
+
+
+def creole_to_html(text):
+ """
+ Convert creole to HTML
+ @@@ add code hiliting support
+ """
+ return unicode(creole_parser.parse(text, emitter=creole_parser.BiblionHtmlEmitter))
+
+
+def to_html(obj):
+ """
+ Markup filter that converts an object to html formatting.
+ Syntax hiliting support for rst and markdown only.
+ """
+ if obj.markup_type == 1: # HTML
+ html = obj.content
+ elif obj.markup_type == 2: # Creole
+ html = creole_to_html(obj.content)
+ elif obj.markup_type == 3: # Markdown
+ html = markdown_to_html(obj.content)
+ elif obj.markup_type == 4: # reStructuredText
+ html = rst_to_html(obj.content)
+ elif obj.markup_type == 5: # Textile
+ html = textile_to_html(obj.content)
+ return mark_safe(html)
View
0 biblion/creole_parser.py → biblion/utils/creole_parser.py
File renamed without changes.
View
278 biblion/utils/mdx_codehilite.py
@@ -0,0 +1,278 @@
+#!/usr/bin/python
+import markdown
+
+"""
+File from https://code.achinghead.com/browser/py-markdown-ext/codehilite/trunk/mdx_codehilite.py?rev=22
+"""
+
+
+# --------------- CONSTANTS YOU MIGHT WANT TO MODIFY -----------------
+
+DEFAULT_HILITER = 'pygments' # one of 'enscript', 'dp', or 'pygments'
+try:
+ TAB_LENGTH = markdown.TAB_LENGTH
+except AttributeError:
+ TAB_LENGTH = 4
+
+# --------------- THE CODE -------------------------------------------
+# --------------- hiliter utility functions --------------------------
+def escape(txt) :
+ '''basic html escaping'''
+ txt = txt.replace('&', '&amp;')
+ txt = txt.replace('<', '&lt;')
+ txt = txt.replace('>', '&gt;')
+ txt = txt.replace('"', '&quot;')
+ return txt
+
+def number(txt):
+ '''use <ol> for line numbering'''
+ # Fix Whitespace
+ txt = txt.replace('\t', ' '*TAB_LENGTH)
+ txt = txt.replace(" "*4, "&nbsp; &nbsp; ")
+ txt = txt.replace(" "*3, "&nbsp; &nbsp;")
+ txt = txt.replace(" "*2, "&nbsp; ")
+
+ # Add line numbers
+ lines = txt.splitlines()
+ txt = '<div class="codehilite"<pre><ol>\n'
+ for line in lines:
+ txt += '\t<li>%s</li>\n'% line
+ txt += '</ol></pre></div>\n'
+ return txt
+
+# ---------------- The hiliters ---------------------------------------
+def enscript(src, lang=None, num=True):
+ '''
+Pass source code on to [enscript] (http://www.codento.com/people/mtr/genscript/)
+command line utility for hiliting.
+
+Usage:
+ >>> enscript(src [, lang [, num ]] )
+
+ @param src: Can be a string or any object with a .readline attribute.
+
+ @param lang: The language of code. Basic escaping only, if None.
+
+ @param num: (Boolen) Turns line numbering 'on' or 'off' (on by default).
+
+ @returns : A string of html.
+ '''
+ if lang:
+ cmd = 'enscript --highlight=%s --color --language=html --tabsize=%d --output=-'% (lang, TAB_LENGTH)
+ from os import popen3
+ (i, out, err) = popen3(cmd)
+ i.write(src)
+ i.close()
+ # check for errors
+ e = err.read()
+ if e != 'output left in -\n' :
+ # error - just escape
+ txt = escape(src)
+ else :
+ import re
+ pattern = re.compile(r'<PRE>(?P<code>.*?)</PRE>', re.DOTALL)
+ txt = pattern.search(out.read()).group('code')
+ # fix enscripts output
+ txt = txt.replace('\n</FONT></I>', '</FONT></I>\n').strip()
+ html_map = {'<I>' : '<em>',
+ '</I>' : '</em>',
+ '<B>' : '<strong>',
+ '</B>' : '</strong>',
+ '<FONT COLOR="#' : '<span style="color:#',
+ '</FONT>' : '</span>'
+ }
+ for k, v in html_map.items() :
+ txt = txt.replace(k, v)
+ else:
+ txt = escape(src)
+ if num :
+ txt = number(txt)
+ else :
+ txt = '<div class="codehilite"><pre>%s</pre></div>\n'% txt
+ return txt
+
+
+def dp(src, lang=None, num=True):
+ '''
+Pass source code to a textarea for the [dp.SyntaxHighlighter] (http://www.dreamprojections.com/syntaxhighlighter/Default.aspx)
+
+Usage:
+ >>> dp(src [, lang [, num ]] )
+
+ @param src: A string.
+
+ @param lang: The language of code. Undefined if None.
+
+ @param num: (Boolen) Turns line numbering 'on' or 'off' (on by default).
+
+ @returns : A string of html.
+ '''
+ gutter = ''
+ if not num:
+ gutter = ':nogutter'
+ if not lang:
+ lang = ''
+
+ return '<div class="codehilite"><textarea name="code" class="%s%s" cols="60" rows="10">\n%s\n</textarea></div>\n'% (lang, gutter, src)
+
+def pygment(src, lang = None, num = True):
+ '''
+Pass code to the [Pygments](http://pygments.pocoo.org/) highliter with
+optional line numbers. The output should then be styled with css to your liking.
+No styles are applied by default - only styling hooks (i.e.: <span class="k">).
+
+Usage:
+ >>> pygment(src [, lang [, num ]] )
+
+ @param src: Can be a string or any object with a .readline attribute.
+
+ @param lang: The language of code. Pygments will try to guess language if None.
+
+ @param num: (Boolen) Turns line numbering 'on' or 'off' (on by default).
+
+ @returns : A string of html.
+ '''
+ try:
+ from pygments import highlight
+ from pygments.lexers import get_lexer_by_name, guess_lexer, TextLexer
+ from pygments.formatters import HtmlFormatter
+ except ImportError:
+ # just escape and pass through
+ txt = escape(src)
+ if num:
+ txt = number(txt)
+ else :
+ txt = '<div class="codehilite"><pre>%s</pre></div>\n'% txt
+ return txt
+ else:
+ try:
+ lexer = get_lexer_by_name(lang)
+ except ValueError:
+ try:
+ lexer = guess_lexer(src)
+ except ValueError:
+ lexer = TextLexer()
+ formatter = HtmlFormatter(linenos=num, cssclass="codehilite")
+ return highlight(src, lexer, formatter)
+
+
+# ------------------ The Main CodeHilite Class ----------------------
+class CodeHilite:
+ '''
+A wrapper class providing a single API for various hilighting engines. Takes source code, determines which language it containes (if not provided), and passes it into the hiliter specified.
+
+Basic Usage:
+ >>> code = CodeHilite(src = text)
+ >>> html = code.hilite()
+
+ @param src: Can be a string or any object with a .readline attribute.
+
+ @param lang: A string. Accepted values determined by hiliter used. Overrides _getLang()
+
+ @param linenos: (Boolen) Turns line numbering 'on' or 'off' (off by default).
+
+ @param hiliter: A string. One of 'enscript', 'dp', or 'pygments'.
+
+Low Level Usage:
+ >>> code = CodeHilite()
+ >>> code.src = text # Can be a string or any object with a .readline attribute.
+ >>> code.lang = 'python' # Setting this will override _getLang()
+ >>> code.linenos = True # True or False; Turns line numbering on or off.
+ >>> code.hiliter = MyCustomHiliter # Where MyCustomHiliter is callable, takes three arguments (src, lang, linenos) and returns a string.
+ >>> html = code.hilite()
+ '''
+ def __init__(self, src=None, lang=None, linenos = False, hiliter=DEFAULT_HILITER):
+ self.src = src
+ self.lang = lang
+ self.linenos = linenos
+ # map of highlighters
+ hl_map = { 'enscript' : enscript, 'dp' : dp, 'pygments' : pygment }
+ try :
+ self.hiliter = hl_map[hiliter]
+ except KeyError:
+ raise "Please provide a valid hiliter as a string. One of 'enscript', 'dp', or 'pygments'"
+
+
+ def _getLang(self):
+ '''
+Determines language of a code block from shebang lines and whether said line should be removed or left in place. If the sheband line contains a path (even a single /) then it is assumed to be a real shebang lines and left alone. However, if no path is given (e.i.: #!python or :::python) then it is assumed to be a mock shebang for language identifitation of a code fragment and removed from the code block prior to processing for code highlighting. When a mock shebang (e.i: #!python) is found, line numbering is turned on. When colons are found in place of a shebang (e.i.: :::python), line numbering is left in the current state - off by default.
+ '''
+ import re
+
+ #split text into lines
+ lines = self.src.split("\n")
+ #pull first line to examine
+ fl = lines.pop(0)
+
+ c = re.compile(r'''
+ (?:(?:::+)|(?P<shebang>[#]!)) #shebang or 2 or more colons
+ (?P<path>(?:/\w+)*[/ ])? # zero or 1 path ending in either a / or a single space
+ (?P<lang>\w*) # the language (a single / or space before lang is a path)
+ ''', re.VERBOSE)
+ # search first line for shebang
+ m = c.search(fl)
+
+ if m:
+ # we have a match
+ try:
+ self.lang = m.group('lang').lower()
+ except IndexError:
+ self.lang = None
+ if m.group('path') and m.group('path').strip(): #We need to avoid matching empty paths in ":::\b*bash"
+ # path exists - restore first line
+ print m.group('path'), "path found for", m.group('lang')
+ lines.insert(0, fl)
+ if m.group('shebang'):
+ # shebang exists - use line numbers
+ self.linenos = True
+ else:
+ # No match
+ lines.insert(0, fl)
+
+ self.src = "\n".join(lines).rstrip("\n")
+
+ def hilite(self):
+ '''The wrapper function which brings it all togeather'''
+ self.src = self.src.strip('\n')
+
+ if not self.lang : self._getLang()
+
+ return self.hiliter(self.src, self.lang, self.linenos)
+
+
+# ------------------ The Markdown Extention -------------------------------
+class CodeHiliteExtention (markdown.Extension) :
+ def __init__(self, configs):
+ # define default configs
+ self.config = {'hiliter' : [DEFAULT_HILITER, "one of 'enscript', 'dp', or 'pygments'"],
+ 'force_linenos' : [False, "Force line numbers - Default: False"] }
+
+ # Override defaults with user settings
+ if configs:
+ for key, value in configs :
+ # self.config[key][0] = value
+ self.setConfig(key, value)
+
+ def extendMarkdown(self, md) :
+
+ def _hiliteCodeBlock(parent_elem, lines, inList):
+ """Overrides function of same name in standard Markdown class and
+ sends code blocks to a code highlighting proccessor. The result
+ is then stored in the HtmlStash, a placeholder is inserted into
+ the dom and the remainder of the text file is processed recursively.
+
+ @param parent_elem: DOM element to which the content will be added
+ @param lines: a list of lines
+ @param inList: a level
+ @returns: None"""
+ detabbed, theRest = md.blockGuru.detectTabbed(lines)
+ text = "\n".join(detabbed).rstrip()+"\n"
+ code = CodeHilite(text, hiliter=self.config['hiliter'][0], linenos=self.config['force_linenos'][0])
+ placeholder = md.htmlStash.store(code.hilite())
+ parent_elem.appendChild(md.doc.createTextNode(placeholder))
+ md._processSection(parent_elem, theRest, inList)
+
+ md._processCodeBlock = _hiliteCodeBlock
+
+def makeExtension(configs=None) :
+ return CodeHiliteExtention(configs=configs)
View
0 biblion/utils.py → biblion/utils/twitter.py
File renamed without changes.
View
6 requirements.txt
@@ -1,6 +1,8 @@
# required
creole==1.2
-Pygments==1.2.2
+docutils==0.7
+markdown==2.0.3
+Pygments==1.4
# optional
-python-twitter==0.8.1
+python-twitter==0.8.1

0 comments on commit 553bcd0

Please sign in to comment.
Something went wrong with that request. Please try again.