diff --git a/README.md b/README.md index 35bd6d7..8a6df76 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ -# crocoweb +# vkyweb General web generator diff --git a/generator/__init__.py b/generator/__init__.py new file mode 100644 index 0000000..53d2a24 --- /dev/null +++ b/generator/__init__.py @@ -0,0 +1 @@ +__all__ = ["config","model","webengine"] diff --git a/generator/config/__init__.py b/generator/config/__init__.py new file mode 100644 index 0000000..a9a2c5b --- /dev/null +++ b/generator/config/__init__.py @@ -0,0 +1 @@ +__all__ = [] diff --git a/generator/model/__init__.py b/generator/model/__init__.py new file mode 100644 index 0000000..a9a2c5b --- /dev/null +++ b/generator/model/__init__.py @@ -0,0 +1 @@ +__all__ = [] diff --git a/generator/model/container_model.py b/generator/model/container_model.py new file mode 100644 index 0000000..e69de29 diff --git a/generator/model/content_model.py b/generator/model/content_model.py new file mode 100644 index 0000000..e69de29 diff --git a/generator/parser/__init__.py b/generator/parser/__init__.py new file mode 100644 index 0000000..a9a2c5b --- /dev/null +++ b/generator/parser/__init__.py @@ -0,0 +1 @@ +__all__ = [] diff --git a/generator/parser/fileparser.py b/generator/parser/fileparser.py new file mode 100644 index 0000000..e69de29 diff --git a/generator/parser/treeparser.py b/generator/parser/treeparser.py new file mode 100644 index 0000000..e69de29 diff --git a/generator/webengine/__init__.py b/generator/webengine/__init__.py new file mode 100644 index 0000000..a9a2c5b --- /dev/null +++ b/generator/webengine/__init__.py @@ -0,0 +1 @@ +__all__ = [] diff --git a/sites/example_website/Poetry/index.txt b/sites/example_website/Poetry/index.txt new file mode 100644 index 0000000..20d8c20 --- /dev/null +++ b/sites/example_website/Poetry/index.txt @@ -0,0 +1,11 @@ +title_fr: Poésie +title_en: Poetry +category_en: Poetry +category_fr: Poésie +author_*: Max +__en__ +Random poetry translated +__/en__ +__fr__ +Poésie traduite +__/fr__ diff --git a/sites/example_website/Poetry/poetry1.txt b/sites/example_website/Poetry/poetry1.txt new file mode 100644 index 0000000..633dfc7 --- /dev/null +++ b/sites/example_website/Poetry/poetry1.txt @@ -0,0 +1,16 @@ +title_*: Rose +author_*: Max + +__en__ +A Rose flew +Flower of beauty +Why are you +so pretty +__/en__ + +__fr__ +Une rose qui passe +Quelle est bien belle +Mais pourquoi donc +Esceque tu est jolie +__/fr__ diff --git a/sites/example_website/_config.txt b/sites/example_website/_config.txt new file mode 100644 index 0000000..5f4b0fb --- /dev/null +++ b/sites/example_website/_config.txt @@ -0,0 +1,7 @@ +variable_that_will_be_accesible_in_the_whole_project: Very good +en_en: English +en_fr: Anglais +fr_fr: Français +fr_en: French +model: dual +generation: dynamic diff --git a/sites/example_website/article1.txt b/sites/example_website/article1.txt new file mode 100644 index 0000000..ab170f1 --- /dev/null +++ b/sites/example_website/article1.txt @@ -0,0 +1,14 @@ +title_fr: Premier article +title_en: First article +author_*: Max + +date: 10/10/10 + +__fr__ +Contenu +__/fr__ +__en__ +Content +__/en__ + +Lorem pict. diff --git a/sites/example_website/index.txt b/sites/example_website/index.txt new file mode 100644 index 0000000..db7ee0d --- /dev/null +++ b/sites/example_website/index.txt @@ -0,0 +1,40 @@ +title_en: Transaltionus +title_fr: Traductionnator +author_en: Maximilian +author_fr: Maximilien + +articles_en: List of articles +articles_fr: Liste des articles + +category_en: List of categories +category_fr: Liste des catégories + +legal_*: Copyleft (c) Cocobug + +__en__ +Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. +__/en__ + +__fr__ +Loreme ipsume dolore site amete, consecteture adipisicinge elite, sede doe eiusmode tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolore ine reprehenderite ine voluptate velite esse cillume dolore eu fugiatte nulla pariature. Excepteure sinte occaecate cupidatate none proidente, sunta ine culpa qui officia deserunte mollite anime ide est laborume. +__/fr__ + +__*__ +![Alt text](/path/to/img.jpg) +__/*__ + +__hidden__ +Hiden text, can be used in many ways. Note that hidden is not a reserved keyword and is just treated separately in the generation process. +__/hidden__ + +__useless__ +The useless keyword is not reserved either, and since it wont be treated in the generation process, it will just be lost +__/useless__ + +__error__ +If you don't close properly something __a lot of content will be lost +__in the generation +process +__*__ +Like this +__/*__ diff --git a/vkyweb.py b/vkyweb.py new file mode 100644 index 0000000..67300c3 --- /dev/null +++ b/vkyweb.py @@ -0,0 +1,12 @@ +#!/usr/bin/env python + +Copyleft (c) 2016 Cocobug All Rights Reserved. + +import argparse + +parser = argparse.ArgumentParser(description='Website on-the-fly & static generator') +subparsers = parser.add_subparsers(help='Commands') + +# create the parser for the "a" command +parser_a = subparsers.add_parser('a', help='a help') +parser_a.add_argument('bar', type=int, help='bar help')