diff options
author | Karl Berry <karl@freefriends.org> | 2019-04-04 20:56:06 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-04-04 20:56:06 +0000 |
commit | 51826e690ad1c167b12b52e25604ed3579a989ba (patch) | |
tree | 473a2307448528e7ece67821b6c355a078b95f12 /Master/texmf-dist/tex/latex/biblatex-ext/blxextdoiapi.lua | |
parent | acab24042d34dd439e1d074820d1da2fa1d591cd (diff) |
biblatex-ext (4apr19)
git-svn-id: svn://tug.org/texlive/trunk@50759 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-ext/blxextdoiapi.lua')
-rw-r--r-- | Master/texmf-dist/tex/latex/biblatex-ext/blxextdoiapi.lua | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-ext/blxextdoiapi.lua b/Master/texmf-dist/tex/latex/biblatex-ext/blxextdoiapi.lua index 0880badef48..25266c31f2d 100644 --- a/Master/texmf-dist/tex/latex/biblatex-ext/blxextdoiapi.lua +++ b/Master/texmf-dist/tex/latex/biblatex-ext/blxextdoiapi.lua @@ -2,8 +2,8 @@ blxextdoiapi = blxextdoiapi or {} local blxextdoiapi_module = { name = "blxextdoiapi", - version = "v0.7", - date = "2019/02/08", + version = "v0.7a", + date = "2019/04/04", description = "Obtain open access information from DOI via unpaywall.org", author = "Moritz Wemheuer", license = "LPPL v1.3c", @@ -11,22 +11,35 @@ local blxextdoiapi_module = { } -- inspired by Eric Marsden's answer to https://tex.stackexchange.com/q/459449/ + -- luatexbase's luatexbase.provides_module returns the loggers directly local err, warn, info, log = luatexbase.provides_module(blxextdoiapi_module) +-- Does it even make sense to try and make use of the extra luatexbase stuff +-- from luatexbase.sty? Since we don't want to assume that package in general, +-- we have to manually recode it anyway... + -- for ltluatex's luatexbase.provides_module we need to construct the loggers local error = err or - (function (s) luatexbase.module_error(blxextdoiapi_module.name, s) end) + (function (s,...) + return luatexbase.module_error(blxextdoiapi_module.name, s:format(...)) + end) local warning = warn or - (function (s) luatexbase.module_warning(blxextdoiapi_module.name, s) end) + (function (s,...) + return luatexbase.module_warning(blxextdoiapi_module.name, s:format(...)) + end) local info = info or - (function (s) luatexbase.module_info(blxextdoiapi_module.name, s) end) + (function (s,...) + return luatexbase.module_info(blxextdoiapi_module.name, s:format(...)) + end) local log = log or - (function (s) luatexbase.module_info(blxextdoiapi_module.name, s) end) + (function (s,...) + return luatexbase.module_info(blxextdoiapi_module.name, s:format(...)) + end) local http = require("socket.http") -local url = socket.url or require("socket.url") +local url = socket.url or require("socket.url") --- #17, LuaTeX 1.07 local json = utilities.json local os_time = os.time local os_date = os.date @@ -53,8 +66,7 @@ local function texsprint(s) end -- global database of DOIs --- is going to be loaded from \jobname.oai beforehand --- if the file exists +-- is going to be loaded from \jobname.oai beforehand if the file exists oadb = oadb or {} -- parse YYYY-MM-DD date as string (UTC time!) |