I'm looking for feedback on a proof of concept
enhancement to the ExternalTiddlersPlugin
(ver 2.1 by Eric Shulman).
Note: As a newbie to TiddlyWiki and JavaScript,
I welcome all suggestions and guidance.
Enhancement Objectives:
1) Leverage ExternalTiddlersPlugin, i.e.
"retrieve and wikify content directly
from external files".
2) New: allow the Tiddler name to be
the same as the external file.
3) New: allow the Tiddler tags to be
specified independently for Tiddlers.
Use Case:
I have a directory tree that contains
200+ text files with TiddlyWiki markup.
Link markup is a combination of basic
and pretty, i.e. both [[foo/bar.txt]]
and [[bar topic|foo/bar.txt]].
The tree may also contain source code
for C, Fortran, etc. ... another 200+
files and the project has more to go.
I use the Vim text editor to maximize
my productivity when developing content
for documentation and source code.
A) the "goto filename undercursor" command
allows me to follow links among
the documentation pages and comments
in the source code. Vim can follow
filename links that are naked or that
use markup as needed by TiddlyWiki.
B) Exuberant ctags allows Vim to follow
symbol links to their declaration,
from wherever the name occurs (code,
comments or documentation pages).
C) Vim syntax highlighting can be used
on TiddlyWiki markup within pages
and within source code comments.
D) Vim provides a useful approximation
to the Wiki experience, in addition to
its amazing text editing capabilities.
Note: Vim is NOT suitable for final
presentation of pages nor does it provide
web access like TiddlyWiki and a browser.
Frustrations:
ExternalTiddlersPlugin as currently
implemented makes it difficult to
use the filename as the Tiddler name.
The "fallback" mechanism will not add
a page if the Tiddler name smells like
an external URL. For example,
<<tiddler foo/bar.txt>> does not add
a new Tiddler which can be referenced
via [[foo/bar.txt]] in other pages.
<<tiddler foo_bar_txt|foo/bar.txt>>
will add a page named foo_bar_txt,
and [[foo_bar_txt]] Tiddly links work.
Unfortunately, Vim can't follow the
links because the mapping of "_"
to "/" and "." is ambiguous.
In my newbie opinion, the "fallback"
mechanism is flawed because it entangles
multiple independent concepts: naming
a page and adding it (freezing contents)
versus rendering it fresh with each reload.
My proof of concept was to comment out
lines limiting "fallback" memorization:
// if (!config.formatterHelpers.isExternalLink(src)) {
if (!fallback.length) fallback=src;
// continue;
// }
Given this change, <<tiddler foo/bar.txt>>
will add the page, name is "foo/bar.txt"
and allow [[foo/bar.txt]] to link properly.
This was only a hack... Something better
is needed. Perhaps an optional argument
like <<tiddler foo/bar.txt freeze:>>
This would not break existing code that
uses <<tiddler foo_bar|foo/bar.txt>>
and the "fallback" feature.
Another ExternalTiddlersPlugin enhancement
that seems appealing is tag flexibility.
Perhaps something like...
<<tiddler foo/bar.txt tags:barney dino>>
Apologies if this newbie is off base
or if I've butchered the syntax.
Comments?
Randy
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TiddlyWikiDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/tiddlywikidev?hl=en
-~----------~----~----~----~------~----~------~--~---