From 47d60026f0a65b94a1c949a58e14bd29d7856fd8 Mon Sep 17 00:00:00 2001 From: Mimi Momo Date: Fri, 25 Sep 2020 16:19:17 -0500 Subject: [PATCH] added diary entries; hard-coded most of snippet generation; gather all files in feature - reverse sort - make snippet with "title", "words" "11/22/33", "social" and "link" for each files gathered --- src/entries/feature/200810.php | 103 ++++++++++++++++++ src/entries/feature/200813.php | 132 +++++++++++++++++++++++ src/entries/feature/200918.php | 93 ++++++++++++++++ src/entries/raw/feature/200810.php | 16 +++ src/entries/raw/feature/200813.php | 45 ++++++++ src/entries/raw/feature/200918.php | 6 ++ src/entries/raw/res/foot.txt | 38 +++++++ src/entries/raw/res/head.txt | 49 +++++++++ src/entries/raw/tools/article-to-html.py | 41 +++++++ src/entries/raw/weekly/200808.php | 35 ++++++ src/entries/raw/weekly/200815.php | 36 +++++++ src/entries/weekly/200808.php | 122 +++++++++++++++++++++ src/entries/weekly/200815.php | 123 +++++++++++++++++++++ src/index.py | 43 +++++--- src/views/diary.tpl | 17 ++- src/views/frame.tpl | 1 - src/views/snippet.tpl | 16 +++ 17 files changed, 902 insertions(+), 14 deletions(-) create mode 100644 src/entries/feature/200810.php create mode 100644 src/entries/feature/200813.php create mode 100644 src/entries/feature/200918.php create mode 100644 src/entries/raw/feature/200810.php create mode 100644 src/entries/raw/feature/200813.php create mode 100644 src/entries/raw/feature/200918.php create mode 100644 src/entries/raw/res/foot.txt create mode 100644 src/entries/raw/res/head.txt create mode 100644 src/entries/raw/tools/article-to-html.py create mode 100644 src/entries/raw/weekly/200808.php create mode 100644 src/entries/raw/weekly/200815.php create mode 100644 src/entries/weekly/200808.php create mode 100644 src/entries/weekly/200815.php create mode 100644 src/views/snippet.tpl diff --git a/src/entries/feature/200810.php b/src/entries/feature/200810.php new file mode 100644 index 0000000..e5abbe9 --- /dev/null +++ b/src/entries/feature/200810.php @@ -0,0 +1,103 @@ + + + + + + chimchooree's dev space - blessfrey + + + + + + + +
+
+ blessfrey.me
+
+ + + + + + + +
+ +
+

what is blessfrey?

+august 10, 2020
+
+Blessfrey is a 2D action RPG developed for PC by me, chimchooree.
+
+The game is designed to pit your skill + creativity against a series of combat + puzzle challenges while exploring the depths of the downtown dungeon.
+
+Class progression is freeform, and virtually no decision is permanent. At character creation, you will choose a permanent First Class, but you can unlock several new classes for multiclassing through gameplay. Through swapping out Second Classes, you can find a combination to express your playstyle.
+
+Each class has its own style of skills associated with it. Skills are individual powers gained through gameplay which give specific effects according to their rules. Your skillbar only has 8 skill slots and can only be edited in safe areas. The challenge comes from building winning strategies + synergies against the next area.
+
+Skills are gained through exploration of the game world. As you encounter enemies, meet people, and reach new areas, you will translate those experiences into new skills.
+
+Blessfrey has been lots of fun to work on. I hope you enjoy it once a demo and eventually a game drops.
+
+chimchooree
+
+ + +
+

about blessfrey

+ It's a game.
+
+ + + +
+

latest

+ Some articles.
+
+ +
+

disclosure

+ No sponsored posts or affiliate links appear in this blog. If they do, they will be properly disclosed.
+
+ blessfrey.me does not collect personal information + has no cookies.
+
+ + + +
+ + + + diff --git a/src/entries/feature/200813.php b/src/entries/feature/200813.php new file mode 100644 index 0000000..579b3c3 --- /dev/null +++ b/src/entries/feature/200813.php @@ -0,0 +1,132 @@ + + + + + + chimchooree's dev space - blessfrey + + + + + + + +
+
+ blessfrey.me
+
+ + + + + + + +
+ +
+

all weekly updates

+august 13, 2020
+
+I've kept a more or less consistent private development diary for blessfrey since 2018. Here are the bulleted highlights, broken into weekly portions. I mostly keep it for myself to track progress.
+
+Meaningful discussions on design + process are expanded in separate feature articles.
+
+As a note, Blessfrey's working name is Dungeon Girls, but there's other projects floating around in there. Also, names of people are usually changed for privacy.
+
+Weekly diary pages are below. +
+".fgets($post).""; + echo fgets($post)."
"; + echo " ... Keep Reading"; + echo "

"; +} + +// Iterate over Diary Pages + Snip +function convert_files($files) { + rsort($files); + foreach ($files as $file) { + snip_post($file); + } +} + +// Collect files +function gather_files() { + $files = array(); + foreach (glob("../weekly/*.*") as $file) { + $files[] = $file; + } + return $files; +} + +// Flow - collect files + convert to snippets +// it should be reverse order..newest first +convert_files(gather_files()); +?> +

+
+ + +
+

about blessfrey

+ It's a game.
+
+ + + +
+

latest

+ Some articles.
+
+ +
+

disclosure

+ No sponsored posts or affiliate links appear in this blog. If they do, they will be properly disclosed.
+
+ blessfrey.me does not collect personal information + has no cookies.
+
+ + + +
+ + + + diff --git a/src/entries/feature/200918.php b/src/entries/feature/200918.php new file mode 100644 index 0000000..9382d16 --- /dev/null +++ b/src/entries/feature/200918.php @@ -0,0 +1,93 @@ + + + + + + chimchooree's dev space - blessfrey + + + + + + + +
+
+ blessfrey.me
+
+ + + + + + + +
+ +
+

my favorite GDC talks

+september 18, 2020
+
+I really should be keeping a list of these with descriptions, so why not keep them in an article?
+
+Work on it later.
+
+ + +
+

about blessfrey

+ It's a game.
+
+ + + +
+

latest

+ Some articles.
+
+ +
+

disclosure

+ No sponsored posts or affiliate links appear in this blog. If they do, they will be properly disclosed.
+
+ blessfrey.me does not collect personal information + has no cookies.
+
+ + + +
+ + + + diff --git a/src/entries/raw/feature/200810.php b/src/entries/raw/feature/200810.php new file mode 100644 index 0000000..fa3d2af --- /dev/null +++ b/src/entries/raw/feature/200810.php @@ -0,0 +1,16 @@ +

what is blessfrey?

+august 10, 2020
+
+Blessfrey is a 2D action RPG developed for PC by me, chimchooree.
+
+The game is designed to pit your skill + creativity against a series of combat + puzzle challenges while exploring the depths of the downtown dungeon.
+
+Class progression is freeform, and virtually no decision is permanent. At character creation, you will choose a permanent First Class, but you can unlock several new classes for multiclassing through gameplay. Through swapping out Second Classes, you can find a combination to express your playstyle.
+
+Each class has its own style of skills associated with it. Skills are individual powers gained through gameplay which give specific effects according to their rules. Your skillbar only has 8 skill slots and can only be edited in safe areas. The challenge comes from building winning strategies + synergies against the next area.
+
+Skills are gained through exploration of the game world. As you encounter enemies, meet people, and reach new areas, you will translate those experiences into new skills.
+
+Blessfrey has been lots of fun to work on. I hope you enjoy it once a demo and eventually a game drops.
+
+chimchooree
diff --git a/src/entries/raw/feature/200813.php b/src/entries/raw/feature/200813.php new file mode 100644 index 0000000..b452c94 --- /dev/null +++ b/src/entries/raw/feature/200813.php @@ -0,0 +1,45 @@ +

all weekly updates

+august 13, 2020
+
+I've kept a more or less consistent private development diary for blessfrey since 2018. Here are the bulleted highlights, broken into weekly portions. I mostly keep it for myself to track progress.
+
+Meaningful discussions on design + process are expanded in separate feature articles.
+
+As a note, Blessfrey's working name is Dungeon Girls, but there's other projects floating around in there. Also, names of people are usually changed for privacy.
+
+Weekly diary pages are below. +
+".fgets($post).""; + echo fgets($post)."
"; + echo " ... Keep Reading"; + echo "

"; +} + +// Iterate over Diary Pages + Snip +function convert_files($files) { + rsort($files); + foreach ($files as $file) { + snip_post($file); + } +} + +// Collect files +function gather_files() { + $files = array(); + foreach (glob("../weekly/*.*") as $file) { + $files[] = $file; + } + return $files; +} + +// Flow - collect files + convert to snippets +// it should be reverse order..newest first +convert_files(gather_files()); +?> +

diff --git a/src/entries/raw/feature/200918.php b/src/entries/raw/feature/200918.php new file mode 100644 index 0000000..a875494 --- /dev/null +++ b/src/entries/raw/feature/200918.php @@ -0,0 +1,6 @@ +

my favorite GDC talks

+september 18, 2020
+
+I really should be keeping a list of these with descriptions, so why not keep them in an article?
+
+Work on it later.
diff --git a/src/entries/raw/res/foot.txt b/src/entries/raw/res/foot.txt new file mode 100644 index 0000000..e3093ac --- /dev/null +++ b/src/entries/raw/res/foot.txt @@ -0,0 +1,38 @@ + + + +
+

about blessfrey

+ It's a game.
+
+ +
+

follow on twitter

+ @lilchimchooree
+
+ +
+

latest

+ Some articles.
+
+ +
+

disclosure

+ No sponsored posts or affiliate links appear in this blog. If they do, they will be properly disclosed.
+
+ blessfrey.me does not collect personal information + has no cookies.
+
+ + + + + + + + diff --git a/src/entries/raw/res/head.txt b/src/entries/raw/res/head.txt new file mode 100644 index 0000000..56aeca4 --- /dev/null +++ b/src/entries/raw/res/head.txt @@ -0,0 +1,49 @@ + + + + + + chimchooree's dev space - blessfrey + + + + + + + +
+
+ blessfrey.me
+
+ + + + + + + +
+ +
diff --git a/src/entries/raw/tools/article-to-html.py b/src/entries/raw/tools/article-to-html.py new file mode 100644 index 0000000..d00e982 --- /dev/null +++ b/src/entries/raw/tools/article-to-html.py @@ -0,0 +1,41 @@ +import os +import glob + +def file_to_string(f): + text = "" + with open(f, 'r') as n: + text = n.read() + n.close() + return text + +def fill_text(f): + return file_to_string('../res/head.txt') + file_to_string(f) + file_to_string('../res/foot.txt') + +def create_files(files, directory): + for f in files: + print(f) +# t = open(f, "r") + n = open(directory + '/' + os.path.basename(f), "w") + n.write(fill_text(f)) + n.close() + +def collect_raw(d): + return glob.glob(d) + +def clear_articles(): + files = glob.glob('../../feature/*') + for f in files: + os.remove(f) + + files = glob.glob('../../weekly/*') + for w in files: + os.remove(w) + +def main(): + clear_articles() + create_files(collect_raw('../feature/*'), '../../feature') + create_files(collect_raw('../weekly/*'), '../../weekly') + +## Start Program ## + +main() diff --git a/src/entries/raw/weekly/200808.php b/src/entries/raw/weekly/200808.php new file mode 100644 index 0000000..59aedd4 --- /dev/null +++ b/src/entries/raw/weekly/200808.php @@ -0,0 +1,35 @@ +

weekly roundup

+august 4-8, 2020 +css, html, php, server, website
+
+

tuesday, august 4

+
    +
  • CentOS VPS obtained through OVH. Yay! We've always wanted a server.
  • +
+

wednesday, august 5

+
    +
    +
  • design the website
  • +
  • prototype of website running on the server
  • +
  • J set up automation with Jenkins + Ansible
  • +
+
+

thursday, august 6

+ +
+

friday, august 7

+
    +
  • decide to use PHP for manage blessfrey's blog
  • +
  • set up a local Apache server for practice. It was a little confusing!
  • +
  • wrote a vaguely functioning Hello, World! script in PHP +
+
+

saturday, august 8

+ +
diff --git a/src/entries/raw/weekly/200815.php b/src/entries/raw/weekly/200815.php new file mode 100644 index 0000000..4bdc2bc --- /dev/null +++ b/src/entries/raw/weekly/200815.php @@ -0,0 +1,36 @@ +

weekly roundup

+august 9-15, 2020 +apache, automation, css, html, jenkins, nginx, php, server, website
+
+

monday, august 9

+ +

wednesday, august 5

+
    +
    +
  • design the website
  • +
  • prototype of website running on the server
  • +
  • set up automation with Jenkins + Ansible
  • +
+
+

thursday, august 6

+ +
+

friday, august 7

+
    +
  • decide to use PHP for manage blessfrey's blog
  • +
  • set up a local Apache server with PHP for practice. It was a little confusing!
  • +
  • wrote a vaguely functioning Hello, World! script in PHP +
+
+

saturday, august 8

+ +
diff --git a/src/entries/weekly/200808.php b/src/entries/weekly/200808.php new file mode 100644 index 0000000..7321053 --- /dev/null +++ b/src/entries/weekly/200808.php @@ -0,0 +1,122 @@ + + + + + + chimchooree's dev space - blessfrey + + + + + + + +
+
+ blessfrey.me
+
+ + + + + + + +
+ +
+

weekly roundup

+august 4-8, 2020 +css, html, php, server, website
+
+

tuesday, august 4

+
    +
  • CentOS VPS obtained through OVH. Yay! We've always wanted a server.
  • +
+

wednesday, august 5

+
    +
    +
  • design the website
  • +
  • prototype of website running on the server
  • +
  • J set up automation with Jenkins + Ansible
  • +
+
+

thursday, august 6

+ +
+

friday, august 7

+
    +
  • decide to use PHP for manage blessfrey's blog
  • +
  • set up a local Apache server for practice. It was a little confusing!
  • +
  • wrote a vaguely functioning Hello, World! script in PHP +
+
+

saturday, august 8

+ +
+
+ + +
+

about blessfrey

+ It's a game.
+
+ + + +
+

latest

+ Some articles.
+
+ +
+

disclosure

+ No sponsored posts or affiliate links appear in this blog. If they do, they will be properly disclosed.
+
+ blessfrey.me does not collect personal information + has no cookies.
+
+ + + +
+ + + + diff --git a/src/entries/weekly/200815.php b/src/entries/weekly/200815.php new file mode 100644 index 0000000..6a3336a --- /dev/null +++ b/src/entries/weekly/200815.php @@ -0,0 +1,123 @@ + + + + + + chimchooree's dev space - blessfrey + + + + + + + +
+
+ blessfrey.me
+
+ + + + + + + +
+ +
+

weekly roundup

+august 9-15, 2020 +apache, automation, css, html, jenkins, nginx, php, server, website
+
+

monday, august 9

+ +

wednesday, august 5

+
    +
    +
  • design the website
  • +
  • prototype of website running on the server
  • +
  • set up automation with Jenkins + Ansible
  • +
+
+

thursday, august 6

+ +
+

friday, august 7

+
    +
  • decide to use PHP for manage blessfrey's blog
  • +
  • set up a local Apache server with PHP for practice. It was a little confusing!
  • +
  • wrote a vaguely functioning Hello, World! script in PHP +
+
+

saturday, august 8

+ +
+
+ + +
+

about blessfrey

+ It's a game.
+
+ + + +
+

latest

+ Some articles.
+
+ +
+

disclosure

+ No sponsored posts or affiliate links appear in this blog. If they do, they will be properly disclosed.
+
+ blessfrey.me does not collect personal information + has no cookies.
+
+ + + +
+ + + + diff --git a/src/index.py b/src/index.py index 6ae0ecf..93168cf 100644 --- a/src/index.py +++ b/src/index.py @@ -1,5 +1,4 @@ -import datetime -from os import listdir +import datetime, os from bottle import route, run, template # diary @@ -7,32 +6,52 @@ from bottle import route, run, template def build_nav(): return "nav" +def make_latest(): + # for article in array (just 5 or something) + # link to webpage + return "latest" + def list_snippets(articles): # take articles between 0-4, 5-8, 9-13,...) based on current page # for each one of those articles, # snip_article(article) limit = 4 - total = len(files) + total = len(articles) + head = count_lines('entries/raw/res/head.txt') + print(head) + result = [] + + for article in articles: + article = [] + article.append("title") + article.append(snip_article("words words words")) + article.append("11/22/33") + article.append("social") + article.append("link") + result.append(article) + return result + +def count_lines(fname): + with open(fname) as f: + for linenum, line in enumerate(f,1): + pass + return linenum def snip_article(article): # read text in article # clean 250 first characters # add to snippet # add "read more" button that links to article to snippet - return "snippet" - -def make_latest(): - # for article in array (just 5 or something) - # link to webpage - return "latest" + return article def sort_files(files): # sort array so articles are latest to earliest - return list(reversed(files)) + m = list(reversed(files)) + return files def gather_files(): # directory to list - return os.listdir() + return os.listdir('entries/feature/') # Webpages @@ -57,7 +76,7 @@ def presskit(): @route('/diary') def diary(): """diary page""" - info = {'title': 'blessfrey - about the game', 'year': datetime.datetime.now(), 'snippets': make_snippets(), 'latest': make_latest()} + info = {'title': 'blessfrey - about the game', 'year': datetime.datetime.now(), 'snippets': list_snippets(sort_files(gather_files())), 'latest': make_latest()} return template('diary.tpl', info) if __name__ == '__main__': diff --git a/src/views/diary.tpl b/src/views/diary.tpl index b6e7ace..560a600 100644 --- a/src/views/diary.tpl +++ b/src/views/diary.tpl @@ -7,7 +7,22 @@
- {{snippets}} + % for s in snippets: +
+
+ {{s[0]}} +
+
+ {{!s[1]}} +
+
+ {{s[2]}} • {{s[3]}} +
+ +
+ % end
diff --git a/src/views/frame.tpl b/src/views/frame.tpl index f9c3196..59b64f0 100644 --- a/src/views/frame.tpl +++ b/src/views/frame.tpl @@ -9,7 +9,6 @@ % include('nav.tpl')
- {{!base}}
diff --git a/src/views/snippet.tpl b/src/views/snippet.tpl new file mode 100644 index 0000000..63e709d --- /dev/null +++ b/src/views/snippet.tpl @@ -0,0 +1,16 @@ + + +
+
+ {{title}} +
+
+ {{content}} +
+
+ {{date}} • {{social-link}} +
+ +