|
Author |
Topic: Script parses pde file; adds comments to html page (Read 671 times) |
|
kevinP
|
Script parses pde file; adds comments to html page
« on: Feb 19th, 2004, 3:45am » |
|
I added this to the suggestion folder but decided to do something for the interim. This Perl script parses the PDE file in your applet folder and grabs any comment lines (//) that contain the tag "#html". For example: // #html Click the mouse to start. // #html Cursor keys change direction. It adds these to the table data cell directly below the applet on the index.html page. [moved this to server] http://www.tiros.net/pfeiffer/processing/misc/pde_applet_labeler/ -K
|
« Last Edit: Mar 20th, 2004, 1:33am by kevinP » |
|
Kevin Pfeiffer
|
|
|
benelek
|
Re: Script parses pde file; adds comments to html
« Reply #1 on: Feb 19th, 2004, 11:55am » |
|
it's a great idea, being able to add stuff to the html using that kind of notation within Processing. it's also nice to see someone interested enough in their suggestion to try and implement it! good work.
|
|
|
|
kevinP
|
Re: Script parses pde file; adds comments to html
« Reply #2 on: Feb 21st, 2004, 1:05am » |
|
I was too tired tonight to "process" but instead refined this script a bit (and tried to make it less ugly). You can now add text above the applet as well (#html>); default is fontsize 3; and $file (or $0) will be replaced by pde filename if desired. The font settings are also easily modifiable as params in the script and you can use a backslash to split lines that should be continous (or just change the $no_br flag). [added] Version 1.07 defaults to first pde file found; no need to specify filename on command line; added -h help flag. Also fixed a couple small bugs - the nbsp space entity is now preserved on empty lines (so that the spacing above the applet will not change after running the labeler). Filename substitution is global now (oops, just needed that little "g" switch). http://www.tiros.net/pfeiffer/processing/misc/pde_applet_labeler/
|
« Last Edit: Mar 20th, 2004, 1:35am by kevinP » |
|
Kevin Pfeiffer
|
|
|
|