It looks like that action sendmessage evaluates the {{!!created}} somewhere
other than at the outer macro.
Using this variation:
\define exportButtonFilename(baseFilename)
$baseFilename$$(extension)$
\end
\define export-these-tiddlers(xportFilter:"replaceme",lingoBase,baseFilename
:"tiddlers")
<$vars exportFilter="""[sameday:created[$(mycreated)$]]
[sameday:modified[$(mycreated)$]]""" >
<span class="tc-popup-keep"><$button popup=<<qualify "$:/state/popup/export"
>> tooltip={{$lingoBase$Hint}} aria-label={{$lingoBase$Caption}} class=<<tv-
config-toolbar-class>> selectedClass="tc-selected">
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
{{$:/core/images/export-button}}
</$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<span class="tc-btn-text"><$text text={{$lingoBase$Caption}}/></span>
</$list>
</$button></span><$reveal state=<<qualify "$:/state/popup/export">> type=
"popup" position="below" animate="yes">
<div class="tc-drop-down">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/Exporter]]">
<$set name="extension" value={{!!extension}}>
<$button class="tc-btn-invisible">
<$action-sendmessage $message="tm-download-file" $param=<<currentTiddler>>
exportFilter=<<exportFilter>> filename=<<exportButtonFilename
"""$baseFilename$""">>/>
<$action-deletetiddler $tiddler=<<qualify "$:/state/popup/export">>/>
<$transclude field="description"/>
</$button>
</$set>
</$list>
</div>
</$reveal>
I then invoked the macro like this:
<$vars mycreated={{!!created}} mymodified={{!!modified}}>
<<export-these-tiddlers>>
</$vars>
And that seemed to work. Notice that you can no longer actually pass a
filter. I suspect that it's possible to incorporate those outer vars back
into your macro. As they say, the rest is left as an exercise ...
Good luck,
Mark
On Monday, March 5, 2018 at 12:27:17 PM UTC-8, Steven Schneider wrote:
>
> In an old thread from last year on "Export each tiddler plugin", one of
> Eric's responses
> <https://groups.google.com/forum/#!searchin/tiddlywiki/sameday$20journal%7Csort:date/tiddlywiki/V33mvijcKQU/WvIdYPHXBAAJ>
> contained
> this filter listing all tiddlers created or modifed on the date of the
> current tiddler:
>
> <$list filter="[sameday:created{!!created}] [sameday:modified{!!created}]">
> <li><$link><$text text=<<currentTiddler>>/></$link></li>
> </$list>
>
> I'd like to be able to export these tiddlers as a json file for further
> processing.
>
> I'm working on modifying the $:/core/macros/export
> <https://tiddlywiki.com/#%24%3A%2Fcore%2Fmacros%2Fexport> by using Eric's
> filter in the macro, and expecting to put <<export-these-tiddlers>> into a
> new tiddler to generate the export file.
>
> But I'm ending up with a blank json file.
>
> Any thoughts? (I've highlighted the line of the macro that I modified).
>
> Thanks,
>
> //steve.
>
> ---------------------
>
>
>
> \define exportButtonFilename(baseFilename)
> $baseFilename$$(extension)$
> \end
>
> \define export-these-tiddlers(exportFilter:"[sameday:created{!!created}]
> [sameday:modified{!!created}]",lingoBase,baseFilename:"tiddlers")
> <span class="tc-popup-keep"><$button popup=<<qualify
> "$:/state/popup/export">> tooltip={{$lingoBase$Hint}}
> aria-label={{$lingoBase$Caption}} class=<<tv-config-toolbar-class>>
> selectedClass="tc-selected">
> <$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
> {{$:/core/images/export-button}}
> </$list>
> <$list filter="[<tv-config-toolbar-text>prefix[yes]]">
> <span class="tc-btn-text"><$text text={{$lingoBase$Caption}}/></span>
> </$list>
> </$button></span><$reveal state=<<qualify "$:/state/popup/export">>
> type="popup" position="below" animate="yes">
> <div class="tc-drop-down">
> <$list filter="[all[shadows+tiddlers]tag[$:/tags/Exporter]]">
> <$set name="extension" value={{!!extension}}>
> <$button class="tc-btn-invisible">
> <$action-sendmessage $message="tm-download-file" $param=<<currentTiddler>>
> exportFilter="""$exportFilter$""" filename=<<exportButtonFilename
> """$baseFilename$""">>/>
> <$action-deletetiddler $tiddler=<<qualify "$:/state/popup/export">>/>
> <$transclude field="description"/>
> </$button>
> </$set>
> </$list>
> </div>
> </$reveal>
> \end
>
> but I end up with an empty file.
>
>
>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/61e1a9f8-a70a-43eb-a98e-efbbc6c3c4b6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.