Hi Matthew,

Sorry, I was working on a solution to this yesterday, but I got 
sidetracked. Here's a demo 
<https://dl.dropboxusercontent.com/s/njl70ojvalhkri7/demo-make-incremental.html>
 
I've been building. It's not complete yet, and the essential ingredient is 
still missing, so you might not even want to waste your time with it yet. 
I'll let you know if/when I solve it. In the meantime, if anyone else can 
come up with a solution, that'd be great.

Hegart.


On Thursday, 21 April 2016 01:40:18 UTC+12, Matthew Petty wrote:
>
> Bump? Anyone?
> I have the feeling that setvars would be useful, or calc, or 
> action-setfield. But how to bring it together?
>
> On Tuesday, 19 April 2016 13:57:16 UTC+4, Matthew Petty wrote:
>>
>> Ah, no, apologies for the confusion. Here's what I want, in more detailed 
>> pseudocode (I'm probably using the wrong symbols):
>>
>> set index=1
>> set increment_amount=1
>> set filter="[tag[this_tag]nsort[sort_order]]"
>>
>> select list of tiddlers by <<filter>>
>> for each tiddler in list
>>     set field 'sort_order' to <<index>>
>>     increment <<index>> by <<increment_amount>>
>> next tiddler
>>
>>
>> One issue that I can think of is that because the filter is using the 
>> field being changed, it may affect the list when it is changed.
>>
>> -MJP
>>
>> On Tuesday, 19 April 2016 13:16:26 UTC+4, Hegart Dmishiv wrote:
>>>
>>> Hi Matthew,
>>>
>>> Can I confirm, do you want the *name* of the field itself to be 
>>> incremented, or the *value* within a given field to be incremented? 
>>> From your examples above, it looks like you want the former, is that 
>>> correct?
>>>
>>> Hegart.
>>>
>>>
>>> On Tuesday, 19 April 2016 21:01:33 UTC+12, Matthew Petty wrote:
>>>>
>>>> I've looked at that, but it seems to be creating new tiddlers, and 
>>>> setting the titles. What I need is to take existing tiddlers and set a 
>>>> field.
>>>>
>>>> On Tue, 19 Apr 2016 at 12:46 Hegart Dmishiv <hegart....@gmail.com> 
>>>> wrote:
>>>>
>>>>> Hi Matthew,
>>>>>
>>>>> I think TobiBeer's *make[ ]* filter plugin 
>>>>> <https://tobibeer.github.io/tw5-plugins/#make> might be what you're 
>>>>> looking for.
>>>>>
>>>>> Hegart.
>>>>>
>>>>>
>>>>>
>>>>> On Tuesday, 19 April 2016 20:09:34 UTC+12, Matthew Petty wrote:
>>>>>>
>>>>>> I've been looking at tobibeer's setvars plugin, to see if that would 
>>>>>> work, but I can't figure it out.
>>>>>>
>>>>>> Here's some pseudocode for what I want to do.
>>>>>>
>>>>>> set index to initial value
>>>>>> set increment amount
>>>>>> set required filter and sort
>>>>>>
>>>>>> select list of tiddlers by the filter
>>>>>> for each tiddler
>>>>>>     set field to index value
>>>>>>     increment index by increment amount
>>>>>> next tiddler
>>>>>>
>>>>>> Any help gratefully received
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Monday, 18 April 2016 23:30:49 UTC+4, Matthew Petty wrote:
>>>>>>>
>>>>>>> I have a set of tiddlers, and I want to set a field for each one, 
>>>>>>> incrementing the value each time.
>>>>>>>
>>>>>>> So for example, I have tiddlers A B C D, and after running this 
>>>>>>> macro or whatever, they would have the following fields:
>>>>>>> A would have 1
>>>>>>> B would have 2
>>>>>>> C would have 3
>>>>>>> D would have 4
>>>>>>>
>>>>>>> What would be the easiest way to do that?
>>>>>>>
>>>>>> -- 
>>>>> You received this message because you are subscribed to a topic in the 
>>>>> Google Groups "TiddlyWiki" group.
>>>>> To unsubscribe from this topic, visit 
>>>>> https://groups.google.com/d/topic/tiddlywiki/S0CYsynRi7E/unsubscribe.
>>>>> To unsubscribe from this group and all its topics, send an email to 
>>>>> tiddlywiki+...@googlegroups.com.
>>>>> To post to this group, send email to tiddl...@googlegroups.com.
>>>>> 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/8caaedbc-ba59-4c92-aa24-2b345048da1b%40googlegroups.com
>>>>>  
>>>>> <https://groups.google.com/d/msgid/tiddlywiki/8caaedbc-ba59-4c92-aa24-2b345048da1b%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
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/ddf9004b-6bd6-4e82-93fa-de03f5d7b293%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to