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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from collections import namedtuple | |
import json | |
try: | |
from urllib.request import Request, urlopen | |
except ImportError: # python 2 | |
from urllib2 import Request, urlopen |
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
# Convert README.md (Markdown file) to HTML and include in output #using external Markdown | |
if (!$prevent_xss) { | |
$file_name = "README.md"; | |
my $proj_head_hash = git_get_head_hash($project); | |
my $readme_blob_hash = git_get_hash_by_path($proj_head_hash, "README.md", "blob"); | |
if ($readme_blob_hash) { # if README.md exists | |
print "<div class=\"header\">readme</div>\n"; | |
print "<div class=\"readme page_body\">"; # TODO find/create a better CSS class than page_body |