--===============0273927333== Content-Type: multipart/signed; boundary="nextPart1606857.3LUK1JJ8sK"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart1606857.3LUK1JJ8sK Content-Type: multipart/mixed; boundary="Boundary-01=_N+PdDxznVToC3hl" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_N+PdDxznVToC3hl Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Thursday 10 November 2005 21:22, Jasper Poppe wrote: > Hi, > > Does somebody know where to get an updated php.docrc for the current > version of the PHP Manual? The version wich comes with Quanta is > a bit outdated.. Generate one and post here. I have a python script that does that from=20 the PHP documentation, but have no idea if it works with the current=20 one and if you need to tweak the .docrc after or not. But you can try=20 it. It is attached. Andras =2D-=20 Quanta Plus developer - http://quanta.kdewebdev.org K Desktop Environment - http://www.kde.org --Boundary-01=_N+PdDxznVToC3hl Content-Type: application/x-python; name="phpdocgen-0.1.py" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="phpdocgen-0.1.py" #!/usr/bin/env python """ Author: Johannes Orth email: projectphoenix@gmx.net License: GPL2 """ import os import re import sys import fnmatch if len(sys.argv) < 3: print "Expects " sys.exit () path=sys.argv[2] pipe=os.popen ("lynx -dump " + path + 'index.html') output=pipe.read() pipe.close() phpdocrc = open(sys.argv[1],'w') phpdocrc.write("[Tree]\n\n") phpdocrc.write("Doc dir=" + path + "\n\n") phpdocrc.write("Top Element=PHP Documentation\n\n") phpdocrc.write("PHP Documentation=") x=output.find("Table"); output=output[x:] chapters=['I','II','III','IV','V','VI','VII','VIII','IX','X'] for x in chapters: reg1= '^ ' + x + '. \[.*\](.*)' p1=re.compile(reg1,re.MULTILINE); m1=p1.search(output) title=m1.group(1) phpdocrc.write('#' + title + ',') phpdocrc.write("\n\n") chapters=['I','II','III','IV','V','VI'] for i in range(len(chapters)-1): reg1= '^ ' + chapters[i] + '. \[.*\](.*)' p1=re.compile(reg1,re.MULTILINE); m1=p1.search(output) title=m1.group(1) phpdocrc.write(title + '=') reg1='^ ' + chapters[i] + '\. .*\n\n(.*)' + '\n\n ' + chapters[i+1] + '\. ' p1=re.compile(reg1,re.MULTILINE|re.DOTALL) m1=p1.search(output) topics=m1.group(1) reg= "\[(.*)\](.*)" p=re.compile(reg) topiclinks=[] topiclinknrs=[] topictitles=[] for m in p.finditer(topics): topiclinknrs.append(m.group(1)) topictitles.append(m.group(2)) for linknr in topiclinknrs: reg = linknr + '\. file.*/html/(.*)' p=re.compile(reg) m=p.search(output) topiclinks.append(m.group(1)) for topictitle in topictitles: phpdocrc.write(topictitle + ',') phpdocrc.write("\n"); for j in range(len(topictitles)): phpdocrc.write(topictitles[j] + '=') phpdocrc.write(topiclinks[j]) phpdocrc.write("\n") phpdocrc.write("\n"); #Chapter 6 reg1='^ VI\. \[.*\](.*)' p1=re.compile(reg1,re.MULTILINE); m1=p1.search(output) chaptertitle=m1.group(1) phpdocrc.write(chaptertitle + '=') reg='^ VI\. .*\n\n(.*)\n\n VII\.' p1=re.compile(reg,re.MULTILINE|re.DOTALL) m1=p1.search(output) topics=m1.group(1) reg= "\[(\d{2,3})\](.*)" p=re.compile(reg) topiclinks=[] topiclinknrs=[] topictitles=[] for m in p.finditer(topics): topiclinknrs.append(m.group(1)) topictitles.append(m.group(2)) for linknr in topiclinknrs: reg = linknr + '\. file.*/html/(.*)' p=re.compile(reg) m=p.search(output) topiclinks.append(m.group(1)) for topictitle in topictitles: phpdocrc.write(topictitle + ',') phpdocrc.write("\n"); for j in range(len(topictitles)): phpdocrc.write(topictitles[j] + '=') phpdocrc.write(topiclinks[j]) phpdocrc.write("\n") phpdocrc.write("\n"); chapters=['VII','VIII','IX','X'] for i in range(len(chapters)-1): reg1= '^ ' + chapters[i] + '. \[.*\](.*)' p1=re.compile(reg1,re.MULTILINE); m1=p1.search(output) title=m1.group(1) phpdocrc.write(title + '=') reg1='^ ' + chapters[i] + '\. .*\n\n(.*)' + '\n\n ' + chapters[i+1] + '\. ' p1=re.compile(reg1,re.MULTILINE|re.DOTALL) m1=p1.search(output) topics=m1.group(1) reg= "\[(.*)\](.*)" p=re.compile(reg) topiclinks=[] topiclinknrs=[] topictitles=[] for m in p.finditer(topics): topiclinknrs.append(m.group(1)) topictitles.append(m.group(2)) for linknr in topiclinknrs: reg = linknr + '\. file.*/html/(.*)' p=re.compile(reg) m=p.search(output) topiclinks.append(m.group(1)) for topictitle in topictitles: phpdocrc.write(topictitle + ',') phpdocrc.write("\n"); for j in range(len(topictitles)): phpdocrc.write(topictitles[j] + '=') phpdocrc.write(topiclinks[j]) phpdocrc.write("\n") phpdocrc.write("\n") phpdocrc.write("\n") phpdocrc.write("[Context]\n") phpdocrc.write("ContextList=") for fileName in os.listdir (path): if fnmatch.fnmatch (fileName, 'function*'): reg = 'function.(.*).html'; p=re.compile(reg) m=p.search(fileName) phpdocrc.write(m.group(1) + ',') phpdocrc.write("\n") for fileName in os.listdir (path): if fnmatch.fnmatch (fileName, 'function*'): reg = 'function.(.*).html'; p=re.compile(reg) m=p.search(fileName) phpdocrc.write(m.group(1) + '=' + fileName + "\n") phpdocrc.close() #print output --Boundary-01=_N+PdDxznVToC3hl-- --nextPart1606857.3LUK1JJ8sK Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQBDdP+STQdfac6L/08RAua3AJ40tIaQ70LO+lip+5o4LCIJmNwpdgCgnRaR Vq91JWXSd67MVwhKBOSrza8= =fTLB -----END PGP SIGNATURE----- --nextPart1606857.3LUK1JJ8sK-- --===============0273927333== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Quanta mailing list Quanta@mail.kde.org https://mail.kde.org/mailman/listinfo/quanta --===============0273927333==--