Save/download so file gets named as SiteTitle (not tiddlywiki.html)

127 views
Skip to first unread message

Mat

unread,
Mar 30, 2016, 5:15:28 PM3/30/16
to TiddlyWiki
Occasionally I download some of my tiddlyspot-hosted TW's but would like the saved files to be titled with my SiteTitle name, not "tiddlywiki.html". For one thing, the "tiddlywiki.html" files might not even be/ the same original TWs.

I want file naming to function for the standard saving, i.e via the circled tick in the sidebar. As you probably know, downloading from your tiddlyspot is most easily done by simply omitting the password (under Ctrlpanel > Saving > password ) and then clicking that circled tick button.

Now, fellow Drakor gives a surprisingly simple method to customize the filename - but this is when downloading an empty file, via the big green download button (using $action-sendmessage $message="tm-download-file"). The circled tick button is more complex though (using message="tm-save-wiki" ) so I'm hoping for some help.

Thus, the idea is that IF there is no password, then the download is triggered, deally so a TW with $:/SiteTitle set to FooBar makes the filename FooBar_5.1.11.html or perhaps foobar_5.1.11.html

Ideas?

<:-)

Jeremy Ruston

unread,
Mar 30, 2016, 5:49:15 PM3/30/16
to tiddl...@googlegroups.com
Hi Mat

Now, fellow Drakor gives a surprisingly simple method to customize the filename - but this is when downloading an empty file, via the big green download button (using $action-sendmessage $message="tm-download-file"). The circled tick button is more complex though (using message="tm-save-wiki" ) so I'm hoping for some help.

The difference between the two is that "tm-save-wiki" performs all the logic around "dirty checking"; keeping track of when the wiki has been successfully saved, so that we can give a warning on close if it hasn't been saved. "tm-download-wiki" just downloads the indicated file, without any of that logic.

So, I'd suggest adding a new "save local" page toolbar button that uses the download method to save the file locally.

Best wishes

Jeremy


Thus, the idea is that IF there is no password, then the download is triggered, deally so a TW with $:/SiteTitle set to FooBar makes the filename FooBar_5.1.11.html or perhaps foobar_5.1.11.html

Ideas?

<:-)

--
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 https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/2f86b1f0-045b-40f6-b186-8535a37d7ef7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mat

unread,
Apr 1, 2016, 5:30:29 AM4/1/16
to TiddlyWiki
Jeremy Ruston wrote:
So, I'd suggest adding a new "save local" page toolbar button that uses the download method to save the file locally.

Hm, a conditional "wrapper" consisting of a simple list filter could display the circled tick if tere is a password and a download if there isn't. But this needs to test if a password field is set or not - is there any method for this? I understand password is not a regular field but call to the PasswodWidget but maybe there's some "call" to test this anyway?

Using separate buttons for save vs download is not good becaues it would either take up sidebar real estate or have to be located every time.  Also, because of my extensive experimenting on tiddlyspot, I often click save only to note it is downloading because I missed filling in the password. This creates a lot of tiddlywiki.html files in the download folder and it would just be better if I at least knew which original TW it came from.

Ideas anyone?

<:-)

Jeremy Ruston

unread,
Apr 1, 2016, 6:54:42 AM4/1/16
to tiddl...@googlegroups.com
Hi Mat

Hm, a conditional "wrapper" consisting of a simple list filter could display the circled tick if tere is a password and a download if there isn't. But this needs to test if a password field is set or not - is there any method for this? I understand password is not a regular field but call to the PasswodWidget but maybe there's some "call" to test this anyway?

The password you are referring to here is the password used by the TiddlySpot saver, and you are correct that it is not directly accessible to wikitext.

But why are you so fixed on the idea of clearing the password field as the way of indicating which type of save you want to perform? It seems a clumsy user interface.

Using separate buttons for save vs download is not good becaues it would either take up sidebar real estate or have to be located every time. 

But there’s horrendous logical problems with trying to use the same button for two different functions which can both be simultaneously valid.

Also, because of my extensive experimenting on tiddlyspot, I often click save only to note it is downloading because I missed filling in the password. This creates a lot of tiddlywiki.html files in the download folder and it would just be better if I at least knew which original TW it came from.

It sounds like clearing the password field might be adding to the confusion.

Anyhow, it remains trivial for you to create a separate toolbar button that saves locally with the filename that you want (for browsers that support it). If real estate is really enough of a driver to explore the complexity above, why not just put the buttons in a dropdown?

Best wishes

Jeremy.


Ideas anyone?

<:-)

--
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 https://groups.google.com/group/tiddlywiki.

Mat

unread,
Apr 1, 2016, 10:40:38 AM4/1/16
to TiddlyWiki
Hi again Jeremy.

 
But why are you so fixed on the idea of clearing the password field as the way of indicating which type of save you want to perform?

Hm, not quite like that: In 95% of the cases I want to upload to tiddlyspot rather than download. The only practical way I know to download is to empty the tiddlyspot password field (surely discovered once upon a time by forgetting to set it). There is also the green download button but - come to think of it now - I have no idea where it is located in any other context than in the very system tiddler for it (!!!) On tiddlywiki.com it shows in one of the default tids so there it is obvious, but for TWs in use... ? There are also times I want to save a tiddlyspot to another tiddlyspot - which is also done under the Savings tab... so the result is that the savings tab and the circled tick are my go to places for anything "save". You seem to indicate other options...?

Using separate buttons for save vs download is not good becaues it would either take up sidebar real estate or have to be located every time. 

But there’s horrendous logical problems with trying to use the same button for two different functions which can both be simultaneously valid.

No... how could they be simultaneously valid; either there's a password or there isn't. Or do I misunderstand you?

Also, because of my extensive experimenting on tiddlyspot, I often click save only to note it is downloading because I missed filling in the password. This creates a lot of tiddlywiki.html files in the download folder and it would just be better if I at least knew which original TW it came from.

It sounds like clearing the password field might be adding to the confusion.

As noted, I don't know how else to go about it.


Anyhow, it remains trivial for you to create a separate toolbar button that saves locally with the filename that you want (for browsers that support it). If real estate is really enough of a driver to explore the complexity above, why not just put the buttons in a dropdown?

It's just that I save a lot so immediate access is important but downloading is very rare... I'd guess this is the case for most tiddlyspot users.

But yeah, I guess I'll see if I can come up with something...

Thanks again!

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