[pmwiki-devel] experimental, pagestore-plain

2 views
Skip to first unread message

V.Krishn

unread,
Dec 5, 2019, 4:48:13 PM12/5/19
to PmWiki Devel Mailing List

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/<pagename>.

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

_______________________________________________
pmwiki-devel mailing list
pmwiki...@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-devel

Petko Yotov

unread,
Dec 6, 2019, 2:34:53 AM12/6/19
to vkri...@gmail.com, PmWiki Devel Mailing List
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 "&lt;").

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/<pagename>.
>
> 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.

V.Krishn

unread,
Dec 6, 2019, 5:50:54 AM12/6/19
to Petko Yotov, PmWiki Devel Mailing List
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 "&lt;").

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/<pagename>
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/<pagename> file as expected

>
> Petko
>

--
Regards,
V.Krishn

V.Krishn

unread,
Nov 11, 2022, 6:58:29 PM11/11/22
to PmWiki Devel Mailing List
Since I have started using Pmwiki version 2.3.x, have updated
pagestore-plain recipe, find download link and info at:

http://insteps.net/pr/a/pmwiki/Cookbook/PageStorePlain

It still has minor bugs.
Suggestions or comments are welcome.

--
Regards,
V.Krishn

On 12/6/19 03:16, 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/<pagename>.
>
> 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.
>




Reply all
Reply to author
Forward
0 new messages