[pmwiki-devel] proposed "finalize" markup/feature

Crisses crisses at kinhost.org
Mon Dec 18 07:07:08 CST 2006


I'm working on a PmWiki "desktop" application.  I was going to create  
a contract/proposal manager application with PHP/MySQL but I don't  
have the time to give it the features I wanted.  Suddenly it occurred  
to me that I could do it all in PmWiki.  And I have a working alpha  
after a few hours of work, with all my contract data, lots of  
conditional statements, and it will compose a custom contract based  
on answers to questions stored as a PmWiki data page in colon  
delimited format.  For example "The prices in this contract are valid  
for {Contract-Terms/{$Name}$:pricesvalid} days."  Or I have  
hourly:true on the data page, and if conditionals in sections of the  
contract to change what it says if the contract is hourly rate  
instead of project rate, or pro-bono instead of paid work.

So far everything I want it to do is possible in PmWiki without ANY  
plug-ins or custom coding.  I did add the setskin plugin to make it  
easy to preview the print css file.

There are two places so far that PmWiki doesn't do what I want: the  
form->data portion (I'm currently hand-entering the data pages, but  
want to make a form/questionnaire->wikidatapage instead), and  
allowing me to hand-customize the contract/proposal at the end just  
before printing it to send to the client (without changing the  
original included portions--those need to stay the way they are for  
the next contract or proposal!).

If those two problems are resolved, I suddenly have a complete  
document composition & customization system.  I've already done the  
print template, for example.

I could make a recipe or customize my wiki for it, but I think  
Patrick was suggesting some way of resolving pagelists the other day  
(IRC channel), and I would like to propose that PmWiki users & admins  
might find the features I'm suggesting of use generically as well.   
If not, I can create a custom solution.


I'd like a way to "publish" or finalize something a PmWiki page  
created through includes, pagelists, etc.

I want this markup to take all "include" style markup on the page and  
recurse down the various paths and create a page of basic wiki markup  
from it, such that the "finalized" page is independent of changes to  
the rest of the site, and can be edited as needed, printed, or archived.

I propose two additions to the core:

action=finalize with a target wiki page name as an option (? 
action=finalize&finalizeto=Group.PageName) so that we can use a GET  
method form submission to create finalized markup.  Default behavior  
would be "transform the current page" I think, but people can send  
the page from Drafts to a published area, to an archive area, etc.


and a new pagelist action:

(:pagelist list=normal group=Main finalize:)

(:pagelist list=normal group=Main finalizeto=Group.PageName:)

which publishes the pagelist in the current or default fmt style to  
the target (or current) page.  In other words the default (:pagelist  
finalize:) markup is transformed on submission to a list of the pages  
found (fmt=#default and list default is all).  When using the  
(:pagelist list=normal group=Main finalizeto=Group.PageName:) markup,  
the markup remains on the origin page, the pagelist is published to  
Group.PageName.


If a pagelist is on a ?action=finalize page resolves all the  
pagelists on the page -- they are also finalized.

Works on the page body text only, not the sidebar text (unless  
submitted from the sidebar page) -- thus the GET form can be in the  
sidebar....

By default include GroupHeader & GroupFooter. (they are also  
technically included in the body text of the page).

Optional: permanently resolve page & text variables as well.  I want  
this feature, but I figure maybe it should be optional?



The question is whether this is of use to anyone else, and whether  
anyone has better suggestions for markup -- and if Patrick does NOT  
want to make this part of the core, suggestions for how to recurse  
pagelists and PmWiki markup and save to a page without passing  
through markup->HTML translations.

Thank you,


Crisses
----
I often wonder if it wouldn't be worth dropping all the classes and  
school and just catch up on "reading for pleasure" -- like all those   
DID books I have waiting...:P  or reading Carl Jung's works/ 
autobiography ...or all the other humanistic/transpersonal psych  
stuff I've got lined up....
and it's disgusting that I'd drop all my psych classes to do what---
  ---read more psych stuff :P

-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-devel/attachments/20061218/192b628e/attachment.html 


More information about the pmwiki-devel mailing list