-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodelgen.1.html
More file actions
93 lines (93 loc) · 3.07 KB
/
modelgen.1.html
File metadata and controls
93 lines (93 loc) · 3.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<!DOCTYPE html>
<html lang="en-US">
<head>
<title>models</title>
<link rel="stylesheet" href="https://caltechlibrary.github.io/css/site.css">
<link rel="stylesheet" href="https://media.library.caltech.edu/cl-webcomponents/css/code-blocks.css">
<script type="module" src="https://media.library.caltech.edu/cl-webcomponents/copyToClipboard.js"></script>
<script type="module" src="https://media.library.caltech.edu/cl-webcomponents/footer-global.js"></script>
</head>
<body>
<header>
<a href="https://library.caltech.edu"><img src="https://media.library.caltech.edu/assets/caltechlibrary-logo.png" alt="Caltech Library logo"></a>
</header>
<a href="#main-content" class="visually-hidden">skip to main content</a>
<nav>
<ul>
<li><a href="/">All Library Apps</a></li>
<li><a href="index.html">Home</a></li>
<li><a href="LICENSE">LICENSE</a></li>
<li><a href="INSTALL.html">INSTALL</a></li>
<li><a href="user_manual.html">User Manual</a></li>
<li><a href="about.html">About</a></li>
<!-- <li><a href="search.html">Search</a></li> -->
<li><a href="https://github.com/caltechlibary/models">Code Repository</a></li>
</ul>
</nav>
<section id="main-content">
<h1 id="name">NAME</h1>
<p>modelgen</p>
<h1 id="synopsis">SYNOPSIS</h1>
<p>modelgen <a href="#options">OPTIONS</a> ACTION [MODEL_NAME]
[OUT_NAME]</p>
<h1 id="description">DESCRIPTION</h1>
<p>modelgen is a demonstration of the models package for Go. It can read
a model expressed as YAML and transform the result into an HTML web form
or SQLite3 database schema.</p>
<p>MODEL_NAME is the name of the YAML file to read. If no filename is
provided then the model is read from standard input.</p>
<p>OUT_NAME is the name of the file to write. If it is loft off then
then standard out is used.</p>
<h1 id="action">ACTION</h1>
<p>An action can be “model”, “html” or “sqlite”. Actions result in a
file or content generation rendering a model.</p>
<dl>
<dt>model MODEL_NAME</dt>
<dd>
This action is an interactive modeler. It generates YAML file holding
the model. MODEL_NAME is required is used as the filename for the model.
</dd>
<dt>html</dt>
<dd>
This action will render a YAML model as HTML. If no MODEL_NAME is
provided then the YAML is read from standard input.
</dd>
<dt>sqlite</dt>
<dd>
This action will render a SQL file suitable for use with SQLite 3.
</dd>
<dt>typescript</dt>
<dd>
This action will render a TypeScript class definition
</dd>
<dt>python</dt>
<dd>
This action with render a Python class definition
</dd>
</dl>
<h1 id="options">OPTIONS</h1>
<dl>
<dt>-help</dt>
<dd>
Display help
</dd>
<dt>-version</dt>
<dd>
Display modelgen version.
</dd>
<dt>-license</dt>
<dd>
Display modelgen license.
</dd>
</dl>
<h1 id="example">EXAMPLE</h1>
<p>In this example we create a new model YAML file interactively using
the “model” action. Then create an HTML page followed by SQL file
holding the SQL schema for SQLite 3.</p>
<pre><code>modelgen model guestbook.yaml
modelgen html guestbook.yaml guestbook.html
modelgen sqlite guestbook.yaml guestbook.sql</code></pre>
</section>
<footer-global></footer-global>
</body>
</html>