Skip to content
Permalink
Browse files
Finish refactor of scripts for new name
  • Loading branch information
aa9863 committed Jul 5, 2020
1 parent 3dfcd63 commit 9749c1a4e7904285b5edae7df428d90f9d0b0fb6
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
@@ -54,6 +54,11 @@ Using Pylint [Because](https://github.com/PyCQA/pylint/blob/master/CONTRIBUTORS.
pylint remarkable
```

Note on Excludede Messages.

- I dont agree with snake_case for function names. drinkingCamelCase
- W1202 Meh, I can see arguments for doing this for speed in n logs, but prefer consistency

And as a much nicer HTML

```
@@ -45,6 +45,8 @@ class RenderError(Exception):
def __init__(self, message):
self.message = message

#env.list_templates()

def convertFile(inputFile, templateFile=None, templateDir=None, outputFile=None):
"""
Given a set of options convert a file from markdown
@@ -21,7 +21,7 @@ class MarkdownParser():
"""Create a markdown parser,
param theFile: File to use as input
"""
self.log = logging.getLogger("[PARSER]")
self.log = logging.getLogger("PARSER")
self.theFile = theFile
self.log.debug("Create Parser For: {0}".format(self.theFile))

@@ -86,16 +86,18 @@ class HTMLRenderer(Renderer):
theLoader = jinja2.ChoiceLoader([jinja2.FileSystemLoader(templateDir),
jinja2.PackageLoader("remarkable")])
else:
self.log.debug("--> No Templates Specified")
self.log.debug("--> No custom Template dir Specified")
theLoader = jinja2.PackageLoader("remarkable")

self.log.info("--> Create Renderer")
self.log.info("Create Renderer")
#We are going to load all templates from scratch first
self.env = jinja2.Environment(
loader=theLoader,
autoescape=jinja2.select_autoescape(['html', 'xml'])
)

self.log.info("--> Available Templates: ")
self.log.info("--> {0}".format(self.env.list_templates()))
self.log.info("--> Template file {0}".format(theTemplate))
self.template = self.env.get_template(theTemplate)

@@ -1,6 +1,2 @@
[aliases]
test=pytest


[pylint]
output-format=json
test=pytest

0 comments on commit 9749c1a

Please sign in to comment.