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&path=%2Ftrunk%2Ftools%2F&rev=0&sc=0">https://devel.goto10.org/listing.php?repname=pdmtl&path=%2Ftrunk%2Ftools%2F&rev=0&sc=0
</a><br><br>Tom <br><br><div><span class="gmail_quote">On 8/29/07, <b class="gmail_sendername">marius schebella</b> <<a href="mailto:marius.schebella@gmail.com">marius.schebella@gmail.com</a>> 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'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't know the name exactly<br>
and need a good search engine.<br>so... the puredocumentation (in planning state) will cover externals and<br>"stable" abstractions. (abstractions that are maintained kind of like<br>externals)<br>additionally to the "wiki for objects" 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 "How do I: " 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 "plus" for "+") 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'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 "description" 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 "plus" for "+")
<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 'searching all files for comments'<br><br>searchPattern = "#X text \d+ \d+ " # search for comments
<br>replacePattern = searchPattern # what can be deleted of the comments<br>deleteNLPattern = r'\r' # delete cr<br>fileExtension = ".*[.]pd$" # files to look for<br>separator = "|" # separate colomns
<br>separator2 = "___" # separate junk<br>fileTo = "test_to.txt"<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, "w")<br><br>for fileName in os.listdir("."):<br> m = fe.search(fileName)<br> if m: # only if is it a pd-file<br> f = open(fileName, "r")
<br> first = 1 # suppose the first entry is the description<br> for line in f:<br> m = p.search(line) # search in line for pd-comment pattern<br> if m:<br> line =
nldel.sub("",line)<br> if first == 1: # help needed! how to sort other than by appearance? write to array?<br> f2.write("\n" + fileName + separator) #need \n for every file but the first.
<br> newText = rep.sub("",line) # this should delete the trailing pattern<br> f2.write(newText[:-1]) # this writes without closing nl<br> f2.write
(separator)<br> first = 0<br> else:<br> newText = rep.sub("",line)<br> f2.write(newText[:-1])<br> f2.write(separator2)<br>
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 -> <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