Glad it works for you! By the way I like your idea of using cards for tasks. I hope I can document this or add examples in the next release of Shiraz.
Cheers Mohammad On Wed, Dec 30, 2020 at 6:26 PM scot <[email protected]> wrote: > Thanks again Mohammad, it works a treat. > Sorry, my mistake, my tiddler had duedate rather than due-date field. > > I'm not sure what's happening when I export a tiddler in json format, I > keeping getting errors when I import them by dragging them onto a wiki. > JSON error:Syntax Error:Json.parse: unexpected character at line 1 column > 1 of the JSON data > > Best Wishes > Scot > > > On Wednesday, 30 December 2020 at 14:24:21 UTC Mohammad wrote: > >> See below >> >> <$list filter="[tag[task]!tag[done]]"> >> <$macrocall $name="card" >> header="""<$checkbox tag="done"> <$link><$view field="due-date" >> format="date" template="DDD DDth MMM YYYY"/></$link> </$checkbox>""" >> title="{{!!object-type}} - {{!!who}}" >> text="{{!!what}}<br>{{!!note}}" >> footer={{!!where}} >> width=18em >> /> >> </$list> >> >> It uses a field due-date. >> >> To check >> >> 1. goto https://kookma.github.io/TW-Shiraz/ >> 2. create a sample tiddler with above code >> 3. create a sample task contains below fields >> 1. what >> 2. who >> 3. where >> 4. note >> 5. object-type >> 6. due-date >> >> I tested again and it works fine. >> >> >> >> Best wishes >> Mohammad >> >> >> On Wed, Dec 30, 2020 at 5:40 PM scot <[email protected]> wrote: >> >>> Hello Mohammad, >>> thanks for modifying my code, but I can't get it to work. >>> Here is an example tiddler. Note: It does not include the {{!!time}} in >>> the header, maybe that would also need extra changes. >>> Scot >>> >>> >>> On Wednesday, 30 December 2020 at 04:19:36 UTC Mohammad wrote: >>> >>>> Scot, >>>> >>>> I modified your own code a bit and it should work. >>>> >>>> <$list filter="[tag[task]!tag[done]]"> >>>> <$macrocall $name="card" >>>> header="""<$checkbox tag="done"> <$link><$view field="due-date" >>>> format="date" template="DDD DDth MMM YYYY"/></$link> </$checkbox>""" >>>> >>>> title="{{!!object-type}} - {{!!who}}" >>>> text="{{!!what}}<br>{{!!note}}" >>>> footer={{!!where}} >>>> width=18em >>>> /> >>>> </$list> >>>> On Tue, Dec 29, 2020 at 11:36 PM scot <[email protected]> wrote: >>>> >>>>> Mohammad, >>>>> I do love Tiddlywiki. >>>>> >>>>> If it's not too much trouble, could you answer another question. >>>>> I was trying to use cards for tasks. >>>>> I would like to add the duedate in the header like below. >>>>> <$checkbox tag="done"> <$link to={{!!title}}><$view field="duedate" >>>>> format="date" template="DDD DDth MMM YYYY"/></$link> </$checkbox> >>>>> >>>>> This card works, but the duedate format is 20201229. I would like Tuesday >>>>> 29th December 2020 >>>>> >>>>> <$list filter="[tag[task]!tag[done]]"><$macrocall $name="card" >>>>> header="{{!!duedate}} @ {{!!time}}" >>>>> title="{{!!object-type}} - {{!!who}}" >>>>> text="{{!!what}}<br>{{!!note}}" >>>>> footer={{!!where}} >>>>> width=18em >>>>> /> >>>>> </$list> >>>>> >>>>> Thanks >>>>> >>>>> Scot >>>>> >>>>> On Tuesday, 29 December 2020 at 18:45:00 UTC Mohammad wrote: >>>>> >>>>>> Hello Mohammad, >>>>>>> Thank you very much for the solution. It's exactly what I was after. >>>>>>> You make everything appear so easy - I wish Santa could have brought >>>>>>> me your coding skills for Christmas. >>>>>>> >>>>>> >>>>>> Amen! >>>>>> You need to love Tiddlywiki, that is it ;-) >>>>>> >>>>>> >>>>>>> Best Wishes, >>>>>>> >>>>>>> Scot >>>>>>> >>>>>>> >>>>>>> On Tuesday, 29 December 2020 at 16:21:24 UTC Mohammad wrote: >>>>>>> >>>>>>>> Hi Scot, >>>>>>>> The way you called macro is not correct. If you want to create a >>>>>>>> number of cards from your tiddlers say tag with mylist do as below >>>>>>>> >>>>>>>> <$list filter="[tag[mylist]]"><$macrocall $name="card" header="My >>>>>>>> Test Header" >>>>>>>> title={{!!title}} >>>>>>>> text={{!!text}} >>>>>>>> footer={{!!footer}} >>>>>>>> /> >>>>>>>> </$list> >>>>>>>> >>>>>>>> I have attached an example. Down the attached JSON and drag and >>>>>>>> drop into https://kookma.github.io/TW-Shiraz/ >>>>>>>> Open TEST. >>>>>>>> >>>>>>>> Do not forget your title should have the required >>>>>>>> information/fields. >>>>>>>> >>>>>>>> >>>>>>>> Best wishes >>>>>>>> Mohammad >>>>>>>> >>>>>>>> >>>>>>>> On Tue, Dec 29, 2020 at 6:24 PM scot <[email protected]> wrote: >>>>>>>> >>>>>>>>> On a similar note, I would like to use the card macro with a list >>>>>>>>> of tagged items. >>>>>>>>> e.g. <$list filter="[tag[mylist]sort[title]]"> >>>>>>>>> >>>>>>>>> This example does not work. Can you offer any help please. >>>>>>>>> >>>>>>>>> <<card >>>>>>>>> <$list filter="[tag[mylist]sort[title]]" >>>>>>>>> >>>>>>>>> header:"Header" >>>>>>>>> title:<<title>> >>>>>>>>> subtitle:"subtitle" >>>>>>>>> text:"content" >>>>>>>>> footer:"footer" >>>>>>>>> width:"18rem" >>>>>>>>> class:"text-dark" >>>>>>>>> >>>>>>>>> /> >>>>>>>>> >> >>>>>>>>> >>>>>>>>> Scot >>>>>>>>> >>>>>>>>> On Thursday, 4 June 2020 at 00:55:38 UTC+1 TW Tones wrote: >>>>>>>>> >>>>>>>>>> Your Welcome. >>>>>>>>>> >>>>>>>>>> Tony >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On Thursday, June 4, 2020 at 3:53:02 AM UTC+10, passingby wrote: >>>>>>>>>>> >>>>>>>>>>> Hello Tony, >>>>>>>>>>> >>>>>>>>>>> Thank you for your solution. Really appreciate your effort. >>>>>>>>>>> >>>>>>>>>>> -passingby >>>>>>>>>>> >>>>>>>>>>> On Wednesday, June 3, 2020 at 1:46:21 AM UTC-7, TonyM wrote: >>>>>>>>>>>> >>>>>>>>>>>> Passingby; >>>>>>>>>>>> >>>>>>>>>>>> This example works for this use case by splitting the input on >>>>>>>>>>>> new line. >>>>>>>>>>>> >>>>>>>>>>>> <$list filter="[<somelistmacro>splitregexp[\n]]" variable=item> >>>>>>>>>>>> <$macrocall $name="card" text=<<item>>/> >>>>>>>>>>>> </$list> >>>>>>>>>>>> >>>>>>>>>>>> However it seems a little odd that your list contains the * >>>>>>>>>>>> which is usually reserved until displaying the list. >>>>>>>>>>>> >>>>>>>>>>>> If the list was tiddler titles you would possible use the >>>>>>>>>>>> enlist operator. >>>>>>>>>>>> >>>>>>>>>>>> Regards >>>>>>>>>>>> Tony >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> On Wednesday, June 3, 2020 at 5:07:35 PM UTC+10, passingby >>>>>>>>>>>> wrote: >>>>>>>>>>>>> >>>>>>>>>>>>> Hello all, >>>>>>>>>>>>> >>>>>>>>>>>>> I am trying out bootstrap cards of Shiraz plugin. I wanted a >>>>>>>>>>>>> list to be passed as 'text' parameter so I thought I need to pass >>>>>>>>>>>>> it via a >>>>>>>>>>>>> macro call like this: >>>>>>>>>>>>> >>>>>>>>>>>>> \define somelistmacro() >>>>>>>>>>>>> * item 1 >>>>>>>>>>>>> * item 2 >>>>>>>>>>>>> * item 3 >>>>>>>>>>>>> \end >>>>>>>>>>>>> >>>>>>>>>>>>> <$macrocall $name="card" text=<<somelistmacro>>/> >>>>>>>>>>>>> >>>>>>>>>>>>> But the wikitext list is not being rendered. What am I doing >>>>>>>>>>>>> wrong? >>>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>> 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 view this discussion on the web visit >>>>>>>>> https://groups.google.com/d/msgid/tiddlywiki/7ffc0eae-f396-4f58-adf4-7d7058c62fa8n%40googlegroups.com >>>>>>>>> <https://groups.google.com/d/msgid/tiddlywiki/7ffc0eae-f396-4f58-adf4-7d7058c62fa8n%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>>>>>> . >>>>>>>>> >>>>>>>> -- >>>>>>> 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 view this discussion on the web visit >>>>>>> https://groups.google.com/d/msgid/tiddlywiki/49ca8405-764e-4c44-b5d2-c087b2610777n%40googlegroups.com >>>>>>> <https://groups.google.com/d/msgid/tiddlywiki/49ca8405-764e-4c44-b5d2-c087b2610777n%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>>>> . >>>>>>> >>>>>> -- >>>>> 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 view this discussion on the web visit >>>>> https://groups.google.com/d/msgid/tiddlywiki/10f72009-63dd-4666-8455-88795fa0c425n%40googlegroups.com >>>>> <https://groups.google.com/d/msgid/tiddlywiki/10f72009-63dd-4666-8455-88795fa0c425n%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>> . >>>>> >>>> -- >>> 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 view this discussion on the web visit >>> https://groups.google.com/d/msgid/tiddlywiki/b9a391c6-6caa-4d20-8e0d-ddbc4a7e81b8n%40googlegroups.com >>> <https://groups.google.com/d/msgid/tiddlywiki/b9a391c6-6caa-4d20-8e0d-ddbc4a7e81b8n%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- > 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 view this discussion on the web visit > https://groups.google.com/d/msgid/tiddlywiki/a321dd64-5be8-4e94-a437-94cb6c8bfca0n%40googlegroups.com > <https://groups.google.com/d/msgid/tiddlywiki/a321dd64-5be8-4e94-a437-94cb6c8bfca0n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/CAAV1gMAxWkHRVb%3D_MMrN5i0XCoY6FiZsTQfgA%2Bd4%3DcTYhDu2rw%40mail.gmail.com.

