commit 91f50f083b3bfb964db8cea81f96379056c01739
parent 15a5942d4955b21b2a0bff9db6cd603f3c2cfe00
Author: Hugo Soucy <hugo@soucy.cc>
Date: Sat, 9 Jan 2021 22:30:20 -0500
Change the reply script
Diffstat:
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/bin/reply b/bin/reply
@@ -4,7 +4,7 @@ do
package.path = package.path .. ';'.. arg[0]:match("(.*/)") ..'/?.lua'
--
local inspect = require 'inspect'
- local htmlparser = require 'htmlparser'
+ --local htmlparser = require 'htmlparser'
local lustache = require 'lustache'
local file = require 'utils.file'
local slugify = require 'utils.slugify'
@@ -36,21 +36,21 @@ do
tostring(reply_url)
until string.len(reply_url) > 0
- local function get_econtent()
- local _file = assert(io.popen('curl ' .. reply_url))
- local data = assert(_file:read("*a"))
- local root = htmlparser.parse(data)
- local elements = root:select(".detailed-status:first")
- local e_content
+ -- local function get_econtent()
+ -- local _file = assert(io.popen('curl ' .. reply_url))
+ -- local data = assert(_file:read("*a"))
+ -- local root = htmlparser.parse(data)
+ -- local elements = root:select(".detailed-status:first")
+ -- local e_content
- _file:close()
+ -- _file:close()
- for _, e in ipairs(elements) do
- e_content = e:getcontent()
- end
+ -- for _, e in ipairs(elements) do
+ -- e_content = e:getcontent()
+ -- end
- return e_content
- end
+ -- return e_content
+ -- end
-- Set the structure of the data file
local reply_model = {
@@ -59,7 +59,7 @@ do
date = os.date('%Y-%m-%d'),
datetime = os.date('%H:%M:%S'),
posttype = "reply",
- inreplyto = get_econtent() or nil
+ --inreplyto = get_econtent() or nil
}
-- Render the markdown file