Fix timstamp issue. NEXT: Pagination

This commit is contained in:
Netscape Navigator 2019-11-16 21:06:50 -06:00
parent 47f10403e1
commit 49d3237401
26 changed files with 54 additions and 51 deletions

View File

@ -1,7 +1,7 @@
---
title: SSB Post 17Bk2
date: 2019-06-30 14:06 -0500
title: SSB Log Entry 90
date: 2019-07-28T22:41:12-05:00
tags:
---

View File

@ -1,7 +1,7 @@
---
title: SSB Post 1JNQt
date: 2019-06-30 14:06 -0500
title: SSB Log Entry 104
date: 2019-09-04T16:05:07-05:00
tags:
---

View File

@ -1,7 +1,7 @@
---
title: SSB Post 1fVax
date: 2019-06-30 14:06 -0500
title: SSB Log Entry 199
date: 2019-11-16T19:29:12-06:00
tags:
---

View File

@ -1,7 +1,7 @@
---
title: SSB Post 2Sgr4
date: 2019-06-30 14:06 -0500
title: SSB Log Entry 96
date: 2019-08-15T11:47:21-05:00
tags:
---

View File

@ -1,7 +1,7 @@
---
title: SSB Post 61wzQ
date: 2019-06-30 14:06 -0500
title: SSB Log Entry 78
date: 2019-06-18T10:13:22-05:00
tags:
---

View File

@ -1,7 +1,7 @@
---
title: SSB Post 9vcVJ
date: 2019-06-30 14:06 -0500
title: SSB Log Entry 79
date: 2019-06-18T10:13:59-05:00
tags:
---

View File

@ -1,7 +1,7 @@
---
title: SSB Post B6ImH
date: 2019-06-30 14:06 -0500
title: SSB Log Entry 122
date: 2019-10-01T11:48:26-05:00
tags:
---

View File

@ -1,7 +1,7 @@
---
title: SSB Post GEEiR
date: 2019-06-30 14:06 -0500
title: SSB Log Entry 101
date: 2019-08-21T08:51:25-05:00
tags:
---

View File

@ -1,7 +1,7 @@
---
title: SSB Post GWIbb
date: 2019-06-30 14:06 -0500
title: SSB Log Entry 192
date: 2019-11-16T13:19:45-06:00
tags:
---

View File

@ -1,7 +1,7 @@
---
title: SSB Post KkrwK
date: 2019-06-30 14:06 -0500
title: SSB Log Entry 152
date: 2019-10-19T12:14:20-05:00
tags:
---

View File

@ -1,7 +1,7 @@
---
title: SSB Post Mb2kM
date: 2019-06-30 14:06 -0500
title: SSB Log Entry 172
date: 2019-10-27T15:21:08-05:00
tags:
---

View File

@ -1,7 +1,7 @@
---
title: SSB Post OobDu
date: 2019-06-30 14:06 -0500
title: SSB Log Entry 106
date: 2019-09-23T10:29:53-05:00
tags:
---

View File

@ -1,7 +1,7 @@
---
title: SSB Post T8u3j
date: 2019-06-30 14:06 -0500
title: SSB Log Entry 105
date: 2019-09-20T13:50:09-05:00
tags:
---

View File

@ -1,7 +1,7 @@
---
title: SSB Post T9FPB
date: 2019-06-30 14:06 -0500
title: SSB Log Entry 146
date: 2019-10-09T07:52:02-05:00
tags:
---

View File

@ -1,7 +1,7 @@
---
title: SSB Post ZtBAW
date: 2019-06-30 14:06 -0500
title: SSB Log Entry 161
date: 2019-10-26T14:48:00-05:00
tags:
---

View File

@ -1,7 +1,7 @@
---
title: SSB Post jvKh9
date: 2019-06-30 14:06 -0500
title: SSB Log Entry 51
date: 2019-05-17T16:51:45-05:00
tags:
---

View File

@ -1,7 +1,7 @@
---
title: SSB Post kJAmQ
date: 2019-06-30 14:06 -0500
title: SSB Log Entry 34
date: 2019-05-13T20:33:22-05:00
tags:
---

View File

@ -1,7 +1,7 @@
---
title: SSB Post kSBb4
date: 2019-06-30 14:06 -0500
title: SSB Log Entry 57
date: 2019-05-19T11:38:45-05:00
tags:
---

View File

@ -1,7 +1,7 @@
---
title: SSB Post mGm1z
date: 2019-06-30 14:06 -0500
title: SSB Log Entry 80
date: 2019-06-18T10:14:29-05:00
tags:
---

View File

@ -1,7 +1,7 @@
---
title: SSB Post mrEWZ
date: 2019-06-30 14:06 -0500
title: SSB Log Entry 165
date: 2019-10-26T16:17:47-05:00
tags:
---

View File

@ -1,7 +1,7 @@
---
title: SSB Post p-Sgq
date: 2019-06-30 14:06 -0500
title: SSB Log Entry 77
date: 2019-06-13T14:23:06-05:00
tags:
---

View File

@ -1,7 +1,7 @@
---
title: SSB Post vOpay
date: 2019-06-30 14:06 -0500
title: SSB Log Entry 121
date: 2019-10-01T09:28:03-05:00
tags:
---

View File

@ -1,7 +1,7 @@
---
title: SSB Post wqo57
date: 2019-06-30 14:06 -0500
title: SSB Log Entry 135
date: 2019-10-04T10:01:17-05:00
tags:
---

View File

@ -1,7 +1,7 @@
---
title: SSB Post zu6ue
date: 2019-06-30 14:06 -0500
title: SSB Log Entry 140
date: 2019-10-07T10:19:10-05:00
tags:
---

View File

@ -1,6 +1,6 @@
---
title: SSB Post <%= key[0..4] %>
title: SSB Log Entry <%= sequence %>
date: <%= time %>
tags:

View File

@ -14,9 +14,10 @@ posts = []
txt.each_line do |x|
json = JSON.parse(x, symbolize_names: true)
if json.dig(:value, :content, :reply) == nil
t = Time.at(1556651174818 / 1000)
t = Time.at(json.dig(:value, :timestamp) / 1000)
posts.push({
time: t.strftime("%Y-%M-%d %H:%M %z"),
sequence: json.dig(:value, :sequence),
time: t.iso8601,
key: Base64.urlsafe_encode64(Base64.decode64(json.fetch(:key))),
text: (json.dig(:value, :content, :text) || ""),
links: json.dig(:value, :content, :mentions) || [],
@ -28,6 +29,7 @@ posts.map do |post|
key = post.fetch(:key)
content = post[:text]
time = post[:time]
sequence = post[:sequence]
post[:links].map do |link|
hash = link[:link]
case hash[0]
@ -41,6 +43,7 @@ posts.map do |post|
path = BLOB_PATH % [b64, extension]
File.write(path, open(url).read) unless File.file?(path)
content.gsub!(hash, path.gsub("source/", "/"))
# content.gsub!("image.png", "")
end
end
File.write("source/blog/ssb-#{key}.html.markdown", POST_TEMPLATE.result(binding))