clean up comments

This commit is contained in:
scuti 2024-12-08 18:01:28 -08:00
parent 149c46cf51
commit 52854c00a9

View File

@ -1,24 +1,29 @@
local json = require("cjson") local json = require("cjson")
pleroma_avatar_save_path = nil -- location of downloaded images -- GLOBAL VARIABLES
pleroma_avatar_path = nil -- prepended to image file, written on page -- & meant to be assigned in config.lua
-- to configure, put above vars in a file named 'config.lua' --------------------
-- location of downloaded images
pleroma_avatar_save_path = nil
-- prepended to image file, written on page
pleroma_avatar_path = nil
-- instances may require auth to access api
-- pleroma_auth_token = nil
pcall( pcall(
function () function ()
dofile("config.lua") dofile("config.lua")
end end
) )
--[[ --[[
if these variables are still `nil` after `dofile()` then if `pleroma_avatar_*` are still `nil` after `dofile()` then the script will look for it in the yaml header.
the script will look for it in the yaml header.
note: lua filters can not access variables defined on the command line, if they are still nil afterwards, then the script
e.g `pandoc -V foo="bar"` will hotlink.
and it may not be ideal to define paths in yaml headers,
i.e changing the path for avatars on a website would involve editing each
manuscript.
]]-- ]]--
@ -98,6 +103,8 @@ function get(link, filename)
} }
end end
-- don't use auth bearer for downloading images' -- don't use auth bearer for downloading images'
-- its either not needed OR
-- there should be an extra check on the host
if pleroma_auth_token and not filename then if pleroma_auth_token and not filename then
local h = "--header=\"Authorization: Bearer %s\" " local h = "--header=\"Authorization: Bearer %s\" "
table.insert( table.insert(