From xah@xahlee.org Thu Jun 09 18:20:23 2005 Return-Path: X-Sender: xah@xahlee.org X-Apparently-To: lojban@yahoogroups.com Received: (qmail 50467 invoked from network); 10 Jun 2005 01:20:22 -0000 Received: from unknown (66.218.66.218) by m24.grp.scd.yahoo.com with QMQP; 10 Jun 2005 01:20:22 -0000 Received: from unknown (HELO xahlee.org) (206.130.99.40) by mta3.grp.scd.yahoo.com with SMTP; 10 Jun 2005 01:20:21 -0000 Received: (from root@localhost) by xahlee.org (8.11.6/8.11.6) id j5A1KFh27382; Thu, 9 Jun 2005 19:20:15 -0600 Date: Thu, 9 Jun 2005 19:20:15 -0600 Message-Id: <200506100120.j5A1KFh27382@xahlee.org> To: lojban@yahoogroups.com X-Mailer: NeoMail 1.25 X-IPAddress: 69.236.76.61 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Originating-IP: 206.130.99.40 X-eGroups-Msg-Info: 1:12:0 From: "Xah Lee" Subject: Re: [lojban] lojban grammer html errors X-Yahoo-Group-Post: member; u=139458407; y=F9YNzyrM7LGUkUiggfnsMB3BmOehW2iXhjDdGWNeEBq5_YY X-Yahoo-Profile: p0lyglut X-Yahoo-Message-Num: 24493 This python script fixes it, except chapter 1 and 14. But, there are more problems. For example, in chapter 14, many paragraphes don't have

tages. Xah xah@xahlee.org ∑ http://xahlee.org/ # -*- coding: utf-8 -*- # Python import os,sys,shutil mydir= '/Users/t/web/lojban/hrefgram' findreplace = [ ('',''), (u''' ''', '<title>'), (''' ''', ''), ] def replaceStringInFile(filePath): "replaces all findStr by repStr in file filePath" print filePath tempName=filePath+'~x~' backupName=filePath+'~~' inF = open(filePath,'rb') s=unicode(inF.read(),'utf-8') inF.close() for couple in findreplace: outtext=s.replace(couple[0],couple[1]) s=outtext outF = open(tempName,'wb') outF.write(outtext.encode('utf-8')) outF.close() shutil.copy2(filePath,backupName) os.remove(filePath) os.rename(tempName,filePath) def myfun(dummy, dirr, filess): for child in filess: if '.html' == os.path.splitext(child)[1] and os.path.isfile(dirr+'/'+child): replaceStringInFile(dirr+'/'+child) print child os.path.walk(mydir, myfun, 'dummy') -------------------------------------------------- On Jun 9, 2005, at 5:33 PM, Xah Lee wrote: the lojban ref grammar HTML seems to have some errors. example: http://lojban.org/publications/reference_grammar/chapter8.html CSS Error (24/5): Invalid class selector. http://lojban.org/publications/reference_grammar/chapter8.html HTML error (256/62): The end tag is missing. HTML error (403/64): The end tag is missing. HTML error (508/53): The end tag is missing. HTML error (755/72): The end tag is missing. HTML error (843/76): The end tag is missing. HTML error (894/69): The end tag is missing. HTML error (1092/53): The end tag is missing. HTML error (1201/81): The end tag is missing. HTML error (1338/73): The end tag is missing. HTML error (1413/80): The end tag is missing. HTML error (1457/70): The end tag is missing. HTML error (1508/7): The end tag is missing. HTML error (1509/7): The end tag is missing. (validation report by iCab browser) replacing every by seems to fix one type of problem.... Xah xah@xahlee.org ∑ http://xahlee.org/ ☄