Snippet question

215 views
Skip to first unread message

David Gifford

unread,
Dec 24, 2016, 11:28:56 AM12/24/16
to TiddlyWiki
Hi all

One more question. I would like to create a snippet that stamps the current text of a source tiddler into a second tiddler but where the stamped text in the second tiddler won't change if I later edit the text of the source tiddler.

I tried:

@@.source {{$:/.giffmex/Source/Author}}, //{{$:/.giffmex/Source/Title}}//, @@

but then I realized that if I later change the text in either of those two source tiddlers, the text will also change in the stamps.

Dave

Thomas Elmiger

unread,
Dec 25, 2016, 3:58:48 AM12/25/16
to TiddlyWiki
Hi Dave

I think you would have to clone the source tiddlers and transclude a copy like Author_fixed or Author-2016-12-24 (and never touch these copies again).
As there is no versioning in TW at the moment this seems to be the only feasible way to me.
All the best!
Thomas

Mark S.

unread,
Dec 25, 2016, 10:22:42 AM12/25/16
to TiddlyWiki
I asked for a feature like this here: https://groups.google.com/forum/#!topic/tiddlywiki/-KimJ3WSjfo

I think with the current tech you could have  a snippet with a button next to it. If you push the button, it updates the text. If you don't push the button it stays the same. Hmmm ... maybe the button could have a style attached, so that it's only visible when you want it to be visible. Of course, that still means you will have to drag/drop the snippet and then press the button.

In your particular case, maybe it would be easier to hard code the text snippet with the actual author and title. Obviously you are already going through some process to change the text in the first tiddlers, so it seems like changing the snippet text would not be that much harder.

Mark
(Hey, who left this pile of coal under the tree??)

David Gifford

unread,
Dec 25, 2016, 10:58:44 AM12/25/16
to tiddl...@googlegroups.com
Well, I do have a current system where the author and title appear as text in the edittemplate, wrapped by the formatting, and I copy and paste that when I need it. It is pretty easy. I just thought it would be nice to have it as a stamp to make it even easier. I guess I am just greedy!

--
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/kioHtY9VBFs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+unsubscribe@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/f6e43038-8be0-479c-9cea-9635b3eed60f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
David Gifford
Christian Reformed World Missions, Mexico City

David Gifford

unread,
Dec 25, 2016, 11:07:26 AM12/25/16
to tiddl...@googlegroups.com
I just thought there might be a 'grab text from tiddler and paste it as wikified text' macro I didn't know about.

Josiah

unread,
Dec 25, 2016, 11:58:05 AM12/25/16
to TiddlyWiki
Ciao David

There is screen scraper plugin somewhere that captures the rendered internal HTML of a Tiddler in focus. I think it will only give you HTML. I played with it. I had mixed results, mainly because of formatting issues. I'll see if I can find it.

Best wishes
Josiah


On Sunday, 25 December 2016 17:07:26 UTC+1, David Gifford wrote:
I just thought there might be a 'grab text from tiddler and paste it as wikified text' macro I didn't know about.
On Sun, Dec 25, 2016 at 9:58 AM, David Gifford <dgif...@crcna.org> wrote:
Well, I do have a current system where the author and title appear as text in the edittemplate, wrapped by the formatting, and I copy and paste that when I need it. It is pretty easy. I just thought it would be nice to have it as a stamp to make it even easier. I guess I am just greedy!
On Sun, Dec 25, 2016 at 9:22 AM, 'Mark S.' via TiddlyWiki <tiddl...@googlegroups.com> wrote:
I asked for a feature like this here: https://groups.google.com/forum/#!topic/tiddlywiki/-KimJ3WSjfo

I think with the current tech you could have  a snippet with a button next to it. If you push the button, it updates the text. If you don't push the button it stays the same. Hmmm ... maybe the button could have a style attached, so that it's only visible when you want it to be visible. Of course, that still means you will have to drag/drop the snippet and then press the button.

In your particular case, maybe it would be easier to hard code the text snippet with the actual author and title. Obviously you are already going through some process to change the text in the first tiddlers, so it seems like changing the snippet text would not be that much harder.

Mark
(Hey, who left this pile of coal under the tree??)

On Saturday, December 24, 2016 at 8:28:56 AM UTC-8, David Gifford wrote:
Hi all

One more question. I would like to create a snippet that stamps the current text of a source tiddler into a second tiddler but where the stamped text in the second tiddler won't change if I later edit the text of the source tiddler.

I tried:

@@.source {{$:/.giffmex/Source/Author}}, //{{$:/.giffmex/Source/Title}}//, @@

but then I realized that if I later change the text in either of those two source tiddlers, the text will also change in the stamps.

Dave

--
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/kioHtY9VBFs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
--
David Gifford
Christian Reformed World Missions, Mexico City

Josiah

unread,
Dec 25, 2016, 12:09:39 PM12/25/16
to TiddlyWiki
Ciao David

I was thinking of the Copy Button plugin:

http://copy.tiddlyspot.com/

I have not tested it in the latest version of TW. Its currently in v5.1.11.

Best wishes
Josiah

David Gifford

unread,
Dec 26, 2016, 9:28:03 AM12/26/16
to tiddl...@googlegroups.com
All right I will play around with it when able. (am on vacation)

--
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/kioHtY9VBFs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+unsubscribe@googlegroups.com.

To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.

For more options, visit https://groups.google.com/d/optout.

Josiah

unread,
Dec 26, 2016, 10:03:49 AM12/26/16
to TiddlyWiki
Ciao all

I hope I am understanding this issue correctly. If I am then I have a related issue. TW dynamically creates a lot of its content that is not persistent. In some circumstances this can become a limitation if you either need to edit the generated content or keep a non-dynamic copy. Here is a use case:

1 - I produce newsletters about film every week or so. I use a list to select X Tiddlers for inclusion in that list.

2 - I need to EDIT the RENDERED output Tiddler. I need to add comments and provide an overview for the readers concerning the topic of that particular newsletter.

3 - There is no merit in me specially creating Tiddlers to add comments, or having a comment field to do (2). These additions I make are ONLY for that one newsletter.

4 - At the moment, unless I'm missing something, I'm forced to manually cut and paste the rendered HTML before I can edit it. Its not ideal as the HTML formatting does not always transfer well.
     There is a screen scraper plugin that can help a bit with this. Its useful in that it limits its scrape to the Tiddler in focus, not the whole screen.

5 - The edited "rendered newsletter" Tiddlers I manually create I keep in an archive as self contained guides (non-dynamic) to aspects of cinema so I don't mistakenly destroy them.

Tiddlers that dynamically produce output are great. But sometimes I really need a permanent copy of the rendered version to work on.

For such a use case how difficult would it be to CLONE the RENDERED version of a dynamically generated Tiddler to a new Tiddler? 

And would not a generic "Clone the Rendered Version of this Tiddler" also be a solution to David's issue? Or maybe I'm missing something?

Best wishes
Josiah

David Gifford

unread,
Dec 26, 2016, 11:53:48 AM12/26/16
to tiddl...@googlegroups.com
Cloning the rendered tiddler would not be a solution in my use case, which I didn't describe very well. Here it is:

I am reading a book or ebook. I type the author and title into text-inputs before taking any notes. Then when I take a note I either would stamp (ideally) or copy and paste the book's information after the note, and just add the page #.

Then when I read a different book I enter the new title and author into the text input and take notes for that book in the same way. But without changing the title and author in the notes for the previous book.

Dave

--
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/kioHtY9VBFs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+unsubscribe@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.

For more options, visit https://groups.google.com/d/optout.

PMario

unread,
Dec 26, 2016, 12:20:10 PM12/26/16
to TiddlyWiki
Hi Josiah,

IMO you should have a closer look at the new "stamp" mechanism. http://tiddlywiki.com/#Using%20Stamp

It's all about text snippets.
They can be easily created.

 - Just create a tiddler with the snippet and tag it: $:/tags/TextEditor/Snippet
 - When you edit the tiddler you can easily include it as plain text in the content tiddler.
 - You can define as many snippets as you like

For me there is no reason to create dynamic content,  for a "use once and throw away" text.

eg:
 - If I have 25 possible authors I create a snippet, that contains all of them.
 - When I create the content I paste them in and delete those, that are not needed. ...

Deleting content is much easier and imo faster than writing it.

With this workflow you can have the whole structure of a new newsletter as a snippet and change just the content, that needs to be different.

just some thoughts
-mario




Mark S.

unread,
Dec 26, 2016, 11:16:35 PM12/26/16
to TiddlyWiki
I've figured out a remake of the snippet code that would allow you to create static text versions of the snippet. Unfortunately, it also gets rid of the formatting around the text. So, in real life you might have to insert the text for the formatting, then click in the middle, and insert the snippet for the author/title.

This same modification would let you insert the text of "<<now>>" rather than just the macro.

Let me know if you're interested!
Mark


On Saturday, December 24, 2016 at 8:28:56 AM UTC-8, David Gifford wrote:
Message has been deleted

Tobias Beer

unread,
Dec 27, 2016, 7:21:29 AM12/27/16
to TiddlyWiki
Hi Dmitry,

As there is no versioning in TW at the moment this seems to be the only feasible way to me.
Would you know the plans on develping the versioning and multi-user co-working feature?


May I suggest you try not to overload discussion topics all that much? Dave started a post with a very specific scope and applicability where Thomas saw a link to a lack of versioning. If that sparks a new, more general line of thought for you about some potential, future multi-user Tiddlywiki, which is sure something many users are interested in, please consider opening a new topic nonetheless and reference the other one insofar as both relate. Otherwise topics like this one tend to grow with entirely unrelated content that simply has nothing to do with the OP. Thanks.

Best wishes,

Tobias.

Dmitry Sokolov

unread,
Dec 28, 2016, 3:41:26 AM12/28/16
to TiddlyWiki
Thank you Tobias,
the new post is created, the post above is deleted.
Cheers,
Dmitry
Reply all
Reply to author
Forward
0 new messages