Skip to content

Commit

Permalink
- Don't mangle non-link modelica:// references
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@10727 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Dec 15, 2011
1 parent c952ca0 commit f4afedc
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Examples/GenerateDoc.mos
Expand Up @@ -44,7 +44,7 @@ b:=getClassNames(recursive=true,sort=true);
/* If we want to test on fewer classes */
// b := {$TypeName(Modelica),$TypeName(Modelica.Math.Matrices.LAPACK.dgglse_vec)};
// b := {$TypeName(Modelica),$TypeName(Modelica.Electrical.Analog.Basic),$TypeName(Modelica.Electrical.Analog.Basic.VariableInductor)};
// b := {$TypeName(Modelica)};
// b := {$TypeName(ModelicaReference.Annotations.Dialog)};

version := "<hr />Generated by <a href=\"http://openmodelica.org\">OpenModelica</a>" + getVersion() + " using <a href=\"GenerateDoc.mos\">GenerateDoc.mos</a>";

Expand Down Expand Up @@ -130,15 +130,16 @@ for c in b loop
end if;
writeFile(filetmp, version, append = true);
system("echo Checking file: " + file + " >> tidy.log");
system("tidy -quiet '" + filetmp + "' > " + file + " 2>> tidy.log");
system("sed -i 's/modelica:\\/\\/[A-Za-z0-9./_-]*\\/\\([A-Za-z0-9._-]*.[A-Za-z_-]*\\\"\\)/\\1/g' " + file);
system("sed -i 's/modelica:\\/\\/\\([A-Za-z0-9._]*\\)/\\1\\.html/g' " + file);
system("cp " + filetmp + " " + file);
system("sed -i 's/href=\"modelica:\\/\\/[A-Za-z0-9./_-]*\\/\\([A-Za-z0-9._-]*.[A-Za-z_-]*\\\"\\)/href=\"\\1/g' " + file);
system("sed -i 's/href=\"modelica:\\/\\/\\([A-Za-z0-9._]*\\)/href=\"\\1\\.html/g' " + file);
system("tidy -modify -quiet " + file + " 2>> tidy.log");
i := i + 1;
print(cl + " (" + String(i) + "/" + String(sz) + ")" + "\n");
end for;

writeFile("FindFiles.sh","#!/bin/bash
egrep -o \"[A-Za-z_0-9-]*\\.(png|jpg)\" *.html | cut -d: -f2- | sort -u | tr -d \\\" > tmp
egrep -o \"[A-Za-z_0-9.-]*\\.(png|jpg)\" *.html | cut -d: -f2- | sort -u | tr -d \\\" > tmp
for f in `cat tmp`; do
if test -f \"$f\"; then
true
Expand Down

0 comments on commit f4afedc

Please sign in to comment.