We implemented something similar forthe help files in PDMTL abstractions. See the pdmtl.inde.maker.pd in <a href="https://devel.goto10.org/listing.php?repname=pdmtl&amp;path=%2Ftrunk%2Ftools%2F&amp;rev=0&amp;sc=0">https://devel.goto10.org/listing.php?repname=pdmtl&amp;path=%2Ftrunk%2Ftools%2F&amp;rev=0&amp;sc=0
</a><br><br>Tom <br><br><div><span class="gmail_quote">On 8/29/07, <b class="gmail_sendername">marius schebella</b> &lt;<a href="mailto:marius.schebella@gmail.com">marius.schebella@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
hi,<br>this is the start for the puredocumentation wiki.<br>for all who didn&#39;t follow the discussions during the pdconv, here is the<br>latest:<br>some people agreed on building a media wiki for all documentation beyond
<br>the pd help patches. some time ago there was the puredatabase, but that<br>is quite dead now.<br>so the idea is, to reanimate something similar, but with the possibility<br>for everyone to commit to it. maybe not everyone but if 5-10% of users
<br>help contributing, then I think the project will be successful.<br>one of the reasons why this should be done, is that very often pd users<br>look for a certain feature or object, but don&#39;t know the name exactly<br>
and need a good search engine.<br>so... the puredocumentation (in planning state) will cover externals and<br>&quot;stable&quot; abstractions. (abstractions that are maintained kind of like<br>externals)<br>additionally to the &quot;wiki for objects&quot; there will be the section for the
<br>tutorials, manuals and faq, and hopefully you will be able to type in<br>your search string after &quot;How do I: &quot; and get the right objects,<br>examples and tutorials.<br>My estimation is, that there are more than 3000 objects atm. so for the
<br>beginning the tricky part is to build all the basic object pages from<br>the existing documentation (mainly help patches).<br>here is, what I think should be the content of every object page:<br>*objectname* the string name (for example &quot;plus&quot; for &quot;+&quot;) of the
<br>object/external<br>*opt other name* = abbreviation, +,..<br>*helpfilename* (can be different than object name),<br>*description* = short description<br>*libraryinfo* purepd,GEM,cyclone... + author + licence<br>*arguments*
<br>*inlets/outlets*<br>*examples* what this object is for... that&#39;s where you can be creative!<br>*see also* / similar objects<br>*tags* like audio/dsp, math, MIDI, something like a categorization.<br>I want to use python to extract as much information as possible from the
<br>help-patches into one big textfile (csv style) from which we can create<br>the wikipages. I hope to get the developers involved in correcting the<br>cvs-textfile before the basic pages are created). this has to be done
<br>per library, and I am still trying to figure out, how to do this in<br>detail. for example some help patches have some description in the top<br>letmost corner. so a python script should be able to find that<br>information and put it into the &quot;description&quot; field.
<br>there will be an irc session on sep 11 with all the people working on<br>the project. so maybe if you want to join or have suggestions on how to<br>get this done, feel free to respond.<br>addtitional documentation work that probably will also be done:
<br>improving help patches by switching to a nice pddp format.<br>creating online video tutorials, or recordings of workshops.<br>one last point: If you know of a school/university or teaching center<br>that would like to get involved (for example by putting pd classes on
<br>their schedule or paying people do some documentation work) that would<br>also help the project to be successful...<br>so far. thanks for reading through that all!<br>marius.<br><br># this file will look slightly different for every library
<br># write everything into a database like format... (NOT YET!!!)<br># OBJECTNAME | OPT OTHER NAME | HELPFILE-NAME | DESCRIPTION | TAGS | LIBRARYINFO | ARGUMENTS | INLETS/OUTLETS | EXAMPLES | SEE ALSO<br># objectname is the string name (for example &quot;plus&quot; for &quot;+&quot;)
<br># opt other name = abbreviation, +,<br># helpfilename (can be different than object name),<br># description = short description<br># libraryinfo: purepd or GEM + author + licence<br># arguments<br># inlets/outlets<br>
# examples : what this object is for...<br># see also/similar objects<br># junk<br>#<br># use X coordinate to sort comments???<br><br>import re<br>import os<br><br>print &#39;searching all files for comments&#39;<br><br>searchPattern = &quot;#X text \d+ \d+ &quot; # search for comments
<br>replacePattern = searchPattern&nbsp;&nbsp;&nbsp;&nbsp;# what can be deleted of the comments<br>deleteNLPattern = r&#39;\r&#39;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# delete cr<br>fileExtension = &quot;.*[.]pd$&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# files to look for<br>separator = &quot;|&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# separate colomns
<br>separator2 = &quot;___&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# separate junk<br>fileTo = &quot;test_to.txt&quot;<br><br>p = re.compile(searchPattern)<br>rep = re.compile(replacePattern)<br>nldel = re.compile(deleteNLPattern)<br>fe = re.compile
(fileExtension)<br><br>f2 = open(fileTo, &quot;w&quot;)<br><br>for fileName in os.listdir(&quot;.&quot;):<br>&nbsp;&nbsp;&nbsp;&nbsp;m = fe.search(fileName)<br>&nbsp;&nbsp;&nbsp;&nbsp;if m:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# only if is it a pd-file<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;f = open(fileName, &quot;r&quot;)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;first = 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# suppose the first entry is the description<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for line in f:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;m = p.search(line)&nbsp;&nbsp;&nbsp;&nbsp; # search in line for pd-comment pattern<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if m:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;line = 
nldel.sub(&quot;&quot;,line)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if first == 1:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# help needed! how to sort other than by appearance? write to array?<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;f2.write(&quot;\n&quot; + fileName + separator) #need \n for every file but the first.
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;newText = rep.sub(&quot;&quot;,line)&nbsp;&nbsp;&nbsp;&nbsp;# this should delete the trailing pattern<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;f2.write(newText[:-1])&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# this writes without closing nl<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;f2.write
(separator)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;first = 0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;newText = rep.sub(&quot;&quot;,line)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;f2.write(newText[:-1])<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;f2.write(separator2)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;f.close()<br>f2.close()<br><br>#done...<br>_______________________________________________<br><a href="mailto:PD-list@iem.at">PD-list@iem.at</a> mailing list<br>UNSUBSCRIBE and account-management -&gt; <a href="http://lists.puredata.info/listinfo/pd-list">
http://lists.puredata.info/listinfo/pd-list</a><br><br></blockquote></div><br><br clear="all"><br>-- <br>thomas ouellet fredericks, <a href="mailto:tof@danslchamp.org">tof@danslchamp.org</a>, montreal, canada