aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authors-ol <s-ol@users.noreply.github.com>2018-11-24 07:11:26 +0000
committers-ol <s-ol@users.noreply.github.com>2018-11-24 07:11:26 +0000
commit2f7456dfd400edfba4090bf3adfcaf3769b4ec85 (patch)
tree84defec44278b90c42e567ca2636021fd5cf9314
parentalign markdown code styling (diff)
downloadmmm-2f7456dfd400edfba4090bf3adfcaf3769b4ec85.tar.gz
mmm-2f7456dfd400edfba4090bf3adfcaf3769b4ec85.zip
show dates in blog
-rw-r--r--mmm/mmmfs/conversion.moon10
-rw-r--r--root/blog/automating_my_rice/date: date$iso-86011
-rw-r--r--root/blog/automating_my_rice/date: time$iso8601-date1
-rw-r--r--root/blog/challenging_myself/date: date$iso-86011
-rw-r--r--root/blog/challenging_myself/date: time$iso8601-date1
-rw-r--r--root/blog/clocks_triggers_gates/date: date$iso-86011
-rw-r--r--root/blog/clocks_triggers_gates/date: time$iso8601-date1
-rw-r--r--root/blog/humane_filesystems/date: date$iso-86011
-rw-r--r--root/blog/humane_filesystems/date: time$iso8601-date1
-rw-r--r--root/blog/humane_filesystems/hidden: text$lua -> bool.lua1
-rw-r--r--root/blog/love_lua_photoshop_and_games/date: date$iso-86011
-rw-r--r--root/blog/love_lua_photoshop_and_games/date: time$iso8601-date1
-rw-r--r--root/blog/ludum_dare_33_postmortem/date: date$iso-86011
-rw-r--r--root/blog/ludum_dare_33_postmortem/date: time$iso8601-date1
-rw-r--r--root/blog/stencils_101/date: date$iso-86011
-rw-r--r--root/blog/stencils_101/date: time$iso8601-date1
-rw-r--r--root/blog/stretching_gates/date: date$iso-86011
-rw-r--r--root/blog/stretching_gates/date: time$iso8601-date1
-rw-r--r--root/blog/text$moonscript -> fn -> mmm$dom.moon12
-rw-r--r--root/blog/video_synth_research/date: date$iso-86011
-rw-r--r--root/blog/video_synth_research/date: time$iso8601-date1
21 files changed, 28 insertions, 13 deletions
diff --git a/mmm/mmmfs/conversion.moon b/mmm/mmmfs/conversion.moon
index 4f0eb0c..4df3497 100644
--- a/mmm/mmmfs/conversion.moon
+++ b/mmm/mmmfs/conversion.moon
@@ -65,13 +65,21 @@ converts = {
out: '%1',
transform: (source, fileder) ->
source\gsub '{{(.-)}}', (expr) ->
- path, facet = expr\match '^([%w-_/]*)%+(.*)'
+ path, facet = expr\match '^([%w%-_%./]*)%+(.*)'
assert path, "couldn't match TPL expression '#{expr}'"
target = fileder\walk "#{fileder.path}/#{path}"
assert target, "couldn't resolve rpath '#{path}' relative to #{fileder}"
target\gett facet
+ },
+ {
+ inp: 'time/iso8601-date',
+ out: 'time/unix',
+ transform: (val) ->
+ year, _, month, day = val\match '^%s*(%d%d%d%d)(%-?)([01]%d)%2([0-3]%d)%s*$'
+ assert year, "failed to parse ISO 8601 date: '#{val}'"
+ os.time :year, :month, :day
}
}
diff --git a/root/blog/automating_my_rice/date: date$iso-8601 b/root/blog/automating_my_rice/date: date$iso-8601
deleted file mode 100644
index 0f2e9ac..0000000
--- a/root/blog/automating_my_rice/date: date$iso-8601
+++ /dev/null
@@ -1 +0,0 @@
-2015-08-08 06:00:00 \ No newline at end of file
diff --git a/root/blog/automating_my_rice/date: time$iso8601-date b/root/blog/automating_my_rice/date: time$iso8601-date
new file mode 100644
index 0000000..f54d08b
--- /dev/null
+++ b/root/blog/automating_my_rice/date: time$iso8601-date
@@ -0,0 +1 @@
+2015-08-08
diff --git a/root/blog/challenging_myself/date: date$iso-8601 b/root/blog/challenging_myself/date: date$iso-8601
deleted file mode 100644
index 7e482c1..0000000
--- a/root/blog/challenging_myself/date: date$iso-8601
+++ /dev/null
@@ -1 +0,0 @@
-2015-06-27 21:00:00 \ No newline at end of file
diff --git a/root/blog/challenging_myself/date: time$iso8601-date b/root/blog/challenging_myself/date: time$iso8601-date
new file mode 100644
index 0000000..6472c5d
--- /dev/null
+++ b/root/blog/challenging_myself/date: time$iso8601-date
@@ -0,0 +1 @@
+2015-06-27
diff --git a/root/blog/clocks_triggers_gates/date: date$iso-8601 b/root/blog/clocks_triggers_gates/date: date$iso-8601
deleted file mode 100644
index 6b79603..0000000
--- a/root/blog/clocks_triggers_gates/date: date$iso-8601
+++ /dev/null
@@ -1 +0,0 @@
-2017-06-28 06:00:00 \ No newline at end of file
diff --git a/root/blog/clocks_triggers_gates/date: time$iso8601-date b/root/blog/clocks_triggers_gates/date: time$iso8601-date
new file mode 100644
index 0000000..19880e9
--- /dev/null
+++ b/root/blog/clocks_triggers_gates/date: time$iso8601-date
@@ -0,0 +1 @@
+2017-06-28
diff --git a/root/blog/humane_filesystems/date: date$iso-8601 b/root/blog/humane_filesystems/date: date$iso-8601
deleted file mode 100644
index 567e17d..0000000
--- a/root/blog/humane_filesystems/date: date$iso-8601
+++ /dev/null
@@ -1 +0,0 @@
-2018-02-28 06:00:00 \ No newline at end of file
diff --git a/root/blog/humane_filesystems/date: time$iso8601-date b/root/blog/humane_filesystems/date: time$iso8601-date
new file mode 100644
index 0000000..1c1707a
--- /dev/null
+++ b/root/blog/humane_filesystems/date: time$iso8601-date
@@ -0,0 +1 @@
+2018-02-28
diff --git a/root/blog/humane_filesystems/hidden: text$lua -> bool.lua b/root/blog/humane_filesystems/hidden: text$lua -> bool.lua
new file mode 100644
index 0000000..b30e187
--- /dev/null
+++ b/root/blog/humane_filesystems/hidden: text$lua -> bool.lua
@@ -0,0 +1 @@
+return true
diff --git a/root/blog/love_lua_photoshop_and_games/date: date$iso-8601 b/root/blog/love_lua_photoshop_and_games/date: date$iso-8601
deleted file mode 100644
index 9b13af5..0000000
--- a/root/blog/love_lua_photoshop_and_games/date: date$iso-8601
+++ /dev/null
@@ -1 +0,0 @@
-2016-05-29 06:00:00 \ No newline at end of file
diff --git a/root/blog/love_lua_photoshop_and_games/date: time$iso8601-date b/root/blog/love_lua_photoshop_and_games/date: time$iso8601-date
new file mode 100644
index 0000000..de2136d
--- /dev/null
+++ b/root/blog/love_lua_photoshop_and_games/date: time$iso8601-date
@@ -0,0 +1 @@
+2016-05-29
diff --git a/root/blog/ludum_dare_33_postmortem/date: date$iso-8601 b/root/blog/ludum_dare_33_postmortem/date: date$iso-8601
deleted file mode 100644
index c6b5f3d..0000000
--- a/root/blog/ludum_dare_33_postmortem/date: date$iso-8601
+++ /dev/null
@@ -1 +0,0 @@
-2015-08-25 06:00:00 \ No newline at end of file
diff --git a/root/blog/ludum_dare_33_postmortem/date: time$iso8601-date b/root/blog/ludum_dare_33_postmortem/date: time$iso8601-date
new file mode 100644
index 0000000..9e7bf47
--- /dev/null
+++ b/root/blog/ludum_dare_33_postmortem/date: time$iso8601-date
@@ -0,0 +1 @@
+2015-08-25
diff --git a/root/blog/stencils_101/date: date$iso-8601 b/root/blog/stencils_101/date: date$iso-8601
deleted file mode 100644
index 8fb1e1b..0000000
--- a/root/blog/stencils_101/date: date$iso-8601
+++ /dev/null
@@ -1 +0,0 @@
-2015-06-29 06:00:00 \ No newline at end of file
diff --git a/root/blog/stencils_101/date: time$iso8601-date b/root/blog/stencils_101/date: time$iso8601-date
new file mode 100644
index 0000000..0202ff1
--- /dev/null
+++ b/root/blog/stencils_101/date: time$iso8601-date
@@ -0,0 +1 @@
+2015-06-29
diff --git a/root/blog/stretching_gates/date: date$iso-8601 b/root/blog/stretching_gates/date: date$iso-8601
deleted file mode 100644
index ce5acc7..0000000
--- a/root/blog/stretching_gates/date: date$iso-8601
+++ /dev/null
@@ -1 +0,0 @@
-2017-07-04 06:00:00 \ No newline at end of file
diff --git a/root/blog/stretching_gates/date: time$iso8601-date b/root/blog/stretching_gates/date: time$iso8601-date
new file mode 100644
index 0000000..1f26b82
--- /dev/null
+++ b/root/blog/stretching_gates/date: time$iso8601-date
@@ -0,0 +1 @@
+2017-07-04
diff --git a/root/blog/text$moonscript -> fn -> mmm$dom.moon b/root/blog/text$moonscript -> fn -> mmm$dom.moon
index 6657529..100a9b7 100644
--- a/root/blog/text$moonscript -> fn -> mmm$dom.moon
+++ b/root/blog/text$moonscript -> fn -> mmm$dom.moon
@@ -1,10 +1,16 @@
import div, h3, ul, li from require 'mmm.dom'
+import opairs from require 'mmm.ordered'
import link_to from (require 'mmm.mmmfs.util') require 'mmm.dom'
=>
div {
h3 link_to @
- ul for child in *@children
- -- desc = child\gett 'description: mmm/dom'
- li (link_to child), nil -- ': ', desc
+ ul do
+ posts = { (p\gett 'date: time/unix'), p for p in *@children }
+
+ posts = for date, post in opairs posts
+ continue if post\get 'hidden: bool'
+ li (link_to post, os.date '%F', date), ' - ', post\gett 'title: mmm/dom'
+
+ posts
}
diff --git a/root/blog/video_synth_research/date: date$iso-8601 b/root/blog/video_synth_research/date: date$iso-8601
deleted file mode 100644
index b5f80a1..0000000
--- a/root/blog/video_synth_research/date: date$iso-8601
+++ /dev/null
@@ -1 +0,0 @@
-2017-06-26 06:00:00 \ No newline at end of file
diff --git a/root/blog/video_synth_research/date: time$iso8601-date b/root/blog/video_synth_research/date: time$iso8601-date
new file mode 100644
index 0000000..c3cf071
--- /dev/null
+++ b/root/blog/video_synth_research/date: time$iso8601-date
@@ -0,0 +1 @@
+2017-06-26