generate HTML version of NEWS, with proper symbol rendering;
authorwenzelm
Sat Jan 09 22:22:17 2016 +0100 (2016-01-09 ago)
changeset 62114a7cf464933f7
parent 62113 16de2a9b5b3d
child 62115 57895801cb57
child 62121 c8a93680b80d
generate HTML version of NEWS, with proper symbol rendering;
Admin/lib/Tools/makedist
NEWS
src/Pure/Tools/news.scala
src/Pure/build-jars
     1.1 --- a/Admin/lib/Tools/makedist	Sat Jan 09 22:00:22 2016 +0100
     1.2 +++ b/Admin/lib/Tools/makedist	Sat Jan 09 22:22:17 2016 +0100
     1.3 @@ -196,6 +196,8 @@
     1.4  
     1.5  rm -rf Admin browser_info heaps
     1.6  
     1.7 +./bin/isabelle java isabelle.NEWS
     1.8 +
     1.9  
    1.10  # create archive
    1.11  
     2.1 --- a/NEWS	Sat Jan 09 22:00:22 2016 +0100
     2.2 +++ b/NEWS	Sat Jan 09 22:22:17 2016 +0100
     2.3 @@ -1,7 +1,7 @@
     2.4  Isabelle NEWS -- history of user-relevant changes
     2.5  =================================================
     2.6  
     2.7 -(Note: Isabelle/jEdit shows a tree-view of this file in Sidekick.)
     2.8 +(Note: Isabelle/jEdit shows a tree-view of the NEWS file in Sidekick.)
     2.9  
    2.10  
    2.11  New in Isabelle2016 (February 2016)
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/src/Pure/Tools/news.scala	Sat Jan 09 22:22:17 2016 +0100
     3.3 @@ -0,0 +1,38 @@
     3.4 +/*  Title:      Pure/Tools/news.scala
     3.5 +    Author:     Makarius
     3.6 +
     3.7 +Support for the NEWS file.
     3.8 +*/
     3.9 +
    3.10 +package isabelle
    3.11 +
    3.12 +
    3.13 +object NEWS
    3.14 +{
    3.15 +  /* generate HTML version */
    3.16 +
    3.17 +  def generate_html()
    3.18 +  {
    3.19 +    val target = Path.explode("~~/doc")
    3.20 +
    3.21 +    File.write(target + Path.explode("NEWS.html"),
    3.22 +      HTML.begin_document("NEWS") +
    3.23 +      "\n<div class=\"source\">\n<pre class=\"source\">" +
    3.24 +      HTML.output(Symbol.decode(File.read(Path.explode("~~/NEWS")))) +
    3.25 +      "</pre>\n" +
    3.26 +      HTML.end_document)
    3.27 +
    3.28 +    for (font <- Path.split(Isabelle_System.getenv_strict("ISABELLE_FONTS")))
    3.29 +      File.copy(font, target)
    3.30 +
    3.31 +    File.copy(Path.explode("~~/etc/isabelle.css"), target)
    3.32 +  }
    3.33 +
    3.34 +
    3.35 +  /* command line entry point */
    3.36 +
    3.37 +  def main(args: Array[String])
    3.38 +  {
    3.39 +    Command_Line.tool0 { generate_html() }
    3.40 +  }
    3.41 +}
     4.1 --- a/src/Pure/build-jars	Sat Jan 09 22:00:22 2016 +0100
     4.2 +++ b/src/Pure/build-jars	Sat Jan 09 22:22:17 2016 +0100
     4.3 @@ -100,6 +100,7 @@
     4.4    Tools/doc.scala
     4.5    Tools/main.scala
     4.6    Tools/ml_statistics.scala
     4.7 +  Tools/news.scala
     4.8    Tools/print_operation.scala
     4.9    Tools/simplifier_trace.scala
    4.10    Tools/task_statistics.scala