Easy way to save ReadOnly TW

427 views
Skip to first unread message

Alex Hough

unread,
Jan 13, 2017, 10:12:53 AM1/13/17
to TiddlyWiki
Hello All,

Is there an easy way to save a read only version of a TW

Ton has a solution here -- http://tw5readonly.tiddlyspot.com/ -- but i wondered if anyone had addressed the issue more recently


best wishes


Alex
Message has been deleted
Message has been deleted

Tobias Beer

unread,
Jan 13, 2017, 12:26:40 PM1/13/17
to tiddl...@googlegroups.com, Tiddl...@googlegroups.com
Hi Alex,

Since a published standalone TiddlyWiki, by default, is read-only,
I imagine you mean a viewing mode that does not present any editing capabilities to the user.

Atm, the core templates do not provide any kind of switch for that.

In fact, I'd rather imagine it the other way around:

The default is: "Author Mode", so you have editors, etc...
and once you disable that, all the editing UI is gone.

Actually, I think I'd even want to be able to specifically declare,
which individual foo-template components
are not to be rendered when not in "Author Mode",
not just what one might think of as "editing",
but also everything configuration, etc....

Best wishes,

Tobias.

Alex Hough

unread,
Jan 14, 2017, 4:09:07 AM1/14/17
to TiddlyWiki
Thanks Tobias and Mat,

The question has arisen in a Facebook conversation in a group Dmitry and I happen to belong to. The group is a "systems thinking" group, I have been playing with TW and systems (whatever they may be) in partnership. TW can be seen as is a system, a technological system and a social one. TW is my muse!  

The question about saving a read only version is one which has occupied my mind before.

When I (with huge amounts of help from Tobias and Eric) produced OMM:Director[2] on TiddlyWiki Classic, I ended up creating a read only site by using jQuery in Firefox's developer tools to show the editing controls. And of course I can't remember how to do that now. It was a wearying thing at the time (TiddlyFans will remember with fondness Jeremy's "Jake Weary" quip) but wrestling with the problem over a long period of time has left its mark. Ah-Ah! Learning!

Its a "personal learning story" I suppose, and as such it may or may not be "true". But the output is an idea: to change a system you can't use that system, there has to be something -- a method, a way of doing things -- outside that system. 

(In my mind there is a link here to Godel, and GEB, Hofstader and the quine, indirect self reference and all that: Like I say, the learning story, and learning narratives in general, come with the risk of error, especially when there are leaps of faith, over grounds where the detail is way beyond my theoretical understanding.)

With TW5, there are "outside the system" options. Node.js for starters. I thought that there could be a command line option to create a read only TW from a collection of tiddlers.

The standard TW file itself does have ways of exporting content without editing features. 
Individual tiddlers can be downloaded or "exported"



Screenshot showing export options


Another option is through advanced search and filters



​​
Sreeenshot showing export via filter


Towards possible solutions

Similar to export Static HTML, a TiddlyWiki file is exported

Node.js, something like this

tiddlywiki mynewwiki --ReadOnly

A read only version of a HTML file would be created on your local hard-drive, could could then share it as you wish (host on GitHub, send by email etc.)

Hacky way, adapt existing

I looked at the ReadOnlyTheme


​Screenshot: inside ReadOnly Theme tiddler

The tiddler has a rule pragma. Its JSON, there is a list of buttons to hide. Removing the save button from the list and saving as a new theme creates a read only with save button theme.

I switched themes downloaded the TW (changed the name of the file to ReadOnlyWithSave.html)  to my desktop, then uploaded to my GitHub pages [3]

This "hacky way" removes the editing features from the TW but does not remove the possibility of editing. 

Future hacky ways?

Various ways of hiding the save button could be explored. creating a save button in a hidden-from-menus tiddler, then hiding the save button from the sidebar would be one option 



best wishes

Alex



On 13 January 2017 at 17:26, Tobias Beer <beert...@gmail.com> wrote:
Hi Alex,

Since a published standalone TiddlyWiki, by default is read-only,

I imagine you mean a viewing mode that does not present any editing capabilities to the user.

Atm, the core template do not provide any kind of switch for that.

In fact, I'd rather imagine it the other way around:

The default is: "Author Mode", so you have editors, etc...
and once you disable that, all the editing UI is gone.

Actually, I think I'd even want to be able to specifically declare,
which individual foo-template components
are not to be rendered when not in "Author Mode",
not just what one might think of as "editing",
but also everything configuration, etc....

Best wishes,

Tobias.

--
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+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/5f25926c-1e60-4328-8ea4-a207e98e62b8%40googlegroups.com.

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

Mat

unread,
Jan 14, 2017, 8:38:41 PM1/14/17
to TiddlyWiki, Tiddl...@googlegroups.com
On Friday, January 13, 2017 at 4:12:53 PM UTC+1, AlexHough wrote:
Hello All,

Is there an easy way to save a read only version of a TW
 

There (ref. my deleted messages above) - this should now enable also the SaveButton to be hidden from visitors.

#tw-admin - a hidden entry point for admin

Note: the whole concept is still a bit rough so this is not an official release, just showing it because you asked for it. (Anyone who has improvements is of course welcome to improve it  though.)

You will have to decide what else your visitors should not see. One idea is to hide the whole sidebar and instead introduce a LeftBar for the public. I hope to make this combo into a theme some time ..."soon". (Anyone holding their breath will die, for sure.)


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