From 0a9c6693255800c6c197a3dcf3614046c296e293 Mon Sep 17 00:00:00 2001 From: David Luevano Alvarado Date: Sun, 9 May 2021 12:37:01 -0600 Subject: semiworking program, still very alpha --- ChangeLog | 1 + e_dst/a/test2.html | 0 e_dst/test1.html | 0 e_src/a/test2.html | 0 e_src/a/test2.md | 13 ++ e_src/templates/article/footer.html | 0 e_src/templates/article/header.html | 1 + e_src/templates/articles/footer.html | 0 e_src/templates/articles/header.html | 0 e_src/templates/articles/list_entry.html | 1 + e_src/templates/articles/list_footer.html | 1 + e_src/templates/articles/list_header.html | 2 + e_src/templates/articles/list_separator.html | 0 e_src/templates/common/footer.html | 2 + e_src/templates/common/header.html | 8 + e_src/templates/tag/footer.html | 0 e_src/templates/tag/header.html | 0 e_src/templates/tag/list_entry.html | 1 + e_src/templates/tag/list_footer.html | 1 + e_src/templates/tag/list_header.html | 1 + e_src/templates/tag/list_separator.html | 1 + e_src/test1.html | 0 e_src/test1.md | 12 ++ example_src/a/test3.md | 0 example_src/a/test4.md | 0 example_src/a/test6.html | 0 example_src/b/c/test8.html | 0 example_src/b/c/test9.md | 0 example_src/b/test7.html | 0 example_src/templates/article/article_entry.html | 1 - example_src/templates/article/article_footer.html | 0 example_src/templates/article/article_header.html | 1 - .../templates/article/article_list_footer.html | 1 - .../templates/article/article_list_header.html | 2 - .../templates/article/article_separator.html | 0 example_src/templates/article/footer.html | 2 - example_src/templates/article/header.html | 8 - example_src/templates/article/index_footer.html | 0 example_src/templates/article/index_header.html | 0 example_src/templates/article/tag_entry.html | 1 - .../templates/article/tag_index_footer.html | 0 .../templates/article/tag_index_header.html | 0 example_src/templates/article/tag_list_footer.html | 1 - example_src/templates/article/tag_list_header.html | 1 - example_src/templates/article/tag_separator.html | 1 - example_src/test.md | 0 example_src/test2.md | 0 example_src/test5.html | 0 src/pyssg/converter.py | 62 ++++++++ src/pyssg/discovery.py | 13 +- src/pyssg/generator.py | 40 +++++ src/pyssg/page.py | 49 ++++++ src/pyssg/parser.py | 24 --- src/pyssg/pyssg.py | 15 +- src/pyssg/template.py | 164 +++++++++++++++++++++ src/pyssg/templates.py | 83 ----------- 56 files changed, 380 insertions(+), 134 deletions(-) create mode 100644 e_dst/a/test2.html create mode 100644 e_dst/test1.html create mode 100644 e_src/a/test2.html create mode 100644 e_src/a/test2.md create mode 100644 e_src/templates/article/footer.html create mode 100644 e_src/templates/article/header.html create mode 100644 e_src/templates/articles/footer.html create mode 100644 e_src/templates/articles/header.html create mode 100644 e_src/templates/articles/list_entry.html create mode 100644 e_src/templates/articles/list_footer.html create mode 100644 e_src/templates/articles/list_header.html create mode 100644 e_src/templates/articles/list_separator.html create mode 100644 e_src/templates/common/footer.html create mode 100644 e_src/templates/common/header.html create mode 100644 e_src/templates/tag/footer.html create mode 100644 e_src/templates/tag/header.html create mode 100644 e_src/templates/tag/list_entry.html create mode 100644 e_src/templates/tag/list_footer.html create mode 100644 e_src/templates/tag/list_header.html create mode 100644 e_src/templates/tag/list_separator.html create mode 100644 e_src/test1.html create mode 100644 e_src/test1.md delete mode 100644 example_src/a/test3.md delete mode 100644 example_src/a/test4.md delete mode 100644 example_src/a/test6.html delete mode 100644 example_src/b/c/test8.html delete mode 100644 example_src/b/c/test9.md delete mode 100644 example_src/b/test7.html delete mode 100644 example_src/templates/article/article_entry.html delete mode 100644 example_src/templates/article/article_footer.html delete mode 100644 example_src/templates/article/article_header.html delete mode 100644 example_src/templates/article/article_list_footer.html delete mode 100644 example_src/templates/article/article_list_header.html delete mode 100644 example_src/templates/article/article_separator.html delete mode 100644 example_src/templates/article/footer.html delete mode 100644 example_src/templates/article/header.html delete mode 100644 example_src/templates/article/index_footer.html delete mode 100644 example_src/templates/article/index_header.html delete mode 100644 example_src/templates/article/tag_entry.html delete mode 100644 example_src/templates/article/tag_index_footer.html delete mode 100644 example_src/templates/article/tag_index_header.html delete mode 100644 example_src/templates/article/tag_list_footer.html delete mode 100644 example_src/templates/article/tag_list_header.html delete mode 100644 example_src/templates/article/tag_separator.html delete mode 100644 example_src/test.md delete mode 100644 example_src/test2.md delete mode 100644 example_src/test5.html create mode 100644 src/pyssg/converter.py create mode 100644 src/pyssg/generator.py create mode 100644 src/pyssg/page.py delete mode 100644 src/pyssg/parser.py create mode 100644 src/pyssg/template.py delete mode 100644 src/pyssg/templates.py diff --git a/ChangeLog b/ChangeLog index 9ae16c6..d551703 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ CHANGES ======= +* Add working file discovery and destination file structure creation * initial template creation, barebones arg parser * Prepare barebones package info * Update readme diff --git a/e_dst/a/test2.html b/e_dst/a/test2.html new file mode 100644 index 0000000..e69de29 diff --git a/e_dst/test1.html b/e_dst/test1.html new file mode 100644 index 0000000..e69de29 diff --git a/e_src/a/test2.html b/e_src/a/test2.html new file mode 100644 index 0000000..e69de29 diff --git a/e_src/a/test2.md b/e_src/a/test2.md new file mode 100644 index 0000000..0eb26ec --- /dev/null +++ b/e_src/a/test2.md @@ -0,0 +1,13 @@ +title: Test 2 +author: David Luévano +summary: Small summary +lang: en +tags: test + small + archive + +This is an article test, again + +- asdfg +- hjikl + - ?? diff --git a/e_src/templates/article/footer.html b/e_src/templates/article/footer.html new file mode 100644 index 0000000..e69de29 diff --git a/e_src/templates/article/header.html b/e_src/templates/article/header.html new file mode 100644 index 0000000..d2954d9 --- /dev/null +++ b/e_src/templates/article/header.html @@ -0,0 +1 @@ +

$$TITLE

\ No newline at end of file diff --git a/e_src/templates/articles/footer.html b/e_src/templates/articles/footer.html new file mode 100644 index 0000000..e69de29 diff --git a/e_src/templates/articles/header.html b/e_src/templates/articles/header.html new file mode 100644 index 0000000..e69de29 diff --git a/e_src/templates/articles/list_entry.html b/e_src/templates/articles/list_entry.html new file mode 100644 index 0000000..91d2d75 --- /dev/null +++ b/e_src/templates/articles/list_entry.html @@ -0,0 +1 @@ +
  • $$DATE - $$TITLE
  • diff --git a/e_src/templates/articles/list_footer.html b/e_src/templates/articles/list_footer.html new file mode 100644 index 0000000..3d3a44c --- /dev/null +++ b/e_src/templates/articles/list_footer.html @@ -0,0 +1 @@ + diff --git a/e_src/templates/articles/list_header.html b/e_src/templates/articles/list_header.html new file mode 100644 index 0000000..7b504ea --- /dev/null +++ b/e_src/templates/articles/list_header.html @@ -0,0 +1,2 @@ +

    Articles

    + diff --git a/example_src/templates/article/article_list_header.html b/example_src/templates/article/article_list_header.html deleted file mode 100644 index 7b504ea..0000000 --- a/example_src/templates/article/article_list_header.html +++ /dev/null @@ -1,2 +0,0 @@ -

    Articles

    -