Update NoteExtender.xml

master
AardCrowley 2 years ago committed by GitHub
parent 8164b67cac
commit 776f922657
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -10,23 +10,22 @@
<!-- Aliases -->
<aliases>
<alias match="^(note(?: read(?: \d+| last| again)?)?)$" enabled="y" regexp="y" script="startNoteRead" sequence="100">
<alias match="^(note?(?: read(?: \d+| last| again)?)?)$" enabled="y" regexp="y" script="startNoteRead" sequence="100">
</alias>
<alias match="^notewin (on|off|show|hide|clear|help)$" enabled="y" regexp="y" ignore_case="y" script="toggleNoteWin" sequence="100">
</alias>
<alias match="^(note\s?(?:list(?:\s\d+)?|unread|to\s\w+|from\s\w+|subj\s.+)?)$" enabled="y" regexp="y" script="startNoteList" sequence="100">
<alias match="^(note?\s?(?:list(?:\s\d+)?|unread|to\s\w+|from\s\w+|subj\s.+)?)$" enabled="y" regexp="y" script="startNoteList" sequence="100">
</alias>
</aliases>
<script>
<![CDATA[
require "gmcphelper"
local extras = require "aard_lua_extras"
require "gmcphelper"
local snapshotV = tonumber(extras.PackageVersion())
dofile(GetInfo(60) .. "aardwolf_colors.lua")
require 'tprint'
local prefix = GetAlphaOption("script_prefix")
@ -89,17 +88,27 @@ function startNoteList(name, line, wildcards)
end
function findBoundaries(tbl)
local startIdx = 1
local endIdx = #tbl
local foundStart = false
local tildeStr = string.rep("~", 79)
while startIdx<= endIdx and not tbl[startIdx][1].text:find("~") and not tbl[strtIdx][1].text:find("No more new") do
table.remove(tbl, startIdx)
startIdx = startIdx + 1
for i,v in ipairs(tbl) do
if v[1].text == tildeStr or v[1].text:find("No more new") then
foundStart = true
break
else
table.remove(tbl, i)
end
end
while endIdx >= 1 and not tbl[endIdx][1].text:find("~") and not tbl[endIdx][1].text:find("There are no") and not tbl[endIdx][1].text:find("Changed to") do
table.remove(tbl, endIdx)
endIdx = endIdx -1
if foundStart then
for i = #tbl, 1, -1 do
if tbl[i][1].text == tildeStr or tbl[i][1].text:find("There are no") or tbl[i][1].text:find("Changed") then
break
else
table.remove(tbl, i)
end
end
end
return tbl

Loading…
Cancel
Save