QuickWeb |
| Home | An Example | Another Example | Download | About | |
A Groovy ExampleThe following Groovy code can create an empty multi page web site by simply passing the name of the pages as arguments in the command line : import dz.univjijel.quickweb.markup.markupImpl.*; import dz.univjijel.quickweb.page.Site; import dz.univjijel.quickweb.page.pageImpl.PageBuilder; import dz.univjijel.quickweb.page.pageImpl.SimpleSite; public static void main(String[] args){ Site argsSite = new SimpleSite("QuickWeb", ".", SimpleSite.NAVIGATION_BAR); for(arg in args) argsSite.addPage(PageBuilder.createPage(arg, "${arg}.html", argsSite).addElement(new P("Content goes here"))); argsSite.save(); } The script can be run by the fllowing command (the QuickWeb.jar must be in the same directory): groovy -cp "QuickWeb.jar" createUsingArgs.groovy Home Download Docs About
HTML generated using hilite.me |