summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Luevano Alvarado <david@luevano.xyz>2021-05-17 13:56:11 -0600
committerDavid Luevano Alvarado <david@luevano.xyz>2021-05-17 13:56:11 -0600
commit8f04b57f1adff758e74c255e448f8e2e9e861982 (patch)
treee3fcff2ce1691d0a5b71a1fffe598fa4f240d01f
parent0dae5d53c49dd7b946990ca9e232fb924bf4f918 (diff)
clean up and update readmev0.2.0
-rw-r--r--README.md42
-rw-r--r--e_dst/a/test2.html17
-rw-r--r--e_dst/index.html17
-rw-r--r--e_dst/tag/@123.html15
-rw-r--r--e_dst/tag/@another-test.html15
-rw-r--r--e_dst/tag/@archive.html16
-rw-r--r--e_dst/tag/@small.html15
-rw-r--r--e_dst/tag/@test.html17
-rw-r--r--e_dst/test1.html15
-rw-r--r--e_dst/test2.html15
-rw-r--r--e_src/.files5
-rw-r--r--e_src/a/test2.html0
-rw-r--r--e_src/a/test2.md14
-rw-r--r--e_src/templates/article/footer.html0
-rw-r--r--e_src/templates/article/header.html1
-rw-r--r--e_src/templates/articles/footer.html0
-rw-r--r--e_src/templates/articles/header.html0
-rw-r--r--e_src/templates/articles/list_entry.html1
-rw-r--r--e_src/templates/articles/list_footer.html1
-rw-r--r--e_src/templates/articles/list_header.html2
-rw-r--r--e_src/templates/articles/list_separator.html1
-rw-r--r--e_src/templates/common/footer.html2
-rw-r--r--e_src/templates/common/header.html7
-rw-r--r--e_src/templates/tag/footer.html0
-rw-r--r--e_src/templates/tag/header.html1
-rw-r--r--e_src/templates/tag/list_entry.html1
-rw-r--r--e_src/templates/tag/list_footer.html1
-rw-r--r--e_src/templates/tag/list_header.html1
-rw-r--r--e_src/templates/tag/list_separator.html1
-rw-r--r--e_src/test1.html2
-rw-r--r--e_src/test1.md13
-rw-r--r--e_src/test2.md11
-rw-r--r--requirements.txt1
-rw-r--r--setup.cfg2
34 files changed, 42 insertions, 210 deletions
diff --git a/README.md b/README.md
index 88849bf..5d6c209 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,45 @@
# pyssg
-Static Site Generator inspired by Roman Zolotarev's [ssg5](https://rgz.ee/bin/ssg5) and [rssg](https://rgz.ee/bin/rssg) Luke Smith's [lb and sup](https://github.com/LukeSmithxyz/lb) and, pedantic.software's [blogit](https://pedantic.software/git/blogit/).
+Static Site Generator inspired by Roman Zolotarev's [`ssg5`](https://rgz.ee/bin/ssg5) and [`rssg`](https://rgz.ee/bin/rssg), Luke Smith's [`lb` and `sup`](https://github.com/LukeSmithxyz/lb) and, pedantic.software's [`blogit`](https://pedantic.software/git/blogit/).
The reason of making this in python is because I was tired of wanting (some) features from all of these minimal programs, but being a pain in the ass to maintain or add features on my own, specially to `blogit`...; making minimalist software it's great and all, but there is a limit on how pretentious and elitist a software can be for me to accept it.
+
+## Current features
+
+This is still a WIP. Still doesn't build `sitemap.xml` or `rss.xml` files.
+
+- [x] Build static site parsing `markdown` files ( `*.md` -> `*.html`)
+ - [x] Preserves hand-made `*.html` files.
+ - [x] Tag functionality.
+ - [ ] Open Graph (and similar) support.
+- [ ] Build `sitemap.xml` file.
+- [ ] Build `rss.xml` file.
+
+## Markdown features
+
+This program uses [`python-markdown`](https://python-markdown.github.io/) package with the following [extensions](https://python-markdown.github.io/extensions/):
+
+- Extra (collection of QoL extensions).
+- Meta-Data.
+- Sane Lists.
+- SmartyPants.
+- Table of Contents.
+- WikiLinks.
+
+## Usage
+
+First initialize the directories you're going to use for the source files and destination files:
+
+```sh
+pyssg -s src_dir -d dst_dir -i
+```
+
+That creates the desired directories with the basic templates that can be edited as desired. Place your `*.md` files somewhere inside the source directory (`src_dir` in the command above), but outside of the `templates` directory. It accepts sub-directories.
+
+Build the site with:
+
+```sh
+pyssg -s src_dir -d dst_dir -u https://baseurl.com -b
+```
+
+Without a trailing slash `/` at the end of the base URL. That creates all `*.html` for the site and can be easily moved to the server.
diff --git a/e_dst/a/test2.html b/e_dst/a/test2.html
deleted file mode 100644
index 57f2b07..0000000
--- a/e_dst/a/test2.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
-<meta charset="utf-8">
-<title>Test 2</title>
-</head>
-<body>
-<h1>Test 2</h1><p>This is an article test, again</p>
-<ul>
-<li>asdfg</li>
-<li>hjikl<ul>
-<li>??</li>
-</ul>
-</li>
-</ul><p>Tags: <a href="https://blog.luevano.xyz/tag/@123.html">123</a>, <a href="https://blog.luevano.xyz/tag/@another-test.html">another-test</a>, <a href="https://blog.luevano.xyz/tag/@archive.html">archive</a>, <a href="https://blog.luevano.xyz/tag/@test.html">test</a></p>
-</body>
-</html>
diff --git a/e_dst/index.html b/e_dst/index.html
deleted file mode 100644
index 1247d09..0000000
--- a/e_dst/index.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
-<meta charset="utf-8">
-<title>Index</title>
-</head>
-<body>
-<p>Tags: <a href="https://blog.luevano.xyz/tag/@123.html">123</a>, <a href="https://blog.luevano.xyz/tag/@another-test.html">another-test</a>, <a href="https://blog.luevano.xyz/tag/@archive.html">archive</a>, <a href="https://blog.luevano.xyz/tag/@small.html">small</a>, <a href="https://blog.luevano.xyz/tag/@test.html">test</a></p>
-<h2>Articles</h2>
-<ul>
-<h3>May 2021</h3>
-<li>May 11 - <a href="https://blog.luevano.xyz/test1.html">Test 1</a></li>
-<li>May 12 - <a href="https://blog.luevano.xyz/test2.html">Test 1</a></li>
-<li>May 12 - <a href="https://blog.luevano.xyz/a/test2.html">Test 2</a></li>
-</ul>
-</body>
-</html>
diff --git a/e_dst/tag/@123.html b/e_dst/tag/@123.html
deleted file mode 100644
index da82747..0000000
--- a/e_dst/tag/@123.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
-<meta charset="utf-8">
-<title>Posts filtered by: 123</title>
-</head>
-<body>
-<p>Posts filtered by tag: <a href="https://blog.luevano.xyz/tag/@123.html">123</a></p>
-<h2>Articles</h2>
-<ul>
-<h3>May 2021</h3>
-<li>May 12 - <a href="https://blog.luevano.xyz/a/test2.html">Test 2</a></li>
-</ul>
-</body>
-</html>
diff --git a/e_dst/tag/@another-test.html b/e_dst/tag/@another-test.html
deleted file mode 100644
index dcbb482..0000000
--- a/e_dst/tag/@another-test.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
-<meta charset="utf-8">
-<title>Posts filtered by: another-test</title>
-</head>
-<body>
-<p>Posts filtered by tag: <a href="https://blog.luevano.xyz/tag/@another-test.html">another-test</a></p>
-<h2>Articles</h2>
-<ul>
-<h3>May 2021</h3>
-<li>May 12 - <a href="https://blog.luevano.xyz/a/test2.html">Test 2</a></li>
-</ul>
-</body>
-</html>
diff --git a/e_dst/tag/@archive.html b/e_dst/tag/@archive.html
deleted file mode 100644
index 57cdbe4..0000000
--- a/e_dst/tag/@archive.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
-<meta charset="utf-8">
-<title>Posts filtered by: archive</title>
-</head>
-<body>
-<p>Posts filtered by tag: <a href="https://blog.luevano.xyz/tag/@archive.html">archive</a></p>
-<h2>Articles</h2>
-<ul>
-<h3>May 2021</h3>
-<li>May 12 - <a href="https://blog.luevano.xyz/a/test2.html">Test 2</a></li>
-<li>May 11 - <a href="https://blog.luevano.xyz/test1.html">Test 1</a></li>
-</ul>
-</body>
-</html>
diff --git a/e_dst/tag/@small.html b/e_dst/tag/@small.html
deleted file mode 100644
index 8531a8c..0000000
--- a/e_dst/tag/@small.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
-<meta charset="utf-8">
-<title>Posts filtered by: small</title>
-</head>
-<body>
-<p>Posts filtered by tag: <a href="https://blog.luevano.xyz/tag/@small.html">small</a></p>
-<h2>Articles</h2>
-<ul>
-<h3>May 2021</h3>
-<li>May 11 - <a href="https://blog.luevano.xyz/test1.html">Test 1</a></li>
-</ul>
-</body>
-</html>
diff --git a/e_dst/tag/@test.html b/e_dst/tag/@test.html
deleted file mode 100644
index d5fa3be..0000000
--- a/e_dst/tag/@test.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
-<meta charset="utf-8">
-<title>Posts filtered by: test</title>
-</head>
-<body>
-<p>Posts filtered by tag: <a href="https://blog.luevano.xyz/tag/@test.html">test</a></p>
-<h2>Articles</h2>
-<ul>
-<h3>May 2021</h3>
-<li>May 12 - <a href="https://blog.luevano.xyz/test2.html">Test 1</a></li>
-<li>May 12 - <a href="https://blog.luevano.xyz/a/test2.html">Test 2</a></li>
-<li>May 11 - <a href="https://blog.luevano.xyz/test1.html">Test 1</a></li>
-</ul>
-</body>
-</html>
diff --git a/e_dst/test1.html b/e_dst/test1.html
deleted file mode 100644
index 7073ee6..0000000
--- a/e_dst/test1.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
-<meta charset="utf-8">
-<title>Test 1</title>
-</head>
-<body>
-<h1>Test 1</h1><p>This is an article test</p>
-<ul>
-<li>asdfg</li>
-<li>hjikl</li>
-<li>modified</li>
-</ul><p>Tags: <a href="https://blog.luevano.xyz/tag/@archive.html">archive</a>, <a href="https://blog.luevano.xyz/tag/@small.html">small</a>, <a href="https://blog.luevano.xyz/tag/@test.html">test</a></p>
-</body>
-</html>
diff --git a/e_dst/test2.html b/e_dst/test2.html
deleted file mode 100644
index e5bbffd..0000000
--- a/e_dst/test2.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
-<meta charset="utf-8">
-<title>Test 1</title>
-</head>
-<body>
-<h1>Test 1</h1><p>This is an article test</p>
-<ul>
-<li>asdfg</li>
-<li>hjikl</li>
-<li>modified</li>
-</ul><p>Tags: <a href="https://blog.luevano.xyz/tag/@test.html">test</a></p>
-</body>
-</html>
diff --git a/e_src/.files b/e_src/.files
deleted file mode 100644
index 6896406..0000000
--- a/e_src/.files
+++ /dev/null
@@ -1,5 +0,0 @@
-test1.html 1620747134.884041 0.0 -
-a/test2.html 1620583182.7999856 0.0 -
-test1.md 1620745454.0012724 0.0 archive,small,test
-test2.md 1620786518.755961 0.0 test
-a/test2.md 1620781032.5948799 0.0 123,another-test,archive,test
diff --git a/e_src/a/test2.html b/e_src/a/test2.html
deleted file mode 100644
index e69de29..0000000
--- a/e_src/a/test2.html
+++ /dev/null
diff --git a/e_src/a/test2.md b/e_src/a/test2.md
deleted file mode 100644
index 95586cd..0000000
--- a/e_src/a/test2.md
+++ /dev/null
@@ -1,14 +0,0 @@
-title: Test 2
-author: David Luévano
-summary: Small summary
-lang: en
-tags: test
- archive
- another-test
- 123
-
-This is an article test, again
-
-- asdfg
-- hjikl
- - ??
diff --git a/e_src/templates/article/footer.html b/e_src/templates/article/footer.html
deleted file mode 100644
index e69de29..0000000
--- a/e_src/templates/article/footer.html
+++ /dev/null
diff --git a/e_src/templates/article/header.html b/e_src/templates/article/header.html
deleted file mode 100644
index d2954d9..0000000
--- a/e_src/templates/article/header.html
+++ /dev/null
@@ -1 +0,0 @@
-<h1>$$TITLE</h1> \ No newline at end of file
diff --git a/e_src/templates/articles/footer.html b/e_src/templates/articles/footer.html
deleted file mode 100644
index e69de29..0000000
--- a/e_src/templates/articles/footer.html
+++ /dev/null
diff --git a/e_src/templates/articles/header.html b/e_src/templates/articles/header.html
deleted file mode 100644
index e69de29..0000000
--- a/e_src/templates/articles/header.html
+++ /dev/null
diff --git a/e_src/templates/articles/list_entry.html b/e_src/templates/articles/list_entry.html
deleted file mode 100644
index d6d8e88..0000000
--- a/e_src/templates/articles/list_entry.html
+++ /dev/null
@@ -1 +0,0 @@
-<li>$$DATE - <a href="$$URL">$$TITLE</a></li>
diff --git a/e_src/templates/articles/list_footer.html b/e_src/templates/articles/list_footer.html
deleted file mode 100644
index 3d3a44c..0000000
--- a/e_src/templates/articles/list_footer.html
+++ /dev/null
@@ -1 +0,0 @@
-</ul>
diff --git a/e_src/templates/articles/list_header.html b/e_src/templates/articles/list_header.html
deleted file mode 100644
index 7b504ea..0000000
--- a/e_src/templates/articles/list_header.html
+++ /dev/null
@@ -1,2 +0,0 @@
-<h2>Articles</h2>
-<ul>
diff --git a/e_src/templates/articles/list_separator.html b/e_src/templates/articles/list_separator.html
deleted file mode 100644
index b27ea84..0000000
--- a/e_src/templates/articles/list_separator.html
+++ /dev/null
@@ -1 +0,0 @@
-<h3>$$SEP</h3>
diff --git a/e_src/templates/common/footer.html b/e_src/templates/common/footer.html
deleted file mode 100644
index 308b1d0..0000000
--- a/e_src/templates/common/footer.html
+++ /dev/null
@@ -1,2 +0,0 @@
-</body>
-</html>
diff --git a/e_src/templates/common/header.html b/e_src/templates/common/header.html
deleted file mode 100644
index 6237620..0000000
--- a/e_src/templates/common/header.html
+++ /dev/null
@@ -1,7 +0,0 @@
-<!DOCTYPE html>
-<html lang="$$LANG">
-<head>
-<meta charset="utf-8">
-<title>$$TITLE</title>
-</head>
-<body>
diff --git a/e_src/templates/tag/footer.html b/e_src/templates/tag/footer.html
deleted file mode 100644
index e69de29..0000000
--- a/e_src/templates/tag/footer.html
+++ /dev/null
diff --git a/e_src/templates/tag/header.html b/e_src/templates/tag/header.html
deleted file mode 100644
index 29372aa..0000000
--- a/e_src/templates/tag/header.html
+++ /dev/null
@@ -1 +0,0 @@
-<p>Posts filtered by tag: <a href="$$URL">$$NAME</a></p>
diff --git a/e_src/templates/tag/list_entry.html b/e_src/templates/tag/list_entry.html
deleted file mode 100644
index 3a7aaad..0000000
--- a/e_src/templates/tag/list_entry.html
+++ /dev/null
@@ -1 +0,0 @@
-<a href="$$URL">$$NAME</a> \ No newline at end of file
diff --git a/e_src/templates/tag/list_footer.html b/e_src/templates/tag/list_footer.html
deleted file mode 100644
index 8ce77e5..0000000
--- a/e_src/templates/tag/list_footer.html
+++ /dev/null
@@ -1 +0,0 @@
-</p>
diff --git a/e_src/templates/tag/list_header.html b/e_src/templates/tag/list_header.html
deleted file mode 100644
index 5bb080d..0000000
--- a/e_src/templates/tag/list_header.html
+++ /dev/null
@@ -1 +0,0 @@
-<p>Tags: \ No newline at end of file
diff --git a/e_src/templates/tag/list_separator.html b/e_src/templates/tag/list_separator.html
deleted file mode 100644
index c3a6e48..0000000
--- a/e_src/templates/tag/list_separator.html
+++ /dev/null
@@ -1 +0,0 @@
-, \ No newline at end of file
diff --git a/e_src/test1.html b/e_src/test1.html
deleted file mode 100644
index 7ade1a3..0000000
--- a/e_src/test1.html
+++ /dev/null
@@ -1,2 +0,0 @@
-<p> test</p>
-<p> modified</p>
diff --git a/e_src/test1.md b/e_src/test1.md
deleted file mode 100644
index 76e4ec5..0000000
--- a/e_src/test1.md
+++ /dev/null
@@ -1,13 +0,0 @@
-title: Test 1
-author: David Luévano
-summary: Small summary
-lang: en
-tags: test
- small
- archive
-
-This is an article test
-
-- asdfg
-- hjikl
-* modified
diff --git a/e_src/test2.md b/e_src/test2.md
deleted file mode 100644
index 8a32316..0000000
--- a/e_src/test2.md
+++ /dev/null
@@ -1,11 +0,0 @@
-title: Test 1
-author: David Luévano
-summary: Small summary
-lang: en
-tags: test
-
-This is an article test
-
-- asdfg
-- hjikl
-* modified
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..cc2d163
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1 @@
+markdown==3.3.4
diff --git a/setup.cfg b/setup.cfg
index 8bebc17..4df0e93 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -2,8 +2,6 @@
name = pyssg
author = David Luevano Alvarado
author_email = david@luevano.xyz
-maintainer = David Luevano Alvarado
-maintainer_email = david@luevano.xyz
summary = A Static Site Generator using markdown files
description_file = README.md
license = GPLv3