Merge branch 'python+markdown' of https://github.com/0x01FE/My-Website into python+markdown
This commit is contained in:
commit
0798b5b37a
6 files changed
+20
-8
No files matched your search
+9
-3
@@ -3,6 +3,7 @@ import configparser
|
||||
import random
|
||||
|
||||
import flask
|
||||
import waitress
|
||||
import markdown
|
||||
|
||||
from post import Post
|
||||
@@ -15,10 +16,12 @@ config.read(CONFIG_PATH)
|
||||
|
||||
POSTS_FOLDER = config['POSTS']['POSTS_FOLDER']
|
||||
STATUS_FILE = config['STATUS']['STATUS_FILE']
|
||||
PORT = int(config['NETWORK']['PORT'])
|
||||
DEV = int(config['NETWORK']['DEV'])
|
||||
|
||||
def get_posts(category_filter : str | None = None) -> list[Post]:
|
||||
post_files= glob.glob(f'{POSTS_FOLDER}/*')
|
||||
post_files.remove(f'{POSTS_FOLDER}\\POST_TEMPLATE.md')
|
||||
post_files = glob.glob(f'{POSTS_FOLDER}/*')
|
||||
post_files.remove(f'{POSTS_FOLDER}/POST_TEMPLATE.md')
|
||||
|
||||
posts: list[Post] = []
|
||||
for post_file in post_files:
|
||||
@@ -68,4 +71,7 @@ def index():
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run()
|
||||
if DEV:
|
||||
app.run(port=PORT)
|
||||
else:
|
||||
waitress.serve(app, host='0.0.0.0', port=PORT)
|
||||
@@ -25,7 +25,7 @@ What do you mean ... You can't see it?
|
||||
I don't believe you, your eyes deceive you, better check yourself in
|
||||
You will say I'm crazy, I will go on my way 'cause it's what I need
|
||||
I'd cross a thousand seas just to prove I'm not mad
|
||||
I thoguht I saw a statue blink, and a bird with no head, Land on a golden thread, I rub my eyes, What am I saying? There's nothing there
|
||||
I thought I saw a statue blink, and a bird with no head, Land on a golden thread, I rub my eyes, What am I saying? There's nothing there
|
||||
Solar Sect of Mystic Wisdom
|
||||
~ Nuclear Fusion
|
||||
Check out [NEUPINK](https://neupink.bandcamp.com/album/swordflower-hills-killer-2)!
|
||||
Reference in new issue
Block a user