From vkrishn4 at gmail.com Thu Dec 5 13:46:32 2019 From: vkrishn4 at gmail.com (V.Krishn) Date: Fri, 6 Dec 2019 03:16:32 +0530 Subject: [pmwiki-devel] experimental, pagestore-plain Message-ID: I have been using this pagestore-plain script for a while, seems to be working. URL: https://gist.github.com/insteps/aa7e2d54da33ad257fae57a9b884d744 PageStorePlain replaces some functions in order to use Plain text to store wiki, and, the related attributes in .hist/. Pros * VCS friendly (main reason for writing this script) * Smaller patch code for core Pmwiki's version releases. * External search tool friendly. Cons * Encourages to edit page directly(not good) Would be nice to know if this makes sense ? Any other suggestions or comments are welcome. If works out well, would convert into a cookbook/addon and upload to pmwiki.org soonish. -- Regards, V.Krishn From 5ko at 5ko.fr Thu Dec 5 23:34:03 2019 From: 5ko at 5ko.fr (Petko Yotov) Date: Fri, 06 Dec 2019 08:34:03 +0100 Subject: [pmwiki-devel] experimental, pagestore-plain In-Reply-To: References: Message-ID: <1b9da59904d4efbb12bc5e7e0f86dd5e@5ko.fr> If you haven't, you can check PageTopStore: https://www.pmwiki.org/wiki/Cookbook/PageTopStore It stores a regular PmWiki page file and second plain-text file with the plain wiki text (only "<" gets escaped to "<"). It detects if the plain text version is more recent than the regular wiki page and automatically merges it, and vice versa. This means that you can edit the contents directly on the filesystem and it should be mostly safe (except maybe for simultaneous edits). This recipe can give you some ideas for your own recipe. Petko -- If you upgrade : http://www.pmwiki.org/Upgrades On 05/12/2019 22:46, V.Krishn wrote: > I have been using this pagestore-plain script for a while, > seems to be working. > > URL: https://gist.github.com/insteps/aa7e2d54da33ad257fae57a9b884d744 > > PageStorePlain replaces some functions in order > to use Plain text to store wiki, and, the related attributes > in .hist/. > > Pros > * VCS friendly (main reason for writing this script) > * Smaller patch code for core Pmwiki's version releases. > * External search tool friendly. > Cons > * Encourages to edit page directly(not good) > > Would be nice to know if this makes sense ? > Any other suggestions or comments are welcome. > > If works out well, would convert into a cookbook/addon and > upload to pmwiki.org soonish. From vkrishn4 at gmail.com Fri Dec 6 02:49:55 2019 From: vkrishn4 at gmail.com (V.Krishn) Date: Fri, 6 Dec 2019 16:19:55 +0530 Subject: [pmwiki-devel] experimental, pagestore-plain In-Reply-To: <1b9da59904d4efbb12bc5e7e0f86dd5e@5ko.fr> References: <1b9da59904d4efbb12bc5e7e0f86dd5e@5ko.fr> Message-ID: On 12/6/19 1:04 PM, Petko Yotov wrote: > If you haven't, you can check PageTopStore: > > ? https://www.pmwiki.org/wiki/Cookbook/PageTopStore > > It stores a regular PmWiki page file and second plain-text file with the > plain wiki text (only "<" gets escaped to "<"). Hmm, trying to figure out if that is needed in PageStorePlain > > It detects if the plain text version is more recent than the regular > wiki page and automatically merges it, and vice versa. > > This means that you can edit the contents directly on the filesystem and > it should be mostly safe (except maybe for simultaneous edits). > > This recipe can give you some ideas for your own recipe. Thanks. Main reason was making it VCS(git) friendly, I have started using git for my whole pmwiki based website and PageStorePlain makes diff a little smaller and better as expected. Would try to avoid storing of a 2nd copy (as in PageTopStore). Presently, I do not need to edit the pages using an external editors, but, if that is needed, the method I would adopt like would be a. adding an attribute ['sha1'] or ['checksum'] of plain text file in .hist/ b. upon edit, pmwiki would match the checksum, c. the edit check would auto-merge the diff or proceed with showing changes and let user keep or undo the changes(regular edit like) OR Write a script, that can be run after each external edit, and which would update the .hist/ file as expected > > Petko > -- Regards, V.Krishn