Skip to content
Permalink
Browse files

lets not change wiki

  • Loading branch information
ralsina committed Aug 16, 2016
1 parent f5010ff commit 5e8a205eeee25c78a77844134a06f7edddcf0462
Showing with 10 additions and 7 deletions.
  1. +1 −1 v7/wiki/requirements.txt
  2. +1 −1 v7/wiki/wiki.plugin
  3. +8 −5 v7/wiki/wiki.py
@@ -1 +1 @@
nxcreole
creole
@@ -4,7 +4,7 @@ Module = wiki

[Documentation]
Author = Roberto Alsina
Version = 0.3
Version = 0.2
Website = http://plugins.getnikola.com/#wiki
Description = Compile WikiMarkup into HTML

@@ -30,9 +30,11 @@
import os

try:
import nxcreole
from creole import Parser
from creole.html_emitter import HtmlEmitter
creole = True
except ImportError:
nxcreole = None
creole = None

from nikola.plugin_categories import PageCompiler
from nikola.utils import makedirs, req_missing
@@ -46,13 +48,14 @@ class CompileWiki(PageCompiler):
supports_onefile = False

def compile_html(self, source, dest, is_two_file=True):
if nxcreole is None:
req_missing(['nxcreole'], 'build this site (compile CreoleWiki)')
if creole is None:
req_missing(['creole'], 'build this site (compile CreoleWiki)')
makedirs(os.path.dirname(dest))
with codecs.open(dest, "w+", "utf8") as out_file:
with codecs.open(source, "r", "utf8") as in_file:
data = in_file.read()
output = nxcreole.render_xhtml(data)
document = Parser(data).parse()
output = HtmlEmitter(document).emit()
out_file.write(output)

def create_post(self, path, **kw):

0 comments on commit 5e8a205

Please sign in to comment.
You can’t perform that action at this time.