From 155f866cf83b2b3fe7be4b14784e92a9f0a2bcfc Mon Sep 17 00:00:00 2001 From: chimchooree Date: Sun, 4 Oct 2020 22:11:02 -0500 Subject: [PATCH] diary entries are template files; entries are in diary/entries and links are fixed --- src/diary/entries/200808.tpl | 43 ++++++ src/diary/entries/200810.tpl | 24 ++++ src/diary/entries/200813.tpl | 53 +++++++ src/diary/entries/200815.tpl | 44 ++++++ src/diary/entries/200918.tpl | 14 ++ src/diary/entries/200919.tpl | 21 +++ src/diary/entries/200926.tpl | 22 +++ src/diary/entries/201001.tpl | 19 +++ src/diary/entries/201003.tpl | 27 ++++ .../entries/raw/article-to-html.py | 4 +- .../entries/raw/entries/200808.tpl} | 0 .../entries/raw/entries/200810.tpl} | 0 .../entries/raw/entries/200813.tpl} | 0 .../entries/raw/entries/200815.tpl} | 0 .../entries/raw/entries/200918.tpl} | 0 .../entries/raw/entries/200919.tpl} | 0 .../entries/raw/entries/200926.tpl} | 0 .../entries/raw/entries/201001.tpl} | 0 .../entries/raw/entries/201003.tpl} | 0 src/diary/entries/raw/res/head.txt | 5 + src/diary/entries/raw/res/tail.txt | 3 + src/entries/200808.html | 122 ---------------- src/entries/200810.html | 103 -------------- src/entries/200813.html | 132 ------------------ src/entries/200815.html | 123 ---------------- src/entries/200918.html | 93 ------------ src/entries/200919.html | 100 ------------- src/entries/200926.html | 101 -------------- src/entries/201001.html | 98 ------------- src/entries/201003.html | 106 -------------- src/entries/raw/res/head.txt | 49 ------- src/entries/raw/res/tail.txt | 38 ----- src/index.py | 26 ++-- src/views/contact.tpl | 2 + src/views/diary-boxes.tpl | 31 ++++ src/views/diary.tpl | 39 +----- 36 files changed, 333 insertions(+), 1109 deletions(-) create mode 100644 src/diary/entries/200808.tpl create mode 100644 src/diary/entries/200810.tpl create mode 100644 src/diary/entries/200813.tpl create mode 100644 src/diary/entries/200815.tpl create mode 100644 src/diary/entries/200918.tpl create mode 100644 src/diary/entries/200919.tpl create mode 100644 src/diary/entries/200926.tpl create mode 100644 src/diary/entries/201001.tpl create mode 100644 src/diary/entries/201003.tpl rename src/{ => diary}/entries/raw/article-to-html.py (87%) rename src/{entries/raw/entries/200808.html => diary/entries/raw/entries/200808.tpl} (100%) rename src/{entries/raw/entries/200810.html => diary/entries/raw/entries/200810.tpl} (100%) rename src/{entries/raw/entries/200813.html => diary/entries/raw/entries/200813.tpl} (100%) rename src/{entries/raw/entries/200815.html => diary/entries/raw/entries/200815.tpl} (100%) rename src/{entries/raw/entries/200918.html => diary/entries/raw/entries/200918.tpl} (100%) rename src/{entries/raw/entries/200919.html => diary/entries/raw/entries/200919.tpl} (100%) rename src/{entries/raw/entries/200926.html => diary/entries/raw/entries/200926.tpl} (100%) rename src/{entries/raw/entries/201001.html => diary/entries/raw/entries/201001.tpl} (100%) rename src/{entries/raw/entries/201003.html => diary/entries/raw/entries/201003.tpl} (100%) create mode 100644 src/diary/entries/raw/res/head.txt create mode 100644 src/diary/entries/raw/res/tail.txt delete mode 100644 src/entries/200808.html delete mode 100644 src/entries/200810.html delete mode 100644 src/entries/200813.html delete mode 100644 src/entries/200815.html delete mode 100644 src/entries/200918.html delete mode 100644 src/entries/200919.html delete mode 100644 src/entries/200926.html delete mode 100644 src/entries/201001.html delete mode 100644 src/entries/201003.html delete mode 100644 src/entries/raw/res/head.txt delete mode 100644 src/entries/raw/res/tail.txt create mode 100644 src/views/diary-boxes.tpl diff --git a/src/diary/entries/200808.tpl b/src/diary/entries/200808.tpl new file mode 100644 index 0000000..29b1d12 --- /dev/null +++ b/src/diary/entries/200808.tpl @@ -0,0 +1,43 @@ +% rebase('frame.tpl') + +
+ +
+

9 weekly roundup

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

tuesday, august 4

+ +

wednesday, august 5

+ +
+

thursday, august 6

+ +
+

friday, august 7

+ +
+

saturday, august 8

+ +
+
+ +% include diary-boxes.tpl diff --git a/src/diary/entries/200810.tpl b/src/diary/entries/200810.tpl new file mode 100644 index 0000000..e4561df --- /dev/null +++ b/src/diary/entries/200810.tpl @@ -0,0 +1,24 @@ +% rebase('frame.tpl') + +
+ +
+

8 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
+
+ +% include diary-boxes.tpl diff --git a/src/diary/entries/200813.tpl b/src/diary/entries/200813.tpl new file mode 100644 index 0000000..3912602 --- /dev/null +++ b/src/diary/entries/200813.tpl @@ -0,0 +1,53 @@ +% rebase('frame.tpl') + +
+ +
+

7 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()); +?> +

+
+ +% include diary-boxes.tpl diff --git a/src/diary/entries/200815.tpl b/src/diary/entries/200815.tpl new file mode 100644 index 0000000..de5cbd4 --- /dev/null +++ b/src/diary/entries/200815.tpl @@ -0,0 +1,44 @@ +% rebase('frame.tpl') + +
+ +
+

6 weekly roundup

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

monday, august 9

+ +

wednesday, august 5

+ +
+

thursday, august 6

+ +
+

friday, august 7

+ +
+

saturday, august 8

+ +
+ +
+ +% include diary-boxes.tpl diff --git a/src/diary/entries/200918.tpl b/src/diary/entries/200918.tpl new file mode 100644 index 0000000..e120158 --- /dev/null +++ b/src/diary/entries/200918.tpl @@ -0,0 +1,14 @@ +% rebase('frame.tpl') + +
+ +
+

5 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.
+
+ +% include diary-boxes.tpl diff --git a/src/diary/entries/200919.tpl b/src/diary/entries/200919.tpl new file mode 100644 index 0000000..9d5fd22 --- /dev/null +++ b/src/diary/entries/200919.tpl @@ -0,0 +1,21 @@ +% rebase('frame.tpl') + +
+ +
+

4 weekly roundup

+september 13-19, 2020 +bottle
+
+

friday, september 18

+ +
+
+ +% include diary-boxes.tpl diff --git a/src/diary/entries/200926.tpl b/src/diary/entries/200926.tpl new file mode 100644 index 0000000..0c4cfb2 --- /dev/null +++ b/src/diary/entries/200926.tpl @@ -0,0 +1,22 @@ +% rebase('frame.tpl') + +
+ +
+

3 weekly roundup

+september 20-26, 2020 +bottle
+
+

friday, september 25

+ +
+

saturday, september 26

+ +
+
+ +% include diary-boxes.tpl diff --git a/src/diary/entries/201001.tpl b/src/diary/entries/201001.tpl new file mode 100644 index 0000000..e76f33d --- /dev/null +++ b/src/diary/entries/201001.tpl @@ -0,0 +1,19 @@ +% rebase('frame.tpl') + +
+ +
+

2 why bottle over php?

+october 1, 2020
+
+Bottle is a Python framework for server-side web development.
+
+It's useful because it lets you reuse code for HTML, supports simple HTML templating, and is Python, which is a fun scripting language to use with tons of libraries.
+
+PHP is an old server language. It's very verbose, doesn't natively support templating, has extreme differences between versions which makes it confusing to research the fastest approaches, and its documentation is confusing. At least, amusingly, each documentation page has an open comment section underneath it, filled with conflicting and frustrated opinions, some dating back to when I was a toddler.
+
+It's still good to practice with, since it's a widely used web development language, and I feel like understanding it brings me closer to the PHP petsites of the mid-2000s which I dearly love.
+
+
+ +% include diary-boxes.tpl diff --git a/src/diary/entries/201003.tpl b/src/diary/entries/201003.tpl new file mode 100644 index 0000000..f753b30 --- /dev/null +++ b/src/diary/entries/201003.tpl @@ -0,0 +1,27 @@ +% rebase('frame.tpl') + +
+ +
+

1 this week

+september 27-october 3, 2020 +bottle, css, git, html, regex, regular expressions, website
+
+

wednesday, august 9

+ +

thursday, october 1

+ +
+
+
+ +% include diary-boxes.tpl diff --git a/src/entries/raw/article-to-html.py b/src/diary/entries/raw/article-to-html.py similarity index 87% rename from src/entries/raw/article-to-html.py rename to src/diary/entries/raw/article-to-html.py index 33dcdaa..4e5256c 100644 --- a/src/entries/raw/article-to-html.py +++ b/src/diary/entries/raw/article-to-html.py @@ -22,13 +22,13 @@ def collect_raw(d): return glob.glob(d) def clear_articles(): - files = glob.glob('../*.html') + files = glob.glob('../*.tpl') for f in files: os.remove(f) def main(): clear_articles() - create_files(collect_raw('entries/*.html'), '..') + create_files(collect_raw('entries/*.tpl'), '..') ## Start Program ## diff --git a/src/entries/raw/entries/200808.html b/src/diary/entries/raw/entries/200808.tpl similarity index 100% rename from src/entries/raw/entries/200808.html rename to src/diary/entries/raw/entries/200808.tpl diff --git a/src/entries/raw/entries/200810.html b/src/diary/entries/raw/entries/200810.tpl similarity index 100% rename from src/entries/raw/entries/200810.html rename to src/diary/entries/raw/entries/200810.tpl diff --git a/src/entries/raw/entries/200813.html b/src/diary/entries/raw/entries/200813.tpl similarity index 100% rename from src/entries/raw/entries/200813.html rename to src/diary/entries/raw/entries/200813.tpl diff --git a/src/entries/raw/entries/200815.html b/src/diary/entries/raw/entries/200815.tpl similarity index 100% rename from src/entries/raw/entries/200815.html rename to src/diary/entries/raw/entries/200815.tpl diff --git a/src/entries/raw/entries/200918.html b/src/diary/entries/raw/entries/200918.tpl similarity index 100% rename from src/entries/raw/entries/200918.html rename to src/diary/entries/raw/entries/200918.tpl diff --git a/src/entries/raw/entries/200919.html b/src/diary/entries/raw/entries/200919.tpl similarity index 100% rename from src/entries/raw/entries/200919.html rename to src/diary/entries/raw/entries/200919.tpl diff --git a/src/entries/raw/entries/200926.html b/src/diary/entries/raw/entries/200926.tpl similarity index 100% rename from src/entries/raw/entries/200926.html rename to src/diary/entries/raw/entries/200926.tpl diff --git a/src/entries/raw/entries/201001.html b/src/diary/entries/raw/entries/201001.tpl similarity index 100% rename from src/entries/raw/entries/201001.html rename to src/diary/entries/raw/entries/201001.tpl diff --git a/src/entries/raw/entries/201003.html b/src/diary/entries/raw/entries/201003.tpl similarity index 100% rename from src/entries/raw/entries/201003.html rename to src/diary/entries/raw/entries/201003.tpl diff --git a/src/diary/entries/raw/res/head.txt b/src/diary/entries/raw/res/head.txt new file mode 100644 index 0000000..e2ff6ab --- /dev/null +++ b/src/diary/entries/raw/res/head.txt @@ -0,0 +1,5 @@ +% rebase('frame.tpl') + +
+ +
diff --git a/src/diary/entries/raw/res/tail.txt b/src/diary/entries/raw/res/tail.txt new file mode 100644 index 0000000..f7f255a --- /dev/null +++ b/src/diary/entries/raw/res/tail.txt @@ -0,0 +1,3 @@ +
+ +% include diary-boxes.tpl diff --git a/src/entries/200808.html b/src/entries/200808.html deleted file mode 100644 index 954e16c..0000000 --- a/src/entries/200808.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - chimchooree's dev space - blessfrey - - - - - - - -
-
- blessfrey.me
-
- - - - - - - -
- -
-

9 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/200810.html b/src/entries/200810.html deleted file mode 100644 index 1ab79e2..0000000 --- a/src/entries/200810.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - chimchooree's dev space - blessfrey - - - - - - - -
-
- blessfrey.me
-
- - - - - - - -
- -
-

8 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/200813.html b/src/entries/200813.html deleted file mode 100644 index 124e5e1..0000000 --- a/src/entries/200813.html +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - chimchooree's dev space - blessfrey - - - - - - - -
-
- blessfrey.me
-
- - - - - - - -
- -
-

7 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/200815.html b/src/entries/200815.html deleted file mode 100644 index dc8153a..0000000 --- a/src/entries/200815.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - chimchooree's dev space - blessfrey - - - - - - - -
-
- blessfrey.me
-
- - - - - - - -
- -
-

6 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
  • -
  • 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 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/entries/200918.html b/src/entries/200918.html deleted file mode 100644 index 3e0aea1..0000000 --- a/src/entries/200918.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - chimchooree's dev space - blessfrey - - - - - - - -
-
- blessfrey.me
-
- - - - - - - -
- -
-

5 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/200919.html b/src/entries/200919.html deleted file mode 100644 index 7da3e3c..0000000 --- a/src/entries/200919.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - chimchooree's dev space - blessfrey - - - - - - - -
-
- blessfrey.me
-
- - - - - - - -
- -
-

4 weekly roundup

-september 13-19, 2020 -bottle
-
-

friday, september 18

-
    -
  • switched from PHP to Bottle
  • -
  • hello world in Bottle
  • -
  • created templates for main pages
  • -
  • Used Bottle to fill values in a template using variables
  • -
  • Used Bottle to avoid repeating html code in navigation pane, header, and footer
  • -
-
-
- - -
-

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/200926.html b/src/entries/200926.html deleted file mode 100644 index 406c3cf..0000000 --- a/src/entries/200926.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - chimchooree's dev space - blessfrey - - - - - - - -
-
- blessfrey.me
-
- - - - - - - -
- -
-

3 weekly roundup

-september 20-26, 2020 -bottle
-
-

friday, september 25

-
    -
  • Diary snippets are formated from data taken from their articles. The article preview is cut to the character limit.
  • -
-
-

saturday, september 26

-
    -
  • Updated the blessfrey.me script to serve static content like CSS stylesheets + images. Now the pages are actually styled.
  • -
-
-
- - -
-

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/201001.html b/src/entries/201001.html deleted file mode 100644 index fadd073..0000000 --- a/src/entries/201001.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - chimchooree's dev space - blessfrey - - - - - - - -
-
- blessfrey.me
-
- - - - - - - -
- -
-

2 why bottle over php?

-october 1, 2020
-
-Bottle is a Python framework for server-side web development.
-
-It's useful because it lets you reuse code for HTML, supports simple HTML templating, and is Python, which is a fun scripting language to use with tons of libraries.
-
-PHP is an old server language. It's very verbose, doesn't natively support templating, has extreme differences between versions which makes it confusing to research the fastest approaches, and its documentation is confusing. At least, amusingly, each documentation page has an open comment section underneath it, filled with conflicting and frustrated opinions, some dating back to when I was a toddler.
-
-It's still good to practice with, since it's a widely used web development language, and I feel like understanding it brings me closer to the PHP petsites of the mid-2000s which I dearly love.
-
-
- - -
-

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/201003.html b/src/entries/201003.html deleted file mode 100644 index 8355b5d..0000000 --- a/src/entries/201003.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - chimchooree's dev space - blessfrey - - - - - - - -
-
- blessfrey.me
-
- - - - - - - -
- -
-

1 this week

-september 27-october 3, 2020 -bottle, css, git, html, regex, regular expressions, website
-
-

wednesday, august 9

-
    -
  • Working on the website in the first time in a while;;
  • -
  • blessfrey.me's static pages look as intended - no footer in the middle of the body, no unclosed <ul> tags from diary entry previews breaking the CSS.
  • -
  • w3's Nu Html Checker (lol @ the nu name) is really handy for automatically checking whether all my html tags are closed and CSS is valid, especially the parts generated through Bottle + SimpleTemplate.
  • -
-

thursday, october 1

-
    -
  • blessfrey.me's diary properly displays snippets for all articles: a header taken from the title, a truncated view of the article, the date + a place for social media share links, and a link to the article.
  • -
  • Cleaning the snippets enough to look okay and not break the page was a challenge. I used regular expressions to remove html link + header tags, which is apparently a lost cause Stack Overflow users stand against daily, hourly even. It's not so bad if it's not user content, and the content is pretty predictable, right? -
  • Pythex @ https://pythex.org/ is useful for checking whether your regular expression will catch your target strings
  • -
  • First command line git merge. I usually do it on the website. It's really simple - switch to the branch you're merging the second branch into, type 'git merge second-branch' (second-branch = name of the second branch obviously), and fix any conflicts.
  • -
-
-
-
- - -
-

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/res/head.txt b/src/entries/raw/res/head.txt deleted file mode 100644 index 56aeca4..0000000 --- a/src/entries/raw/res/head.txt +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - chimchooree's dev space - blessfrey - - - - - - - -
-
- blessfrey.me
-
- - - - - - - -
- -
diff --git a/src/entries/raw/res/tail.txt b/src/entries/raw/res/tail.txt deleted file mode 100644 index e3093ac..0000000 --- a/src/entries/raw/res/tail.txt +++ /dev/null @@ -1,38 +0,0 @@ -
- - -
-

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 64d3f24..9462f6f 100644 --- a/src/index.py +++ b/src/index.py @@ -1,13 +1,15 @@ import datetime, os, re from bottle import error, route, run, static_file, template +loc = 'diary/entries/' + def list_headlines(articles): - head = count_lines('entries/raw/res/head.txt') + head = count_lines(loc + 'raw/res/head.txt') result = [] text = [] for article in articles: - path = 'entries/' + article + path = loc + article with open(path) as f: text = f.readlines() @@ -21,16 +23,16 @@ def list_headlines(articles): def list_snippets(articles): limit = 4 total = len(articles) - head = count_lines('entries/raw/res/head.txt') - tail = count_lines('entries/raw/res/tail.txt') + head = count_lines(loc + 'raw/res/head.txt') + tail = count_lines(loc + 'raw/res/tail.txt') result = [] for article in articles: - path = 'entries/' + article + path = loc + article text = [] a = [] length = 0 - with open('entries/' + article) as f: + with open(loc + article) as f: text = f.readlines() length = len(text) a.append(clean(text[head])) # title @@ -40,7 +42,7 @@ def list_snippets(articles): content += '' a.append(content) # snippet a.append(text[head + 1].replace('
','')) # timestamp - a.append(path) # URL + a.append('/' + path.replace('.tpl','')) # URL a.append(clean(text[head]).replace(' ','+')) # social media title result.append(a) return result @@ -53,7 +55,7 @@ def count_lines(fname): def find_content(article, length, head, tail): content = "" - with open('entries/' + article) as f: + with open(loc + article) as f: for pos, line in enumerate(f): if pos > head + 1 and pos < length - tail: content += line @@ -80,7 +82,7 @@ def sort_files(files): return files#list(reversed(files)) def gather_files(): - files = os.listdir('entries/') + files = os.listdir(loc) files.remove('raw') return files @@ -129,6 +131,12 @@ def diary(page): info = {'css': 'diary', 'title': 'blessfrey - developer diary', 'year': datetime.datetime.now(), 'snippets': list_snippets(sort_files(gather_files())), 'latest': list_headlines(sort_files(gather_files())[0:5]), 'total': len(gather_files()), 'limit': 4, 'cluster': 3, 'page': page} return template('diary.tpl', info) +@route('/entries/') +def entry(page): + """diary entry""" + info = {'css': 'diary', 'title': 'blessfrey - developer diary', 'year': datetime.datetime.now(), 'latest': list_headlines(sort_files(gather_files())[0:5]), 'page': page} + return template('feature.tpl', info) + @route('/box') def box(): """personal page""" diff --git a/src/views/contact.tpl b/src/views/contact.tpl index 319afe1..c306166 100644 --- a/src/views/contact.tpl +++ b/src/views/contact.tpl @@ -7,5 +7,7 @@
You can always reach me on Twitter as @lilchimchooree through DMs or mentions.

+ Press can snag a copy of my presskit at the presskit page. +

diff --git a/src/views/diary-boxes.tpl b/src/views/diary-boxes.tpl new file mode 100644 index 0000000..27dbb24 --- /dev/null +++ b/src/views/diary-boxes.tpl @@ -0,0 +1,31 @@ + +
+

about

+ blessfrey is a game.
+
+ + + +
+

latest

+
+ +
+
+
+ +
+

disclosure

+ blessfrey.me is not using sponsored posts or affiliate links right now. Any that appear will be properly disclosed.
+
+ blessfrey.me does not collect personal information + has no cookies. Just a simple dev site.
+
diff --git a/src/views/diary.tpl b/src/views/diary.tpl index 692bda9..3961053 100644 --- a/src/views/diary.tpl +++ b/src/views/diary.tpl @@ -75,45 +75,18 @@ {{!s[1]}}
- {{!s[2]}} • + {{!s[2]}} + • + • + •
% end - -
-

about

- blessfrey is a game.
-
- - - -
-

latest

-
- -
-
-
- -
-

disclosure

- blessfrey.me is not using sponsored posts or affiliate links right now. Any that appear will be properly disclosed.
-
- blessfrey.me does not collect personal information + has no cookies. Just a simple dev site.
-
+% include diary-boxes.tpl