[Python-de] Verzeichnisdump in der Datenbank
Julian Rath
rath at abacon.net
Don Jul 1 11:39:51 CEST 2004
ich muss aus einer datei die volgendes muster enthät[1] das ganze in
eine datebank als baum parsen[2].
allerdings habe ich keine ahnung wie ich das parsen soll(und ich soch
schon seit tagen ein lösung dafür).
Hat wer spetwas villeicht schon gemacht? Ich waehre sehr dankbar fuer
eine antwort.
mfg
Julian
[1]
cdrom/articles
cdrom/articles/ddws
cdrom/articles/ddws/10.html
cdrom/articles/ddws/11.html
cdrom/articles/ddws/15.html
cdrom/articles/ddws/16.html
cdrom/articles/ddws/17.html
cdrom/articles/ddws/18.html
cdrom/articles/ddws/19.html
cdrom/articles/ddws/2.html
cdrom/articles/ddws/20.html
cdrom/articles/ddws/21.html
cdrom/articles/us
cdrom/articles/us/aizawa.html
cdrom/articles/us/avacom.html
cdrom/articles/us/handy.de.html
cdrom/articles/us/nasa.html
cdrom/articles/us/TRANS.TBL
cdrom/articles/wizard
cdrom/articles/wizard/age-gender-count.xtab
cdrom/articles/wizard/country-dept-salary-sum.xtab
cdrom/articles/wizard/index.html
cdrom/articles/wizard/location-gender-count.xtab
cdrom/articles/wizard/month-category-sales-sum.xtab
cdrom/articles/wizard/page2.html
cdrom/articles/wizard/page3.html
[...]
[2]
Die Datenbanktabelle sollte so ausschauen
fid = fatherid
child = hat das item ein kind?
|id |fid |child |name |
|1 |0 |true |cdrom |
|2 |1 |true |articels |
|3 |2 |true |ddws |
|4 |3 |false |10.html |
|4 |3 |false |11.html |
|4 |3 |false |15.html |
|4 |3 |false |16.html |
|4 |3 |false |17.html |
[...]