Your SlideShare is downloading. ×
0
Templating In Buildout
Templating In Buildout
Templating In Buildout
Templating In Buildout
Templating In Buildout
Templating In Buildout
Templating In Buildout
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Templating In Buildout

1,096

Published on

Templating, macro and shell commands in buildout.

Templating, macro and shell commands in buildout.

Published in: Technology, Self Improvement
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,096
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
13
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Templating in buildouts Cherepanyak Volodymyr © Quintagroup, 2009
  • 2. Templating in buildout <ul><li>amplecode.recipe.template (Jinja2) </li></ul><ul><li>z3c.recipe.filetemplate (string.Template) </li></ul><ul><li>iw.recipe.template (Cheetah Templates) </li></ul><ul><li>inquant.recipe.textfile </li></ul><ul><li>collective.recipe.template </li></ul><ul><li>z3c.recipe.template </li></ul>
  • 3. buildout macro zc.recipe.macro ... [buildout] ... parts = instance0 instance1 ... versions = versions ... ... [instance-macro] ... application = application ... zope.conf = ... <eventlog> ... <logfile> ... path /var/log/myapp/$${:__name__}-z3.log ... </logfile> ... </eventlog> ... <product-config zc.z3monitor> ... port $${:monitor-port} ... </product-config>
  • 4. buildout macro ... [instance0] ... recipe = zc.recipe.macro ... result-recipe = zc.recipe.macro:test ... macro = instance-macro ... address = 8080 ... monitor-port = 8089 ... ... [instance1] ... recipe = zc.recipe.macro ... result-recipe = zc.recipe.macro:test ... macro = instance-macro ... address = 9080 ... monitor-port = 9089
  • 5. Shell commands in buildout plone.recipe.command (os.system) [chown] recipe = plone.recipe.command command = chown -R ${instance:effective-user}:${instance:effective-user} ${buildout:directory} update-command = ${chown:command}
  • 6. Shell commands in buildout <ul><li>iw.recipe.cmd </li></ul><ul><li>adds python scripting </li></ul><ul><li>cp.recipe.cmd </li></ul><ul><li>pushes shell commands into single script </li></ul>
  • 7. References google ;) http://pypi.python.org http://svn.zope.org http://dev.plone.org/collective/browser/buildout https://ingeniweb.svn.sourceforge.net/svnroot/ingeniweb

×