AFAIK, the github saver is for single-file TW's. On Thursday, April 30, 2020 at 12:03:19 PM UTC-7, ludwa6 wrote: > > If there's any doubt about using the "Created" field, then the > auto-assigned integer always works for PK (most RDBMs do it that way by > default, in fact). > > Meanwhile, i am playing with tiddly server, trying to get Github Saver to > work, with no joy as of yet. Is this supposed to work, or does it work > only for single-file instances, i wonder? > > > On Thursday, April 30, 2020 at 6:08:24 PM UTC+1, Mark S. wrote: >> >> I'm not sure the created field is never cleaned off. Like possibly during >> export/import procedures. Or when packed/unpacked from a plugin. >> Maybe use a separate id field just to be sure. >> >> On Thursday, April 30, 2020 at 9:52:28 AM UTC-7, Arlen Beiler wrote: >>> >>> If I was doing that I would auto assign an integer primary key, but if >>> that's more work you could use the created timestamp. >>> >>> On Thu, Apr 30, 2020 at 8:40 AM ludwa6 >>> >>>> Arlen: storage in a RDBMS (requirement for this application i want to >>>> develop[1]) requires a Primary Key that is both guaranteed unique AND >>>> cannot be changed -but tiddler Title *can* be changed, so that is not a >>>> good candidate, seems to me. The one element of this schema that appears >>>> immutable to me is that "created" date/time stamp, which has 3 digits >>>> beyond minutes (thousandths of a minute, perhaps?), so that is >>>> fine-grained >>>> enough to guarantee uniqueness, i guess. >>>> >>>> [1] To explain: i need RDBMS storage for this particular application >>>> because i need to correlate tiddlers with records in other tables of the >>>> database that they are meant to document, or otherwise extend. This RDBMS >>>> lies at the heart of a gateway that facilitates data I/O with a set remote >>>> nodes for sensing & control of farm operations -initially a >>>> climate-controlled greenhouse. The data flowing between nodes in this >>>> environment is structured as a rule, such that humans cannot mess with it. >>>> Yet it is precisely those "messy" human inputs -e.g. observations, photos, >>>> links, questions, etc.- that i aim to capture thru TiddlyWiki. The real >>>> power of this application will lie in its ability to corrrelate machine >>>> data with user-generated data... And for that, i need both to be stored in >>>> RDBMS (just in case you were wondering why :-) >>>> >>>> >>>> On Thursday, April 30, 2020 at 12:23:00 PM UTC+1, Arlen Beiler wrote: >>>>> >>>>> Those last lines are a mystery to me. I've never seen them before. >>>>> I'll check make sure I'm not missing anything. >>>>> >>>>> The tiddler title is the primary key in Tiddly wiki. I don't really >>>>> think you would need to store it anywhere else though. >>>>> >>>>> Everything is in flux right now, but hopefully we'll have it mailed >>>>> down soon and then I'll be able to better recommend how to use a database >>>>> with this. But it certainly isn't required. >>>>> >>>>> On Thu, Apr 30, 2020, 06:42 ludwa6 <[email protected]> wrote: >>>>> >>>>>> Arlen: Putting your earlier instructions together with Mark's >>>>>> declaration of listener port, i *think* i've got he server running on my >>>>>> Pi >>>>>> server... But in fact i'm still confused about this. >>>>>> >>>>>> The UI looks & seems to be performing pretty much like TiddlyWiki >>>>>> single-file version, except that default "Getting Started" tiddler asked >>>>>> me >>>>>> to make & save one, & confirm that it worked... So i did, and now i see >>>>>> it >>>>>> in the file system, inside 'MyNewWikiFolder/tiddlers/ , along with >>>>>> $_StoryList.tid . I then created a 2nd tiddler, which appeared as a 2nd >>>>>> file in the same directory... So can i safely presume i've got tiddly >>>>>> server working as it should? >>>>>> >>>>>> Now looking at the schema of these files, it seems pretty simple, >>>>>> i.e.: >>>>>> >>>>>> - created: (date/time stamp in yyyymmddhhmm format, followed by a >>>>>> 3-digit numeric) >>>>>> - modified: (same format as above) >>>>>> - tags: (if any, a horizontal list) >>>>>> - title: (as declared) >>>>>> - type: text/vnd.tiddlywiki >>>>>> - (single line space, followed by... >>>>>> - (full text of tiddler, followed by... >>>>>> - (some 16 lines, blank except for '~' as initial character... >>>>>> - <ikiFolder/tiddlers/(TitleOfTiddler).tid >>>>>> - [noeol] 7L, 132C 7,23 ALL >>>>>> >>>>>> That last line is most mysterious to me, as i don't know what those >>>>>> codes refer to, nor why there's so many spaces preceding the last 2 >>>>>> strings. >>>>>> >>>>>> Best candidate for Primary Key here, as far as i can see, would be >>>>>> the first attribute -the "created" date/time stamp- but i don't know how >>>>>> to >>>>>> turn these files into rows in the SQLite database where i want to store >>>>>> the >>>>>> data. From what Tony said, i gather it would involve building a sync >>>>>> module >>>>>> of some sort, but i have no idea how that might be done. Any prior art, >>>>>> or >>>>>> ideas about this? >>>>>> >>>>>> >>>>>> >>>>>> On Wednesday, April 29, 2020 at 7:00:25 PM UTC+1, Arlen Beiler wrote: >>>>>>> >>>>>>> Sorry, what I said was for tiddly server. What mark said is for >>>>>>> tiddly wiki. >>>>>>> >>>>>>> On Wed, Apr 29, 2020, 13:56 'Mark S.' via TiddlyWiki < >>>>>>> [email protected]> wrote: >>>>>>> >>>>>>>> >>>>>>>> The listen command can take a port number. Like >>>>>>>> >>>>>>>> --listen port=8090 >>>>>>>> >>>>>>>> >>>>>>>> On Wednesday, April 29, 2020 at 9:37:36 AM UTC-7, ludwa6 wrote: >>>>>>>>> >>>>>>>>> Hey Arlen: Great to hear, thanks! >>>>>>>>> So i ran those commands, installed TiddlyServer on my Raspberry Pi >>>>>>>>> gateway... But hit a little snag setting up the listener, in that >>>>>>>>> port >>>>>>>>> :8080 is owned by another application server. Can't change that for >>>>>>>>> the >>>>>>>>> moment, as it's a service i can't really mess with. Could talk to >>>>>>>>> that >>>>>>>>> developer about changing the port he's using, i suppose... >>>>>>>>> >>>>>>>>> But just to see this working, i tried to install on my Mac, but >>>>>>>>> terminal tells me: >>>>>>>>> >>>>>>>>> -bash: npm: command not found >>>>>>>>> Suppose i could use a different package manager, if i knew how >>>>>>>>> (yes, i am a complete unix n00b =8-( >>>>>>>>> >>>>>>>>> Will try to bone up on the requisite skills, but any more crib >>>>>>>>> notes would of course be appreciated! >>>>>>>>> >>>>>>>>> /walt >>>>>>>>> >>>>>>>>> >>>>>>>>> On Wednesday, April 29, 2020 at 3:06:52 PM UTC+1, Arlen Beiler >>>>>>>>> wrote: >>>>>>>>>> >>>>>>>>>> I have tried doing SQLite but there are some caveats that need to >>>>>>>>>> be accounted for. >>>>>>>>>> >>>>>>>>>> What I would recommend you do is use data folders instead of >>>>>>>>>> single file wikis. Data folders store tiddlers in individual text >>>>>>>>>> files >>>>>>>>>> using a custom format that Jeremy came up with. It works very well >>>>>>>>>> for text >>>>>>>>>> based storage solutions like GitHub. I'm actually really surprised >>>>>>>>>> no one >>>>>>>>>> mentioned this yet. >>>>>>>>>> >>>>>>>>>> To get started, install tiddlywiki globally by running npm >>>>>>>>>> install tiddlywiki -g >>>>>>>>>> >>>>>>>>>> Next, to create a blank data folder, run tiddlywiki >>>>>>>>>> ./MyNewWikiFolder --init server >>>>>>>>>> >>>>>>>>>> Then run tiddlywiki ./MyNewWikiFolder --listen >>>>>>>>>> >>>>>>>>>> Now open your browser to localhost:8080 and start exploring. >>>>>>>>>> >>>>>>>>>> TiddlyServer is a good way to load multiple data folders on the >>>>>>>>>> same port. >>>>>>>>>> >>>>>>>>>> Hope that helps, >>>>>>>>>> Arlen >>>>>>>>>> >>>>>>>>>> On Wed, Apr 29, 2020 at 7:52 AM ludwa6 <[email protected]> wrote: >>>>>>>>>> >>>>>>>>>>> Such a wealth of options for Local-First storage have emerged in >>>>>>>>>>> this thread (must say: i'm super impressed with the strength of >>>>>>>>>>> this >>>>>>>>>>> community i have just joined), i've been able to quickly implement >>>>>>>>>>> the >>>>>>>>>>> simple approach suggested by Jeremy (TW Desktop, + cloud sync to >>>>>>>>>>> Github), >>>>>>>>>>> which is serving me well enough for now. >>>>>>>>>>> >>>>>>>>>>> Yet, as i'm fast creating quite a mountain of data in TW, i'm >>>>>>>>>>> also bothered by the growing sense that what i really want at the >>>>>>>>>>> back end >>>>>>>>>>> of this beautiful thing is a database -ideally SQLite, which has >>>>>>>>>>> all that >>>>>>>>>>> local-first/ single-file/ portability goodness of TW, while >>>>>>>>>>> bringing the >>>>>>>>>>> full set of functionalities needed to manage a large database with >>>>>>>>>>> integrity. With a single SQLite file stored locally and replicated >>>>>>>>>>> to the >>>>>>>>>>> cloud, that gives us a solution that ticks all the boxes in that >>>>>>>>>>> seminal Local-First paper >>>>>>>>>>> <https://www.inkandswitch.com/local-first.html>: Fast, >>>>>>>>>>> Multi-Device, Offline, Collaboration, Longevity, Privacy, >>>>>>>>>>> User-Control. >>>>>>>>>>> Combining this with the power of TW5 interface (really an >>>>>>>>>>> "interface >>>>>>>>>>> builder for the rest of us," i would call it), minus mess of .html >>>>>>>>>>> backup >>>>>>>>>>> files i've got to keep cleaning off my machine (SQLite has a full >>>>>>>>>>> transactional history, so no need of any backups but that one file, >>>>>>>>>>> replicated to cloud), and that in broad-strokes would be the shape >>>>>>>>>>> of my >>>>>>>>>>> dream machine. >>>>>>>>>>> >>>>>>>>>>> So i must ask: has anyone tried using SQLite as storage for a >>>>>>>>>>> TiddlyWiki? If this is indeed technically feasible, can anyone >>>>>>>>>>> point me to >>>>>>>>>>> prior art on which i might be able to build such a solution? >>>>>>>>>>> Though i am >>>>>>>>>>> no programmer, i am reasonably comfortable with SQL as a data >>>>>>>>>>> manipulation >>>>>>>>>>> language, if someone can just show me how to get the TW data in >>>>>>>>>>> there! >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> 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 view this discussion on the web visit >>>>>>>>>>> https://groups.google.com/d/msgid/tiddlywiki/856ad777-dc63-4491-bd74-c0391c4bf413%40googlegroups.com >>>>>>>>>>> >>>>>>>>>>> <https://groups.google.com/d/msgid/tiddlywiki/856ad777-dc63-4491-bd74-c0391c4bf413%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>>>>>>>> . >>>>>>>>>>> >>>>>>>>>> -- >>>>>>>> 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 view this discussion on the web visit >>>>>>>> https://groups.google.com/d/msgid/tiddlywiki/9571530e-806f-4a61-ae2f-ef1498d49f7b%40googlegroups.com >>>>>>>> >>>>>>>> <https://groups.google.com/d/msgid/tiddlywiki/9571530e-806f-4a61-ae2f-ef1498d49f7b%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>>>>> . >>>>>>>> >>>>>>> -- >>>>>> 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 view this discussion on the web visit >>>>>> https://groups.google.com/d/msgid/tiddlywiki/e11cd690-1d1b-4ad4-a301-049640052549%40googlegroups.com >>>>>> >>>>>> <https://groups.google.com/d/msgid/tiddlywiki/e11cd690-1d1b-4ad4-a301-049640052549%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>>> . >>>>>> >>>>> -- >>>> 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 view this discussion on the web visit >>>> https://groups.google.com/d/msgid/tiddlywiki/41b844a9-ec92-48f3-82ba-577224128761%40googlegroups.com >>>> >>>> <https://groups.google.com/d/msgid/tiddlywiki/41b844a9-ec92-48f3-82ba-577224128761%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>>
-- 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 view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/cc39ce4f-bdcb-40e6-be1a-8067e78af292%40googlegroups.com.

