G'day Hans, Well, it I wanted basic access from a web page to a Sqlite db file, I'm thinking sql.js would be the way to go.
For really portable (light on infrastructure) TiddlyWiki access to a Sqlite db file via sql.js, I'm thinking that would be the way to go too. No requirement for node.js or a server of any kind. I'm finding integration of javascript libraries into TiddlyWiki a non-trivial affair. Now it could very well be just my deer-in-the-headlights reaction to everything javascript, but I can't help thinking: if brining sql.js into TiddlyWiki were fairly trivial, surely somebody would have done it by now. Surely (don't call me Shirley), there are folk out there, with the same star-in-their-eyes admiration of mine for both TiddlyWiki and sql.js , who would have married those two things together a long time ago. I'd definitely be advertising it, shouting from the mountaintops, if I had married the two. So leaning heavily towards great idea, thinking a very messy/costly affair. Unless somebody knows it would be easy ... On Saturday, May 1, 2021 at 10:36:52 AM UTC-3 hww...@gmail.com wrote: > Happy Saturday, cj.v! > > I've read your preceding post several times and I remain unsure which way > you are leaning on "sql.jg". > > Can you clarify? > > > Cheers, > Hans > > > On Saturday, May 1, 2021 at 9:13:47 AM UTC-4 cj.v...@gmail.com wrote: > >> G'day Jeremy, and thank-you ! >> >> I have sql.js <https://sql.js.org/#/> on the brain, and am not quite >> sure I really want to even dip a toe into that kind of self-inflicted pain. >> >> Although I was in a soul-searching "should I shouldn't I, could I >> couldn't I, to be not to be" stretch of waffling over it, I'm pretty sure >> I've entered an "oh hell no" quick retreat to the safety of a thumb-sucking >> fetal position. >> >> My loathing of javascript makes it kind of hopeless for this kid. For >> all of the great things that can be done with it, as much as I am impressed >> with capabilities and end products, the language irritates the living >> daylights out of me. >> >> Silly me: I may have been thinking "throw a wildly interesting project at >> it, and maybe it will grow on you?" Not so much. >> >> Thank goodness for the slew of folk with brains wired to work with >> javascript ! >> >> >> >> >> On Saturday, May 1, 2021 at 6:27:33 AM UTC-3 jeremy...@gmail.com wrote: >> >>> I'm not having much luck searching the web, and I'm hoping somebody can >>> put me on some kind of "for white belts" reading material. >>> >>> Say one finds a small javascript library one wants to use with >>> TiddlyWiki, what are the options and the processes involved? >>> >>> Does one include the libary (if so where?) in TiddlyWiki, then access >>> the libary functions via javascript macros ? >>> >>> Total newb here with the whole concept, and not particularly >>> knowledgeable about javascript, so please be gentle ! >>> >>> >>> It depends what the JS library does. >>> >>> If the library does pure text manipulation (eg an anagram engine), then >>> it should be fairly easy to wrap it up into a JavaScript macro. There are >>> some examples here: >>> >>> https://github.com/Jermolene/TiddlyWiki5/tree/master/core/modules/macros >>> >>> If the library converts markup to HTML, then it can be wrapped to be a >>> parser - see the Markdown parser or the KaTeX parser for an example: >>> >>> >>> https://github.com/Jermolene/TiddlyWiki5/blob/master/plugins/tiddlywiki/katex/latex-parser.js >>> >>> https://github.com/Jermolene/TiddlyWiki5/blob/master/plugins/tiddlywiki/markdown/wrapper.js >>> >>> Things get much trickier if the library manipulates the DOM. One >>> fundamental problem is that many libraries are written on the assumption >>> that they will be used on a static page, and don’t automatically cater for >>> dynamic content. In many cases, such libraries are old jQuery libraries >>> that do things that can now be done with plain HTML or wikitext. >>> >>> The simplest case is a library that produces output in a single DOM >>> node. These can generally be turned into a widget. For example, the >>> CodeMirror widget: >>> >>> >>> https://github.com/Jermolene/TiddlyWiki5/tree/master/plugins/tiddlywiki/codemirror >>> >>> That is not an exhaustive list, what kind of library are you looking at? >>> >>> Best wishes >>> >>> Jeremy >>> >> -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/802915c5-c083-4d93-bcd2-14480cc50911n%40googlegroups.com.