[tw5] Hide tiddlers from public view

325 views
Skip to first unread message

Mat

unread,
May 20, 2015, 11:10:06 AM5/20/15
to tiddl...@googlegroups.com
I'm working on a tiddlyspot TW for the community but while some is ready for presentation, it also has loads of unfinished stuff (that's just how I function). 

These are tagged with Unfinished, and I use "!tag[Unfinished]" to hide them in my own lists, but how to hide them more generally?

I hope to avoid using prefix $:/ for a few reasons and that a tag should be enough to toggle hiding. Particularly, I don't want the titles to show in the tagpill dropdowns or in sidebar tab Recent. (Encrypting them, at least using Danielos plugin does not prevent this.) 

They're not super secret but they're just not intended to be seen yet.

The absolute ideal would be two page views depending on username (my username vs not my username).

Thank you!

<:-)

Jeremy Ruston

unread,
May 20, 2015, 12:14:01 PM5/20/15
to TiddlyWiki
Hi Mat

One approach would be to invert the requirement: create a button that saves the current wiki but excludes all tiddlers tagged "Unfinished".

Best wishes

Jeremy.


On Wed, May 20, 2015 at 4:10 PM, Mat <matia...@gmail.com> wrote:
I'm working on a tiddlyspot TW for the community but the finished stuff it also has loads of unfinished stuff (that's just how I function). 

These are tagged with Unfinished, and I use "!tag[Unfinished]" to hide them in my own lists, but how to hide them more generally?

I hope to avoid using prefix $:/ for a few reasons and that a tag should be enough to toggle hiding. Particularly, I don't want the titles to show in the tagpill dropdowns or in sidebar tab Recent. (Encrypting them, at least using Danielos plugin does not prevent this.) 

They're not super secret but they're just not intended to be seen yet.

The absolute ideal would be two page views depending on username (my username vs not my username).

Thank you!

<:-)

--
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+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/e94bcb1c-9583-4c64-9a49-d38818d06ce3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Jeremy Ruston
mailto:jeremy...@gmail.com

Mat

unread,
May 20, 2015, 2:12:49 PM5/20/15
to tiddl...@googlegroups.com, jeremy...@gmail.com
One approach would be to invert the requirement: create a button that saves the current wiki but excludes all tiddlers tagged "Unfinished".

Brilliant! This will make so many things easier for me!!!!

Could anyone please tell if the following procedure is correct to create this new filtered saving button:

I identify the following as relevant for this:
So, I'm guessing I should 

1) Copy the save-wiki button but replace the message "tm-save-wiki" with a new message.
2) copy saver-handler.js and replace the listening for "tm-save-wiki" with my new message
3) copy the SaveFilter and in my copy change it to filter out Unfinished tiddlers
4) in saver-handler.js replace the line: SaverHandler.prototype.titleSyncFilter = "$:/config/SaverFilter"; to call my new filter.


In the save-wiki button broadcasting, there is also a "param={{$:/config/SaveWikiButton/Template}} " (which contains "$:/core/save/all") and the word "param" appears also in saver-handler.js... but I'm unsure of how/for what it is used there. Anything I should care about?

Ok, would appreciate any guidance from anyone.

Thank you!

<:-)





Mat

unread,
May 21, 2015, 8:31:41 AM5/21/15
to tiddl...@googlegroups.com, jeremy...@gmail.com
Yes, I can of course "just try it" - but because of the complexity of it I know I can easily get lost and spend hours on it, so I'd really appreciate just a single "the strategy looks ok" from anyone who knows. 

Thank you!

<:-)

Jeremy Ruston

unread,
May 21, 2015, 10:35:28 AM5/21/15
to Mat, TiddlyWiki
Hi Mat,

You can do this without any JS hacking. Clone this template and adjust the filter to exclude your unfinished tiddlers:


Then use that template as follows:

<$action-sendmessage $message="tm-download-file" $param="<title-of-your-template>" filename="index.html"/>
Publish
</$button>

Best wishes

Jeremy




Mat

unread,
May 21, 2015, 2:20:48 PM5/21/15
to tiddl...@googlegroups.com, jeremy...@gmail.com
Thank you so much Jeremy! That works great!!! 


Minor detail, in Jeremys message there was a missing initial button command, i.e the last part should read:

<$button> 
<$action-sendmessage $message="tm-download-file" $param="<title-of-your-template>" filename="index.html"/>
Publish
</$button>

<:-) 

Mat

unread,
May 22, 2015, 1:24:05 PM5/22/15
to tiddl...@googlegroups.com, jeremy...@gmail.com
@Jeremy - you're probably the only one who can answer this anyway so I'm continuing in this thread:

I just posted One TW to Rule Them All where I describe an idea to use one central TW as a publishing central to other TWs. While that is a wish, I just want to mention that the basic question there is relevant also for the simpler use case in this thread. Your brilliant solution provided above, has the drawback for a tiddlyspot hosted TW in that it downloads the tiddlyspot TW to the local computer instead of uploading to a parallel tiddlyspot. I've found this adds several extra workflow steps and requires a place to store the local TW.

With your recent encouragement to let people come with issues and suggestions via tiddlyspot (as an alternative to github) it is very useful to be able to set up two tiddlyspots; one for messing around with and the other to which you export a filtered and cleaned up result with the final proposal. For very simple "single tiddler" issues this is overkill but when it gets just a bit more complex I've found it useful.

(Hm, maybe it would even work as a way to delete a filtered set of tiddlers... uploading the filtered current TW to it's own tiddlyspot.)

If you have a chance to take a look at the issue, i.e a Publish button to upload the filtered tw directly to tiddlyspot, then it would be great!

Thank you!!!


<:-)

Jeremy Ruston

unread,
May 23, 2015, 3:46:13 AM5/23/15
to Mat, TiddlyWiki
Hi Mat

The problem here is that there is no way to stipulate which saver should be used for the download; TiddlyWiki always chooses the highest priority saver that has the prerequisites to run.

So, one ought to be able to do something like this:

<button> 
<$action-sendmessage $message="tm-download-file" $param="<title-of-your-template>" filename="index.html" saver="upload"/>
Publish
</$button>

The ticket for this should be something like "Allow saver to be specified for download".

Best wishes

Jeremy.


Danielo Rodríguez

unread,
May 23, 2015, 1:31:33 PM5/23/15
to tiddl...@googlegroups.com
Something similar could be done to switch sync modules

Mat

unread,
May 23, 2015, 7:28:36 PM5/23/15
to tiddl...@googlegroups.com, matia...@gmail.com, jeremy...@gmail.com
@Jeremy
 
The ticket for this should be something like "Allow saver to be specified for download".

Thank you. Created #1755

<:-)
Reply all
Reply to author
Forward
0 new messages