Skip to content

Commit

Permalink
Update 1.7.3
Browse files Browse the repository at this point in the history
  • Loading branch information
kookma committed Nov 6, 2021
1 parent 2a4e3b4 commit c79e911
Show file tree
Hide file tree
Showing 5 changed files with 209 additions and 59 deletions.
211 changes: 179 additions & 32 deletions docs/index.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions packaged/refnotes.tid

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions source/refnotes/macros/find.tid
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
created: 20181213121411187
modified: 20210917161905907
modified: 20211105070807510
tags: $:/tags/Macro
title: $:/plugins/kookma/refnotes/macros/find
type: text/vnd.tiddlywiki
Expand All @@ -11,9 +11,9 @@ type: text/vnd.tiddlywiki
stop=<<__end__>>
output-macro=<<__output__>>
>
<$list variable="p1" filter="[<fulltext>splitbefore<start>]">
<$list variable="p2" filter="[<fulltext>removeprefix<p1>]">
<$list variable="p3" filter="[<p2>splitbefore<stop>removesuffix<stop>]">
<$list variable=p1 filter="[<fulltext>splitbefore<start>]">
<$list variable=p2 filter="[<fulltext>removeprefix<p1>]">
<$list variable=p3 filter="[<p2>splitbefore<stop>removesuffix<stop>]">
<$macrocall $name=<<output-macro>> p=<<p3>> />
<$reveal type="match" text="all" default=<<__mode__>> >
<$macrocall $name="find"
Expand Down
37 changes: 20 additions & 17 deletions source/refnotes/macros/showabbrs.tid
Original file line number Diff line number Diff line change
@@ -1,41 +1,44 @@
created: 20210404111656614
modified: 20210917161905932
modified: 20211106193550015
tags: $:/tags/Macro
title: $:/plugins/kookma/refnotes/macros/showabbrs
type: text/vnd.tiddlywiki

\define showabbrs(filter:"[<currentTiddler>]", dtiddler:"Glossary", title:"Empty", emptyMessage:"")
<$wikify name="term-indexes" text=<<find-all-items>> >
<$macrocall $name="abbr-list" dtiddler=<<__dtiddler__>> indexes=<<term-indexes>> title=<<__title__>> emptyMessage=<<__emptyMessage__>> />
<$wikify name="indexes" text=<<find-all-items>> >
<$macrocall $name="abbr-list" indexes=<<indexes>> dtiddler=<<__dtiddler__>> title=<<__title__>> emptyMessage=<<__emptyMessage__>> />
</$wikify>
\end

\define patterndb() \[\[|\]\]
\define pattern() ('.*?'|".*?"|\S+)
\define output-item(p)
<$list filter="""[<__p__>search-replace:g:regexp<patterndb>,["]]""" variable=pars>
<$list filter="""[<pars>trim[]!prefix[dict:]search-replace[term:],[]splitregexp<pattern>trim[]!is[blank]!prefix[dict:]first[]]""">
<$text text=<<currentTiddler>>/>
</$list>
<$list filter="""[<pars>trim[]prefix[dict:]search-replace[term:],[]splitregexp<pattern>trim[]!is[blank]!prefix[dict:]last[]]""">
<$text text=<<currentTiddler>>/>
</$list>
</$list>
\end

\define find-all-items()
<$list filter=<<__filter__>> >
<$macrocall $name="find" text={{!!text}} begin="<<abbr " end=">>" output="output-item"/>
</$list>
\end

\define output-item(p)
<$set name="items" value=<<__p__>> >
<$set name="item" value={{{ [enlist<items>limit[1]] }}} >
<$set name="item-noquotes" value={{{ [<item>removeprefix["]removesuffix["]] [<item>removeprefix[']removesuffix[']] ~[<item>] }}} emptyValue="NOT_FOUND">
<<item-noquotes>>
</$set>
</$set>
</$set>
\end


\define abbr-list(dtiddler, indexes, title:"Empty", emptyMessage)
<$list filter="$indexes$ +[limit[1]]" variable=null emptyMessage=<<__emptyMessage__>> ><!-- check to see if there is any abbreviations -->
\define abbr-list(dtiddler, indexes, title:"Empty", emptyMessage:"")
<$list filter="[<indexes>limit[1]]" variable=null emptyMessage=<<__emptyMessage__>> ><!-- check to see if there is any abbreviations -->
<$reveal tag="div" type="nomatch" default="Empty" text=<<__title__>> >
<h2><$text text=<<__title__>> /></h2>
</$reveal>
<table class="refnotes-table-borderless">
<$list filter="""$indexes$ +[sort[title]]""" variable="item">
<$list filter="""[subfilter<__indexes__>]""" variable="item">
<tr>
<td class="refnotes-abbr-term"><<item>></td>
<td class="refnotes-abbr-term"><$text text=<<item>> /></td>
<td>
<$set name="term" tiddler=<<__dtiddler__>> index=<<item>> emptyValue=<<term-not-found>> >
<<term>>
Expand Down
6 changes: 3 additions & 3 deletions source/refnotes/plugin.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"name": "Refnotes",
"description": "references, citations, footnotes and abbreviations in Tiddlywiki",
"author": "Mohammad Rahmani",
"version": "1.7.2",
"version": "1.7.3",
"core-version": ">=5.2.0",
"source": "https://github.com/kookma/TW-Refnotes",
"list": "readme license history",
"plugin-type": "plugin",
"dependents": "bibtex"
"dependents": "bibtex",
"plugin-type": "plugin"
}

0 comments on commit c79e911

Please sign in to comment.