[tw] Re: TW5 new plugin Preview Search
Very nice work, Danielo! At first it wouldn't work for me, but then I realized I was only typing in three letters into the search area, and the context viewing part apparently kicks in on the fourth letter. Blessings! On Friday, May 30, 2014 8:41:17 PM UTC-4, Danielo Rodríguez wrote: I'm glad to present a new plugin. It is in beta stage yet, so if you want to propose something it's possible. If you just want to jump to the plugin you can find it at : http://braintest.tiddlyspot.com/ and search for context plugin This widget looks for a word inside a tiddler and shows the result with the searched word highlighted with some of its context. Installation The easiest way is to just grab the plugin. It contents the basic tiddlers needed. Just drag and drop the following link into your own wiki: $:/plugins/danielo/context http://braintest.tiddlyspot.com/#%24%3A%2Fplugins%2Fdanielo%2Fcontext Usage After installing the plugin you will have a new tab in $:/AdvancedSearch http://braintest.tiddlyspot.com/#%24%3A%2FAdvancedSearch called Context Search http://braintest.tiddlyspot.com/#%24%3A%2Fplugins%2Fdanielo%2Fcontext%2FContext%20Search. If you want this functionality in other places you will have to edit the desired tiddler yourself adding the *context widget*. For more details about using the widget see the section below. Using the widget The very basic usage of the widget is the following: $context term=lorem/ Which will render as: ... the widget is the following: ``` $context term=lorem/ ``` Which will render as: $context term=lorem... The widgets will search inside the current tiddler by default. Because that you see the same content twice here. This example is not very useful. Other more meaningful would be: $list filter=[search{$:/temp/advancedsearch}sort[title]limit[250]] {{!!title||$:/core/ui/ListItemTemplate}} $context term={{$:/temp/advancedsearch}}/ /$list That will search for tiddlers containing the text specified in $:/temp/advancedsearch http://braintest.tiddlyspot.com/#%24%3A%2Ftemp%2Fadvancedsearch and will display a link to the matching tiddlers plus a preview of the matching content. Something very similar is used in Context Search http://braintest.tiddlyspot.com/#Context%20Search. Below you can find a complete list of parameters and their default values. parameterdescriptiondefaulttermThe term you want to searchsearchTermAn alias for the previous onetiddlerThe tiddler's name to look intocurrent tiddlerlengthNumber of context characters to show50beforeNumber of characters before the matched term to showthe value of the length parameterafterNumber of characters after the matched term to showthe value of the length parametermaxMatchesmaximun number of matched elements to show. Incrementing this can cause several performance issues10elementNode element to create. This element will contain the results of the search. If you want to style it its class is tw-contextprematchClassThe css class to assign to the matched terms in the results. This is used to highlight the resultsmatchedCustomizing the output There are not many ways to customize the output of this widget. You can specify *what type of node you want to create* to wrap the results (div,span...). The default is pre. This container is created with the class tw-context so you can easily apply styles to it. Something similar happens to the *highlighted* words. You can specify the name of the class to assign to it and also you can apply styles to that class. A very basic example of customization could be: 1. Create a tiddler, for example $:/plugins/danielo/context/css http://braintest.tiddlyspot.com/#%24%3A%2Fplugins%2Fdanielo%2Fcontext%2Fcss 2. Paste the following text or any css rule you want: .matched{background-color:yellow} .tw-context { border:1px solid blue; word-break: break-all; word-wrap: break-word;} 3. Tag it with $:/tags/stylesheet 4. Save the tiddler Live example You can find a live example at http://braintest.tiddlyspot.com/ -- 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 http://groups.google.com/group/tiddlywiki. For more options, visit https://groups.google.com/d/optout.
[tw] Re: TW5 new plugin Preview Search
Hi Danielo, On Monday, June 2, 2014 11:07:43 PM UTC+2, Danielo Rodríguez wrote: Hi Ton, Thank you very much. But you were able to search your stuff. The difference is that now you can do it in a different way. Yes I could search (and get a list of tiddlers) but with help of the preview you can *find* things easily ;-) Glad you liked it. Your guides helped me a lot when I started with TW5 Nice to hear. Don't forget this is a live development. If you miss something or you have suggestions just let me know. I noticed that tags are found as well (but not fields). Found tags result in a tiddler without preview. Since tiddlers tagged with a certain tag can be found elsewhere (Sidebar, tab Tags), may be wise to skip the tag results. What do you think? Cheers, Ton regards El lunes, 2 de junio de 2014 21:21:02 UTC+2, Ton Gerner escribió: Hi Danielo, Very, very nice plugin. At last it is possible to find the stuff I entered in my TW5s! ;-) Thanks a lot. Cheers, Ton On Saturday, May 31, 2014 2:41:17 AM UTC+2, Danielo Rodríguez wrote: I'm glad to present a new plugin. It is in beta stage yet, so if you want to propose something it's possible. If you just want to jump to the plugin you can find it at : http://braintest.tiddlyspot.com/ and search for context plugin This widget looks for a word inside a tiddler and shows the result with the searched word highlighted with some of its context. Installation The easiest way is to just grab the plugin. It contents the basic tiddlers needed. Just drag and drop the following link into your own wiki: $:/plugins/danielo/context http://braintest.tiddlyspot.com/#%24%3A%2Fplugins%2Fdanielo%2Fcontext Usage After installing the plugin you will have a new tab in $:/AdvancedSearch http://braintest.tiddlyspot.com/#%24%3A%2FAdvancedSearch called Context Search http://braintest.tiddlyspot.com/#%24%3A%2Fplugins%2Fdanielo%2Fcontext%2FContext%20Search. If you want this functionality in other places you will have to edit the desired tiddler yourself adding the *context widget*. For more details about using the widget see the section below. Using the widget The very basic usage of the widget is the following: $context term=lorem/ Which will render as: ... the widget is the following: ``` $context term=lorem/ ``` Which will render as: $context term=lorem... The widgets will search inside the current tiddler by default. Because that you see the same content twice here. This example is not very useful. Other more meaningful would be: $list filter=[search{$:/temp/advancedsearch}sort[title]limit[250]] {{!!title||$:/core/ui/ListItemTemplate}} $context term={{$:/temp/advancedsearch}}/ /$list That will search for tiddlers containing the text specified in $:/temp/advancedsearch http://braintest.tiddlyspot.com/#%24%3A%2Ftemp%2Fadvancedsearch and will display a link to the matching tiddlers plus a preview of the matching content. Something very similar is used in Context Search http://braintest.tiddlyspot.com/#Context%20Search. Below you can find a complete list of parameters and their default values. parameterdescriptiondefaulttermThe term you want to searchsearchTermAn alias for the previous onetiddlerThe tiddler's name to look intocurrent tiddlerlengthNumber of context characters to show50beforeNumber of characters before the matched term to showthe value of the length parameterafterNumber of characters after the matched term to showthe value of the length parametermaxMatchesmaximun number of matched elements to show. Incrementing this can cause several performance issues 10elementNode element to create. This element will contain the results of the search. If you want to style it its class is tw-contextpre matchClassThe css class to assign to the matched terms in the results. This is used to highlight the resultsmatchedCustomizing the output There are not many ways to customize the output of this widget. You can specify *what type of node you want to create* to wrap the results (div,span...). The default is pre. This container is created with the class tw-context so you can easily apply styles to it. Something similar happens to the *highlighted* words. You can specify the name of the class to assign to it and also you can apply styles to that class. A very basic example of customization could be: 1. Create a tiddler, for example $:/plugins/danielo/context/css http://braintest.tiddlyspot.com/#%24%3A%2Fplugins%2Fdanielo%2Fcontext%2Fcss 2. Paste the following text or any css rule you want: .matched{background-color:yellow} .tw-context { border:1px solid blue; word-break: break-all; word-wrap: break-word;} 3. Tag it with $:/tags/stylesheet 4. Save the tiddler Live example You can find a live example at http://braintest.tiddlyspot.com/ -- You received this message because you are
[tw] Re: TW5 new plugin Preview Search
Hi Ton I noticed that tags are found as well (but not fields). Found tags result in a tiddler without preview. Since tiddlers tagged with a certain tag can be found elsewhere (Sidebar, tab Tags), may be wise to skip the tag results. What do you think?is There are several reasons you can get a result without preview. First let me explain how the widget works. It just searches in a specific tiddler text fields and returns what it finds. If it does find nothing it does not even render the container. I did it that way to maintain it simple and small. The plugin wraps this widget into a search (list widget) , so what you see is the result of both widgets working together. The search operator looks into the text and tags fields while my widget only does it in the first one. That can produce mismatch results. It does not mean any error, it just means that nothing matches the search term in the text field. Other possible cause is that the context widget takes only one search term. It does not split by space like the regular search does. The search term is taken as a whole. This is an intended behavior to maintain a good performance. Anyway there is nothing that stops us to support other scenarios. Other thing that would be easy to implement and maybe can be what average user expects is to show a preview when nothing matches. Maybe the 50 first characters or whatever is specified in the length parameter. Let me know your thoughts -- 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 http://groups.google.com/group/tiddlywiki. For more options, visit https://groups.google.com/d/optout.
Re: [tw] Re: TW5 new plugin Preview Search
Hi Ton I noticed that tags are found as well (but not fields). Found tags result in a tiddler without preview. Since tiddlers tagged with a certain tag can be found elsewhere (Sidebar, tab Tags), may be wise to skip the tag results. What do you think?is There are several reasons you can get a result without preview. First let me explain how the widget works. It just searches in a specific tiddler text fields and returns what it finds. If it does find nothing it does not even render the container. I did it that way to maintain it simple and small. The plugin wraps this widget into a search (list widget) , so what you see is the result of both widgets working together. The search operator looks into the text and tags fields while my widget only does it in the first one. That can produce mismatch results. It does not mean any error, it just means that nothing matches the search term in the text field. Other possible cause is that the context widget takes only one search term. It does not split by space like the regular search does. The search term is taken as a whole. This is an intended behavior to maintain a good performance. Anyway there is nothing that stops us to support other scenarios. Other thing that would be easy to implement and maybe can be what average user expects is to show a preview when nothing matches. Maybe the 50 first characters or whatever is specified in the length parameter. Let me know your thoughts -- 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 http://groups.google.com/group/tiddlywiki. For more options, visit https://groups.google.com/d/optout.
[tw] Re: TW5 new plugin Preview Search
Hi Ton, Thank you very much. But you were able to search your stuff. The difference is that now you can do it in a different way. Glad you liked it. Your guides helped me a lot when I started with TW5 Don't forget this is a live development. If you miss something or you have suggestions just let me know. regards El lunes, 2 de junio de 2014 21:21:02 UTC+2, Ton Gerner escribió: Hi Danielo, Very, very nice plugin. At last it is possible to find the stuff I entered in my TW5s! ;-) Thanks a lot. Cheers, Ton On Saturday, May 31, 2014 2:41:17 AM UTC+2, Danielo Rodríguez wrote: I'm glad to present a new plugin. It is in beta stage yet, so if you want to propose something it's possible. If you just want to jump to the plugin you can find it at : http://braintest.tiddlyspot.com/ and search for context plugin This widget looks for a word inside a tiddler and shows the result with the searched word highlighted with some of its context. Installation The easiest way is to just grab the plugin. It contents the basic tiddlers needed. Just drag and drop the following link into your own wiki: $:/plugins/danielo/context http://braintest.tiddlyspot.com/#%24%3A%2Fplugins%2Fdanielo%2Fcontext Usage After installing the plugin you will have a new tab in $:/AdvancedSearch http://braintest.tiddlyspot.com/#%24%3A%2FAdvancedSearch called Context Search http://braintest.tiddlyspot.com/#%24%3A%2Fplugins%2Fdanielo%2Fcontext%2FContext%20Search. If you want this functionality in other places you will have to edit the desired tiddler yourself adding the *context widget*. For more details about using the widget see the section below. Using the widget The very basic usage of the widget is the following: $context term=lorem/ Which will render as: ... the widget is the following: ``` $context term=lorem/ ``` Which will render as: $context term=lorem... The widgets will search inside the current tiddler by default. Because that you see the same content twice here. This example is not very useful. Other more meaningful would be: $list filter=[search{$:/temp/advancedsearch}sort[title]limit[250]] {{!!title||$:/core/ui/ListItemTemplate}} $context term={{$:/temp/advancedsearch}}/ /$list That will search for tiddlers containing the text specified in $:/temp/advancedsearch http://braintest.tiddlyspot.com/#%24%3A%2Ftemp%2Fadvancedsearch and will display a link to the matching tiddlers plus a preview of the matching content. Something very similar is used in Context Search http://braintest.tiddlyspot.com/#Context%20Search. Below you can find a complete list of parameters and their default values. parameterdescriptiondefaulttermThe term you want to searchsearchTermAn alias for the previous onetiddlerThe tiddler's name to look intocurrent tiddlerlengthNumber of context characters to show50beforeNumber of characters before the matched term to showthe value of the length parameterafterNumber of characters after the matched term to showthe value of the length parametermaxMatchesmaximun number of matched elements to show. Incrementing this can cause several performance issues 10elementNode element to create. This element will contain the results of the search. If you want to style it its class is tw-contextpre matchClassThe css class to assign to the matched terms in the results. This is used to highlight the resultsmatchedCustomizing the output There are not many ways to customize the output of this widget. You can specify *what type of node you want to create* to wrap the results (div,span...). The default is pre. This container is created with the class tw-context so you can easily apply styles to it. Something similar happens to the *highlighted* words. You can specify the name of the class to assign to it and also you can apply styles to that class. A very basic example of customization could be: 1. Create a tiddler, for example $:/plugins/danielo/context/css http://braintest.tiddlyspot.com/#%24%3A%2Fplugins%2Fdanielo%2Fcontext%2Fcss 2. Paste the following text or any css rule you want: .matched{background-color:yellow} .tw-context { border:1px solid blue; word-break: break-all; word-wrap: break-word;} 3. Tag it with $:/tags/stylesheet 4. Save the tiddler Live example You can find a live example at http://braintest.tiddlyspot.com/ -- 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 http://groups.google.com/group/tiddlywiki. For more options, visit https://groups.google.com/d/optout.
[tw] Re: TW5 new plugin Preview Search
Hi Danielo Just a note to say that the more I use your new plugin, the more I come to like it :-) When I first had a look, I was involved with some development and didn't realise the full impact of the plugin. However, when I installed the plugin into one of my old (and very large) TW's, in which I have been accumulating random notes for several years -- wow! Many thanks for another great plugin. regards On Saturday, May 31, 2014 2:41:17 AM UTC+2, Danielo Rodríguez wrote: I'm glad to present a new plugin. It is in beta stage yet, so if you want to propose something it's possible. If you just want to jump to the plugin you can find it at : http://braintest.tiddlyspot.com/ and search for context plugin This widget looks for a word inside a tiddler and shows the result with the searched word highlighted with some of its context -- 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 http://groups.google.com/group/tiddlywiki. For more options, visit https://groups.google.com/d/optout.