diff -r 23c6ae3dd3a0 -r ac82ee617a75 src/Doc/System/Sessions.thy --- a/src/Doc/System/Sessions.thy Tue May 08 15:41:52 2018 +0200 +++ b/src/Doc/System/Sessions.thy Tue May 08 20:24:08 2018 +0200 @@ -545,4 +545,50 @@ @{verbatim [display] \isabelle imports -U -i -D 'some/where/My_Project'\} \ + +section \Retrieve theory exports\ + +text \ + The @{tool_def "export"} tool retrieves theory exports from the session + database. Its command-line usage is: @{verbatim [display] +\Usage: isabelle export [OPTIONS] SESSION + + Options are: + -D DIR target directory for exported files (default: "export") + -d DIR include session directory + -l list exports + -n no build of session + -o OPTION override Isabelle system OPTION (via NAME=VAL or NAME) + -s system build mode for session image + -x PATTERN extract files matching pattern (e.g. "*:**" for all) + + List or export theory exports for SESSION: named blobs produced by + isabelle build. Option -l or -x is required. + + The PATTERN language resembles glob patterns in the shell, with ? and * + (both excluding ":" and "/"), ** (excluding ":"), and [abc] or [^abc], + and variants {pattern1,pattern2,pattern3}.\} + + \<^medskip> + The specified session is updated via @{tool build} + (\secref{sec:tool-build}), with the same options \<^verbatim>\-d\, \<^verbatim>\-o\, \<^verbatim>\-s\. The + option \<^verbatim>\-n\ suppresses the implicit build process: it means that a + potentially outdated session database is used! + + \<^medskip> + Option \<^verbatim>\-l\ lists all stored exports, with compound names + \theory\\<^verbatim>\:\\name\. + + \<^medskip> + Option \<^verbatim>\-x\ extracts stored exports whose compound name matches the given + pattern. Note that wild cards ``\<^verbatim>\?\'' and ``\<^verbatim>\*\'' do not match the + separators ``\<^verbatim>\:\'' and ``\<^verbatim>\/\''; the wild card \<^verbatim>\**\ matches over directory + name hierarchies separated by ``\<^verbatim>\/\''. Thus the pattern ``\<^verbatim>\*:**\'' matches + \<^emph>\all\ theory exports. + + Option \<^verbatim>\-D\ specifies an alternative base directory for option \<^verbatim>\-x\: the + default is \<^verbatim>\export\ within the current directory. Each theory creates its + own sub-directory hierarchy, using the session-qualified theory name. +\ + end