Commit f53d177e authored by Denis Salem's avatar Denis Salem
Browse files

Themes should be fixed. Now working on themes unit test framework

parent ad69ad9d
#! /usr/bin/env python3
# Copyright 2016, 2019 Denis Salem
#
# This file is part of VenC.
#
# VenC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# VenC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with VenC. If not, see <http://www.gnu.org/licenses/>.
from venc2.commands.export import export_blog
author_description: VenC lead developper
author_email: venc@tuxfamily.org
author_name: Denis Salem
blog_description: Test blog output
blog_keywords: test, unittest, blog, venc
blog_language: en
blog_name: Theme Unit Test
blog_url: 'http://127.0.0.1:8888'
code_highlight_css_override: false
columns: 1
date_format: '%A %d. %B %Y'
disable_archives: false
disable_atom_feed: false
disable_categories: false
disable_chapters: true
disable_main_thread: false
disable_rss_feed: false
disable_single_entries: false
disable_threads: ''
enable_jsonld: true
enable_jsonp: true
entries_per_pages: 1
feed_lenght: 5
ftp_host: ''
license: DWTFYWL
markup_language: Markdown
path:
atom_file_name: atom.xml
categories_sub_folders: ''
category_directory_name: '{category}'
chapter_directory_name: '{chapter_name}'
chapters_sub_folders: chapters
dates_directory_name: '%Y-%m'
dates_sub_folders: ''
entries_sub_folders: ''
entry_file_name: entry{entry_id}.html
ftp: Chemin absolu de votre blog sur l'hôte FTP.
index_file_name: index{page_number}.html
rss_file_name: rss.xml
path_encoding: utf-8
reverse_thread_order: true
server_port: 8888
sort_by: id
text_editor: scite
authors: 'Denis Salem'
categories: 'Templates > Footnotes'
tags: ''
title: Footnotes unit test
---VENC-BEGIN-PREVIEW---
---VENC-END-PREVIEW---
This template is designed to work with defaults themes
The following[¹](#footnote_1) will display aside if used with Academik theme. Otherwise,
it will be display below the current paragraphe.
.:SetStyle::footnote_1::footnote:: A first footnote for the sake of the demonstration:.
You can go directly to [this](#footnote_2) second footnote by clicking the link.
Do not forget to add a line break so the parser will know that the footnote
is not part of this paragraphe
.:SetStyle::footnote_2::footnote::² The first argument is the css id name,
the second is the css class name:.
authors: 'Denis Salem'
categories: 'Templates > Patterns > CodeHighlight'
tags: ''
title: CodeHighlight unit test
---VENC-BEGIN-PREVIEW---
---VENC-END-PREVIEW---
Example of C++ syntax coloration with line number:
.:CodeHighlight::C++::True::
#include <iostream>:
class Example {
public:
static void do_something();
};
void Example::do_something() {
std::cout << "Well, not really" << std::endl;
}
int main(int argc, char ** argv) {
Example::do_something();
return 0;
}
:.
Another example of Python syntax coloration without line number:
.:CodeHighlight::Python::False::
def merge(iterable, argv):
if len(argv) != 2:
raise PatternMissingArguments(expected=2,got=len(argv))
try:
return argv[1].join([argv[0].format(**something) for something in iterable])
except IndexError as e:
if e.args == ('tuple index out of range',):
raise PatternInvalidArgument(name="string", value=argv[0])
raise e
:.
authors: 'Denis Salem'
categories: ' Templates > Patterns > Latex2MathML'
tags: ''
title: Latex2MathML unit test
---VENC-BEGIN-PREVIEW---
---VENC-END-PREVIEW---
Example of Latex2MathML usage for rendering complex number expression:
.:Latex2MathML::\overline{z_1} . \overline{z_2} = \overline{z_1 . z_2}:.
Another example combining Latex2MathML and Table for rendering lined up equation:
.:Table:: .:Latex2MathML::\overline{z_1} . \overline{z_2}:. ::=:: .:Latex2MathML::\overline{(a + ib)} \overline{(c + id)}:. ::
NewRow:: ::=:: .:Latex2MathML::(a - ib) (c - id):. ::
NewRow:: ::=:: .:Latex2MathML::ac - iad - ibc - bd :. ::
NewRow:: ::=:: .:Latex2MathML::(ac - bd) - i(ad+bc):. :.
authors: 'Denis Salem'
categories: 'Templates > Patterns > Escape'
tags: ''
title: Escape unit test
---VENC-BEGIN-PREVIEW---
---VENC-END-PREVIEW---
_As shown below Escape will disable parsing of both VenC patterns and markup language between the Escape/EndEscape pair._
__With Escape/EndEscape__
.:Escape::
- Hello VenC!
- Hello lovely user!
::EndEscape:.
.:Escape:: .:SetColor::This is red text!t::red:. ::EndEscape:.
__Without Escape/EndEscape__
- Hello VenC!
- Hello lovely user!
.:SetColor::This is red text!t::red:.
Please note that VenC syntax require you to close Escape pattern with ::EndEscape.
.venc_source_CPlusPlus .hll { background-color: #ffffcc }
.venc_source_CPlusPlus { background: #f8f8f8; }
.venc_source_CPlusPlus .c { color: #408080; font-style: italic } /* Comment */
.venc_source_CPlusPlus .err { border: 1px solid #FF0000 } /* Error */
.venc_source_CPlusPlus .k { color: #008000; font-weight: bold } /* Keyword */
.venc_source_CPlusPlus .o { color: #666666 } /* Operator */
.venc_source_CPlusPlus .ch { color: #408080; font-style: italic } /* Comment.Hashbang */
.venc_source_CPlusPlus .cm { color: #408080; font-style: italic } /* Comment.Multiline */
.venc_source_CPlusPlus .cp { color: #BC7A00 } /* Comment.Preproc */
.venc_source_CPlusPlus .cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */
.venc_source_CPlusPlus .c1 { color: #408080; font-style: italic } /* Comment.Single */
.venc_source_CPlusPlus .cs { color: #408080; font-style: italic } /* Comment.Special */
.venc_source_CPlusPlus .gd { color: #A00000 } /* Generic.Deleted */
.venc_source_CPlusPlus .ge { font-style: italic } /* Generic.Emph */
.venc_source_CPlusPlus .gr { color: #FF0000 } /* Generic.Error */
.venc_source_CPlusPlus .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.venc_source_CPlusPlus .gi { color: #00A000 } /* Generic.Inserted */
.venc_source_CPlusPlus .go { color: #888888 } /* Generic.Output */
.venc_source_CPlusPlus .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
.venc_source_CPlusPlus .gs { font-weight: bold } /* Generic.Strong */
.venc_source_CPlusPlus .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
.venc_source_CPlusPlus .gt { color: #0044DD } /* Generic.Traceback */
.venc_source_CPlusPlus .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
.venc_source_CPlusPlus .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
.venc_source_CPlusPlus .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
.venc_source_CPlusPlus .kp { color: #008000 } /* Keyword.Pseudo */
.venc_source_CPlusPlus .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
.venc_source_CPlusPlus .kt { color: #B00040 } /* Keyword.Type */
.venc_source_CPlusPlus .m { color: #666666 } /* Literal.Number */
.venc_source_CPlusPlus .s { color: #BA2121 } /* Literal.String */
.venc_source_CPlusPlus .na { color: #7D9029 } /* Name.Attribute */
.venc_source_CPlusPlus .nb { color: #008000 } /* Name.Builtin */
.venc_source_CPlusPlus .nc { color: #0000FF; font-weight: bold } /* Name.Class */
.venc_source_CPlusPlus .no { color: #880000 } /* Name.Constant */
.venc_source_CPlusPlus .nd { color: #AA22FF } /* Name.Decorator */
.venc_source_CPlusPlus .ni { color: #999999; font-weight: bold } /* Name.Entity */
.venc_source_CPlusPlus .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
.venc_source_CPlusPlus .nf { color: #0000FF } /* Name.Function */
.venc_source_CPlusPlus .nl { color: #A0A000 } /* Name.Label */
.venc_source_CPlusPlus .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
.venc_source_CPlusPlus .nt { color: #008000; font-weight: bold } /* Name.Tag */
.venc_source_CPlusPlus .nv { color: #19177C } /* Name.Variable */
.venc_source_CPlusPlus .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
.venc_source_CPlusPlus .w { color: #bbbbbb } /* Text.Whitespace */
.venc_source_CPlusPlus .mb { color: #666666 } /* Literal.Number.Bin */
.venc_source_CPlusPlus .mf { color: #666666 } /* Literal.Number.Float */
.venc_source_CPlusPlus .mh { color: #666666 } /* Literal.Number.Hex */
.venc_source_CPlusPlus .mi { color: #666666 } /* Literal.Number.Integer */
.venc_source_CPlusPlus .mo { color: #666666 } /* Literal.Number.Oct */
.venc_source_CPlusPlus .sa { color: #BA2121 } /* Literal.String.Affix */
.venc_source_CPlusPlus .sb { color: #BA2121 } /* Literal.String.Backtick */
.venc_source_CPlusPlus .sc { color: #BA2121 } /* Literal.String.Char */
.venc_source_CPlusPlus .dl { color: #BA2121 } /* Literal.String.Delimiter */
.venc_source_CPlusPlus .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
.venc_source_CPlusPlus .s2 { color: #BA2121 } /* Literal.String.Double */
.venc_source_CPlusPlus .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
.venc_source_CPlusPlus .sh { color: #BA2121 } /* Literal.String.Heredoc */
.venc_source_CPlusPlus .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
.venc_source_CPlusPlus .sx { color: #008000 } /* Literal.String.Other */
.venc_source_CPlusPlus .sr { color: #BB6688 } /* Literal.String.Regex */
.venc_source_CPlusPlus .s1 { color: #BA2121 } /* Literal.String.Single */
.venc_source_CPlusPlus .ss { color: #19177C } /* Literal.String.Symbol */
.venc_source_CPlusPlus .bp { color: #008000 } /* Name.Builtin.Pseudo */
.venc_source_CPlusPlus .fm { color: #0000FF } /* Name.Function.Magic */
.venc_source_CPlusPlus .vc { color: #19177C } /* Name.Variable.Class */
.venc_source_CPlusPlus .vg { color: #19177C } /* Name.Variable.Global */
.venc_source_CPlusPlus .vi { color: #19177C } /* Name.Variable.Instance */
.venc_source_CPlusPlus .vm { color: #19177C } /* Name.Variable.Magic */
.venc_source_CPlusPlus .il { color: #666666 } /* Literal.Number.Integer.Long */
\ No newline at end of file
.venc_source_Python .hll { background-color: #ffffcc }
.venc_source_Python { background: #f8f8f8; }
.venc_source_Python .c { color: #408080; font-style: italic } /* Comment */
.venc_source_Python .err { border: 1px solid #FF0000 } /* Error */
.venc_source_Python .k { color: #008000; font-weight: bold } /* Keyword */
.venc_source_Python .o { color: #666666 } /* Operator */
.venc_source_Python .ch { color: #408080; font-style: italic } /* Comment.Hashbang */
.venc_source_Python .cm { color: #408080; font-style: italic } /* Comment.Multiline */
.venc_source_Python .cp { color: #BC7A00 } /* Comment.Preproc */
.venc_source_Python .cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */
.venc_source_Python .c1 { color: #408080; font-style: italic } /* Comment.Single */
.venc_source_Python .cs { color: #408080; font-style: italic } /* Comment.Special */
.venc_source_Python .gd { color: #A00000 } /* Generic.Deleted */
.venc_source_Python .ge { font-style: italic } /* Generic.Emph */
.venc_source_Python .gr { color: #FF0000 } /* Generic.Error */
.venc_source_Python .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.venc_source_Python .gi { color: #00A000 } /* Generic.Inserted */
.venc_source_Python .go { color: #888888 } /* Generic.Output */
.venc_source_Python .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
.venc_source_Python .gs { font-weight: bold } /* Generic.Strong */
.venc_source_Python .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
.venc_source_Python .gt { color: #0044DD } /* Generic.Traceback */
.venc_source_Python .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
.venc_source_Python .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
.venc_source_Python .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
.venc_source_Python .kp { color: #008000 } /* Keyword.Pseudo */
.venc_source_Python .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
.venc_source_Python .kt { color: #B00040 } /* Keyword.Type */
.venc_source_Python .m { color: #666666 } /* Literal.Number */
.venc_source_Python .s { color: #BA2121 } /* Literal.String */
.venc_source_Python .na { color: #7D9029 } /* Name.Attribute */
.venc_source_Python .nb { color: #008000 } /* Name.Builtin */
.venc_source_Python .nc { color: #0000FF; font-weight: bold } /* Name.Class */
.venc_source_Python .no { color: #880000 } /* Name.Constant */
.venc_source_Python .nd { color: #AA22FF } /* Name.Decorator */
.venc_source_Python .ni { color: #999999; font-weight: bold } /* Name.Entity */
.venc_source_Python .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
.venc_source_Python .nf { color: #0000FF } /* Name.Function */
.venc_source_Python .nl { color: #A0A000 } /* Name.Label */
.venc_source_Python .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
.venc_source_Python .nt { color: #008000; font-weight: bold } /* Name.Tag */
.venc_source_Python .nv { color: #19177C } /* Name.Variable */
.venc_source_Python .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
.venc_source_Python .w { color: #bbbbbb } /* Text.Whitespace */
.venc_source_Python .mb { color: #666666 } /* Literal.Number.Bin */
.venc_source_Python .mf { color: #666666 } /* Literal.Number.Float */
.venc_source_Python .mh { color: #666666 } /* Literal.Number.Hex */
.venc_source_Python .mi { color: #666666 } /* Literal.Number.Integer */
.venc_source_Python .mo { color: #666666 } /* Literal.Number.Oct */
.venc_source_Python .sa { color: #BA2121 } /* Literal.String.Affix */
.venc_source_Python .sb { color: #BA2121 } /* Literal.String.Backtick */
.venc_source_Python .sc { color: #BA2121 } /* Literal.String.Char */
.venc_source_Python .dl { color: #BA2121 } /* Literal.String.Delimiter */
.venc_source_Python .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
.venc_source_Python .s2 { color: #BA2121 } /* Literal.String.Double */
.venc_source_Python .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
.venc_source_Python .sh { color: #BA2121 } /* Literal.String.Heredoc */
.venc_source_Python .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
.venc_source_Python .sx { color: #008000 } /* Literal.String.Other */
.venc_source_Python .sr { color: #BB6688 } /* Literal.String.Regex */
.venc_source_Python .s1 { color: #BA2121 } /* Literal.String.Single */
.venc_source_Python .ss { color: #19177C } /* Literal.String.Symbol */
.venc_source_Python .bp { color: #008000 } /* Name.Builtin.Pseudo */
.venc_source_Python .fm { color: #0000FF } /* Name.Function.Magic */
.venc_source_Python .vc { color: #19177C } /* Name.Variable.Class */
.venc_source_Python .vg { color: #19177C } /* Name.Variable.Global */
.venc_source_Python .vi { color: #19177C } /* Name.Variable.Instance */
.venc_source_Python .vm { color: #19177C } /* Name.Variable.Magic */
.venc_source_Python .il { color: #666666 } /* Literal.Number.Integer.Long */
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment