I had read this article today and will thank you very much. It work very fine.
I have do something similare to this, but in a more complicated maner. With xml files and javascript function. Thank you very much. I'm looking to a maner to modify these external txt files directly with TW. Can you help me? El sábado, 24 de noviembre de 2007 07:19:08 UTC+1, Eric Shulman escribió: > > > I'm starting to use the ability to view txt files in an iframe a lot > > lately, and it just occurred to me that it would be nice to wikify > > that text > ... > > "viewing only" thing > > hmmm... can we get a wikified view of externally-stored content that > displays the current contents of a file without using an iframe or > creating "temporary tiddlers" in the document? Well... I'm pleased to > report that after a bit more thinking, I've come up with an answer of > YES!... we CAN... and here's how: > > Normally, the syntax for <<tiddler>> is: > <<tiddler TiddlerName with: param param param ...>> > where the "with: param..." part is optional, and is used in > combination with "substitution markers" ($1 to $9) embedded in the > referenced tiddler: when the <<tiddler>> macro is processed, the > source content from TiddlerName is retrieved, and any markers in that > source are automatically replaced with the values from the > corresponding macro params before being wikified. > > However, it is very important to note that when the TiddlerName > specified in the macro did NOT exist, the <<tiddler>> macro produced > no output... until now :-) > > I've just created a new core tweak that extends the syntax for the > <<tiddler>> macro, so that if the given TiddlerName does not exist in > your document but DOES fit the format for an "external link" (as > determined by the core's isExternalLink() test function), then the > macro will attempt to retrieve the external source content and render > it into the output, **just as if it had come from another tiddler in > the document**. > > Using this tweak, it becomes *trivial* to view wikified content from > text files: > <<tiddler myfile.txt>> > ... and, if you modify the external source file using a text editor > and then refresh the tiddler display, the macro will re-read the file, > so that the rendered content will stilll reflect the *current* > external file content. Plus, you can even use the "with:" syntax to > insert values into the retrieved content via "$n" substitution marker > processing before passing it to wikify for rendering! > > ... and, here's a really powerful extra feature... > > This tweak also works with URLs by using asynchronous XMLHttpRequest() > to fetch external content directly from a remote web server! This > allows for some truly interesting possibilities. For example, you > could write something like: > <<tiddler http://www.mysystem.com/path/to/error.log>> > so that whenever the macro is rendered, you are automatically viewing > the remote server's error log file contents. Add a little timer > scripting to trigger a tiddler refresh (say, once a minute), and > you've got an instant real-time server monitor! > > Note: While I've tested this tweak fairly well, it is still a bit of > an experiment... I don't think it will cause any problems, but use it > with caution until you are confident it does not exhibit any > unexpected side effects... > > You can get the latest TiddlyTools core tweaks here: > http://www.TiddlyTools.com/#CoreTweaks > > enjoy, > -e > Eric Shulman > TiddlyTools / ELS Design Studios -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/tiddlywiki. For more options, visit https://groups.google.com/groups/opt_out.

