src/Pure/Admin/news.scala
author wenzelm
Mon Oct 24 12:01:36 2016 +0200 (2016-10-24)
changeset 64369 6a9816764b37
parent 62114 src/Pure/Tools/news.scala@a7cf464933f7
child 64372 7ffd2be0a1e8
permissions -rw-r--r--
proper Admin tool;
     1 /*  Title:      Pure/Admin/news.scala
     2     Author:     Makarius
     3 
     4 Support for the NEWS file.
     5 */
     6 
     7 package isabelle
     8 
     9 
    10 object NEWS
    11 {
    12   /* generate HTML version */
    13 
    14   def generate_html()
    15   {
    16     val target = Path.explode("~~/doc")
    17 
    18     File.write(target + Path.explode("NEWS.html"),
    19       HTML.begin_document("NEWS") +
    20       "\n<div class=\"source\">\n<pre class=\"source\">" +
    21       HTML.output(Symbol.decode(File.read(Path.explode("~~/NEWS")))) +
    22       "</pre>\n" +
    23       HTML.end_document)
    24 
    25     for (font <- Path.split(Isabelle_System.getenv_strict("ISABELLE_FONTS")))
    26       File.copy(font, target)
    27 
    28     File.copy(Path.explode("~~/etc/isabelle.css"), target)
    29   }
    30 
    31 
    32   /* Isabelle tool wrapper */
    33 
    34   val isabelle_tool =
    35     Isabelle_Tool("news", "generate HTML version of the NEWS file", args =>
    36     {
    37       Command_Line.tool0 { generate_html() }
    38     }, admin = true)
    39 }