proper Admin tool;
authorwenzelm
Mon Oct 24 12:01:36 2016 +0200 (2016-10-24)
changeset 643696a9816764b37
parent 64368 364d74ea985f
child 64370 865b39487b5d
proper Admin tool;
Admin/lib/Tools/makedist
src/Pure/Admin/news.scala
src/Pure/System/isabelle_tool.scala
src/Pure/Tools/news.scala
src/Pure/build-jars
     1.1 --- a/Admin/lib/Tools/makedist	Mon Oct 24 11:48:32 2016 +0200
     1.2 +++ b/Admin/lib/Tools/makedist	Mon Oct 24 12:01:36 2016 +0200
     1.3 @@ -199,7 +199,7 @@
     1.4  
     1.5  rm -rf Admin browser_info heaps
     1.6  
     1.7 -./bin/isabelle java isabelle.NEWS
     1.8 +./bin/isabelle news
     1.9  
    1.10  rmdir "$USER_HOME/.isabelle/${DISTNAME}-build"
    1.11  rmdir "$USER_HOME/.isabelle/${DISTNAME}"
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/src/Pure/Admin/news.scala	Mon Oct 24 12:01:36 2016 +0200
     2.3 @@ -0,0 +1,39 @@
     2.4 +/*  Title:      Pure/Admin/news.scala
     2.5 +    Author:     Makarius
     2.6 +
     2.7 +Support for the NEWS file.
     2.8 +*/
     2.9 +
    2.10 +package isabelle
    2.11 +
    2.12 +
    2.13 +object NEWS
    2.14 +{
    2.15 +  /* generate HTML version */
    2.16 +
    2.17 +  def generate_html()
    2.18 +  {
    2.19 +    val target = Path.explode("~~/doc")
    2.20 +
    2.21 +    File.write(target + Path.explode("NEWS.html"),
    2.22 +      HTML.begin_document("NEWS") +
    2.23 +      "\n<div class=\"source\">\n<pre class=\"source\">" +
    2.24 +      HTML.output(Symbol.decode(File.read(Path.explode("~~/NEWS")))) +
    2.25 +      "</pre>\n" +
    2.26 +      HTML.end_document)
    2.27 +
    2.28 +    for (font <- Path.split(Isabelle_System.getenv_strict("ISABELLE_FONTS")))
    2.29 +      File.copy(font, target)
    2.30 +
    2.31 +    File.copy(Path.explode("~~/etc/isabelle.css"), target)
    2.32 +  }
    2.33 +
    2.34 +
    2.35 +  /* Isabelle tool wrapper */
    2.36 +
    2.37 +  val isabelle_tool =
    2.38 +    Isabelle_Tool("news", "generate HTML version of the NEWS file", args =>
    2.39 +    {
    2.40 +      Command_Line.tool0 { generate_html() }
    2.41 +    }, admin = true)
    2.42 +}
     3.1 --- a/src/Pure/System/isabelle_tool.scala	Mon Oct 24 11:48:32 2016 +0200
     3.2 +++ b/src/Pure/System/isabelle_tool.scala	Mon Oct 24 12:01:36 2016 +0200
     3.3 @@ -105,6 +105,7 @@
     3.4        Check_Sources.isabelle_tool,
     3.5        Doc.isabelle_tool,
     3.6        ML_Process.isabelle_tool,
     3.7 +      NEWS.isabelle_tool,
     3.8        Options.isabelle_tool,
     3.9        Profiling_Report.isabelle_tool,
    3.10        Remote_DMG.isabelle_tool,
     4.1 --- a/src/Pure/Tools/news.scala	Mon Oct 24 11:48:32 2016 +0200
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,38 +0,0 @@
     4.4 -/*  Title:      Pure/Tools/news.scala
     4.5 -    Author:     Makarius
     4.6 -
     4.7 -Support for the NEWS file.
     4.8 -*/
     4.9 -
    4.10 -package isabelle
    4.11 -
    4.12 -
    4.13 -object NEWS
    4.14 -{
    4.15 -  /* generate HTML version */
    4.16 -
    4.17 -  def generate_html()
    4.18 -  {
    4.19 -    val target = Path.explode("~~/doc")
    4.20 -
    4.21 -    File.write(target + Path.explode("NEWS.html"),
    4.22 -      HTML.begin_document("NEWS") +
    4.23 -      "\n<div class=\"source\">\n<pre class=\"source\">" +
    4.24 -      HTML.output(Symbol.decode(File.read(Path.explode("~~/NEWS")))) +
    4.25 -      "</pre>\n" +
    4.26 -      HTML.end_document)
    4.27 -
    4.28 -    for (font <- Path.split(Isabelle_System.getenv_strict("ISABELLE_FONTS")))
    4.29 -      File.copy(font, target)
    4.30 -
    4.31 -    File.copy(Path.explode("~~/etc/isabelle.css"), target)
    4.32 -  }
    4.33 -
    4.34 -
    4.35 -  /* command line entry point */
    4.36 -
    4.37 -  def main(args: Array[String])
    4.38 -  {
    4.39 -    Command_Line.tool0 { generate_html() }
    4.40 -  }
    4.41 -}
     5.1 --- a/src/Pure/build-jars	Mon Oct 24 11:48:32 2016 +0200
     5.2 +++ b/src/Pure/build-jars	Mon Oct 24 12:01:36 2016 +0200
     5.3 @@ -18,6 +18,7 @@
     5.4    Admin/ci_api.scala
     5.5    Admin/ci_profile.scala
     5.6    Admin/isabelle_cronjob.scala
     5.7 +  Admin/news.scala
     5.8    Admin/other_isabelle.scala
     5.9    Admin/remote_dmg.scala
    5.10    Concurrent/consumer_thread.scala
    5.11 @@ -127,7 +128,6 @@
    5.12    Tools/ml_console.scala
    5.13    Tools/ml_process.scala
    5.14    Tools/ml_statistics.scala
    5.15 -  Tools/news.scala
    5.16    Tools/print_operation.scala
    5.17    Tools/profiling_report.scala
    5.18    Tools/simplifier_trace.scala