[plugin] Exporter: include book author name in myclippings export format (#12106)

reviewable/pr12120/r1
Arpan Ghosh 3 months ago committed by GitHub
parent add783156d
commit e88bfbed97
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -16,19 +16,17 @@ local function format(booknotes)
for ___, entry in ipairs(booknotes) do
for ____, clipping in ipairs(entry) do
if booknotes.title and clipping.text then
table.insert(tbl, booknotes.title)
local title_str = booknotes.title .. " (" .. (booknotes.author or "Unknown") .. ")"
table.insert(tbl, title_str)
local header = T(_("- Your highlight on page %1 | Added on %2"), clipping.page,
os.date("%A, %B %d, %Y %I:%M:%S %p", clipping.time))
table.insert(tbl, header)
table.insert(tbl, "")
table.insert(tbl, clipping.text)
table.insert(tbl, "==========")
if clipping.note then
table.insert(tbl, booknotes.title)
table.insert(tbl, title_str)
header = T(_("- Your note on page %1 | Added on %2"), clipping.page,
os.date("%A, %B %d, %Y %I:%M:%S %p", clipping.time))
table.insert(tbl, header)

Loading…
Cancel
Save