Thanks.that works well...and leads to more questions...
The code assumes there will be only one tag, with a value such as
filename.htmlthat is possible, but I use tags for other
information as well...obviously picking out the tag with the .html
extension is not going to be that easy. SOcan that code be changed
so that the filename.html information is held in a custon field
instead.so the tiddlers have a customfield called, say filename
which has the appropriate .html name ...so the code needs to read
fieldname:filename and not tags..
And...the SaveAs plugin then asks to confirm the file nameasks to
confirm when the file exists and then asks to select to add the new
tiddler contents into the exisitng arquiveObviously good
precautions...but having to respond so many times is a bit of a
chore.as many entries will be fairly repetitive.
Is it possible to have the SaveAs plugin work more like
UploadTiddlers...in that it uses the calculated information and then
just saves the dataadding new data into an existing file where
appropriate and without checking each time.
And even more useful to merather than having to click the
saveAs botton in the toolbarcould the SaveAS plugin be activated
with done editing.again like UploadTidddlerMacro..in which
case we would need to have this automatic action turned on and
off...via a config.options.chkSaveTiddlerLocally type of
parameter..
Er...thanks in advance
Skye
On 13 Out, 18:22, Eric Shulman elsdes...@gmail.com wrote:
Is it possible for SaveAs plugin to save only the current tiddler (via
SaveAs button in the viewtemplate toolbar).accumulatively adding
to an existing file (most likely in PureStore format).in effect it
becomes an online version of UploadTiddlerMacro...
I just added a new option to SaveAsPlugin (v2.7.0)
http://www.TiddlyTools.com/#SaveAsPlugin
You can now use the keyword here in place of the 'filter' param to
automatically save the current tiddler. If the command is not
embedded in a tiddler (or tiddler toolbar), then you will be prompted
to enter a tiddler title. Use the 'quiet' keyword to prevent the
filter handling from reporting that '1 matching tiddler found'
You can use the filename:... parameter with an 'eval param' to set
the tiddler's title as the default filename that is offered when the
standard 'save file' dialog appears.
Place the following macro into a tiddler (e.g.,
[[SaveCurrentTiddler]])
--
saveAs label:file {{filename:+tiddler.title}} quiet here
--
Then, install TiddlyTools' CoreTweaks #608/609/610 (toolbar syntax
enhancements:
http://www.TiddlyTools.com/#CoreTweaks.
Tweak #610 allows you to use a tiddler title as a toolbar command.
When processed, the content of the tiddler (i.e., the file command
link created by the macro) is automatically rendered into the toolbar.
If possible the SaveAs macro would also select which file to save to
according to the tags present in the tiddler in question.
This could be done by specifying the filename:... param using the
'eval param' syntax, as demonstrated above. The param could construct
the desired filename by examining the tags. For example, suppose that
we were to store the desired filename as a tag ending with .html,
and that only one such tag would be on any given tiddler.
Then, we could find and use that tag value as the filename param, like
this:
saveAs label:file {{
var fn='archive.html';
for (var i=0;itiddler.tags.length;i++)
if (tiddler.tags[i].indexOf('.html')!=-1)
{ fn=tiddler.tags[i]; break; }
'filename:'+fn;
}} quiet here
if a tag with .html is not found, it defaults to 'archive.html'
enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
TiddlyWiki group.
To post to this group, send email to tiddlywiki@googlegroups.com
To unsubscribe from this group, send email to
tiddlywiki+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/tiddlywiki?hl=en
-~--~~~~--~~--~--~---