Skip to content

Commit

Permalink
Make Tidy.py a little bit more talkative and remove usless lines.
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@11125 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
dietmarw committed Feb 14, 2012
1 parent 94b3371 commit 21b678a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Examples/GenerateDoc.mos
Expand Up @@ -240,14 +240,12 @@ def linkreplace(link):
pass
return link

log = open('tidy.log','w')
verblog = open('tidy.verbose','w')
for filepath in sorted(glob.glob('*.html')):
tag = '[Checking file %s]:\\n' % filepath
# sys.stdout.write(tag) # not much point in writing the tags to stdout
sys.stderr.write(tag)
pid = sub.call(['tidy', '-modify', '-quiet', filepath])
if pid <> 2 then
if pid <> 2:
with open(filepath,'r') as html_file:
soup = BeautifulSoup(html_file)
for a in soup.findAll('a'):
Expand All @@ -262,6 +260,8 @@ for filepath in sorted(glob.glob('*.html')):
pass
with open(filepath,'w') as html_file:
html_file.write(soup.__str__())
else:
print('Tidy failed with %s, skipping link-replacement for %s!' % (pid,filepath))
");

writeFile("FindFiles.sh","#!/bin/bash
Expand Down

0 comments on commit 21b678a

Please sign in to comment.