Re: [Hypercontent-users] Publish a website through email
Brought to you by:
alexvigdor
From: Alex V. <al...@bi...> - 2007-07-10 03:44:33
|
I just checked in minor changes to two classes org.hypercontent.workflow.command.Zip org.hypercontent.workflow.SaxWorkflowHandler WIth this change you can specify an attribute "directory" on the zip workflow command that can point to a filesystem other than the main repository. You can use this, for example, to create a zip of the build filesystem. Here is the complete XML of a script you can install in a file under /config/workflow (e.g. email-build-zip.xml) in your project repository that will create a zip of the build filesystem and email a link to the specified user or group. Note that literal email addresses don't work here at the moment, that would be another small tweak, only group or user names are recognized, and are mapped to email addresses via the users' VCards. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE workflow SYSTEM "http://hypercontent.sourceforge.net/dtd/ workflow.dtd"> <workflow> <event name="email-zip" permissions="read"> <variable name="zipper" value="${actor}"/> <input name="recipient" label="Email this zip to: " type="text" pattern=".+" default="author"/> <variable name="href" value="${abs-server-base}/screens/please- wait.html"/> <nq q="zipping"/> <nq who="${zipper}"/> <zip directory="/build/"/> </event> <q id="zipping"> <event name="batch-complete"> <variable name="zip" value="${zip}"/> <variable name="href" value="${abs-server-base}${zip}? mode=download-link"/> <email who="${recipient}" subject="[HyperContent]: Zip Ready" content-type="text/html"> <![CDATA[ <h3>${zipper} generated a zip file that is available <a href="${abs-server-base}${zip}">here</a></h3> ]]> </email> <dq/> <nq q="zipped"/> </event> </q> <q id="zipped"> <event name="discard" who="${zipper}"> <delete path="${zip}"/> <dq/> <dq who="${zipper}"/> </event> <event name="expire" when="in 1 week"> <delete path="${zip}"/> <dq/> <dq who="${zipper}"/> </event> </q> </workflow> You could also set this up on a schedule by adding another event under the top level workflow tag e.g. 3 am every Monday <event when="@ 0 3 2"> <variable name="zipper" value="admin"/> <variable name="recipient" value="group:admin"/> <variable name="href" value="${abs-server-base}/screens/please- wait.html"/> <nq q="zipping"/> <nq who="${zipper}"/> <zip directory="/build/"/> </event> -Alex On Jul 5, 2007, at 11:00 AM, Alex Vigdor wrote: > Hi Vangel, > Tom Tom has it about right, you mostly just need to combine the > download-zip and email commands in a workflow script. The only catch > is that the class org.hypercontent.workflow.command.Zip that sits > behind the download-zip command is only able to zip source XML files > coming out of the repository, not the transformed output in the > publish filesystem, which I presume is what you'd be interested in > zipping in this case. This should be a simple fix, I'll get a patch > together along with a sample workflow script to demonstrate what > you're talking about. I should have it ready by Monday. > > Cheers, > Alex > > On Jul 4, 2007, at 7:51 AM, Vangel V. Ajanovski wrote: > >> Hello everyone, >> >> I have a website under Hypercontent that I want to publish via email. >> More precisely I want to be able to just press Publish or Publish >> All in the workflow, and the whole website should be sent as a ZIP >> to a predefined mail recipient. Another options is to just build >> and pack the whole website into a ZIP file, and then send a link to >> this ZIP file via email. >> >> Is this somehow possible? Any ideas? >> >> -- Vangel >> --------------------------------------------------------------------- >> - >> --- >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> Hypercontent-users mailing list >> Hyp...@li... >> https://lists.sourceforge.net/lists/listinfo/hypercontent-users > > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Hypercontent-users mailing list > Hyp...@li... > https://lists.sourceforge.net/lists/listinfo/hypercontent-users > |