Skip to content

Commit 8a6bab1

Browse files
author
arctrong
committed
Writing work metadata added
1 parent d539a52 commit 8a6bab1

File tree

6 files changed

+40
-1
lines changed

6 files changed

+40
-1
lines changed

doc/content/sections/reference.html

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,24 @@ <h1 id="argument-file-structure">Argument file structure</h1>
287287
</thead>
288288
<tbody>
289289
<tr>
290+
<td>title*</td>
291+
<td>string</td>
292+
<td align="center">No</td>
293+
<td>Writing work title</td>
294+
</tr>
295+
<tr>
296+
<td>logo*</td>
297+
<td>string</td>
298+
<td align="center">No</td>
299+
<td>Logo image (relative the the project root)</td>
300+
</tr>
301+
<tr>
302+
<td>home-page*</td>
303+
<td>string</td>
304+
<td align="center">No</td>
305+
<td>Writing work start page (relative the the project root)</td>
306+
</tr>
307+
<tr>
290308
<td><a href="#options_section">options</a></td>
291309
<td>object</td>
292310
<td align="center">No</td>
@@ -312,6 +330,8 @@ <h1 id="argument-file-structure">Argument file structure</h1>
312330
</tr>
313331
</tbody>
314332
</table>
333+
<p>* As for now, the "title", "logo" and "home-page" properties are not processed by the program.
334+
This metadata may be used by other programs, e.g., for cataloguing purpose.</p>
315335
<p><a name="options_section"></a></p>
316336
<h2 id="options-section"><code>options</code> section</h2>
317337
<p><a href="#section_list"><img alt="" src="../../pict/triangle_up_h18px.png" /></a> <a href="#section_list">to section list</a></p>

doc_src/sections/reference.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,17 +185,23 @@ _Argument file_ format is JSON [<!--ref json-->].
185185
For example, if `"plugins"` is replaced with `"plugins1"` then all plugins will be disabled.
186186
Still the _argument file_ format defines necessary elements and other rules that will
187187
be checked before processing.
188-
188+
189189
<a name="section_list"></a>
190190
The following is the detailed _argument file_ format description by sections:
191191

192192
Name | Type | Required | Description
193193
---- | ---- | :----: | ----
194+
title\* | string | No | Writing work title
195+
logo\* | string | No | Logo image (relative the the project root)
196+
home-page\* | string | No | Writing work start page (relative the the project root)
194197
[options](#options_section) | object | No | Options for the whole program run
195198
[default](#default_section) | object | No | Default options for the documents
196199
[documents](#documents_section) | array of objects | Yes | Documents that will be processed
197200
[plugins](#plugins_section) | object | No | Plugins that will be used for the documents processing
198201

202+
\* As for now, the "title", "logo" and "home-page" properties are not processed by the program.
203+
This metadata may be used by other programs, e.g., for cataloguing purpose.
204+
199205

200206
<a name="options_section"></a>
201207
## `options` section

java/src/main/java/world/md2html/options/model/raw/ArgFileRaw.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
@Builder(toBuilder = true)
1414
@JsonDeserialize(builder = ArgFileRaw.ArgFileRawBuilder.class)
1515
public class ArgFileRaw {
16+
String title;
17+
String logo;
18+
@JsonProperty("home-page")
19+
String homePage;
1620
ArgFileOptionsRaw options;
1721
@JsonProperty("default")
1822
ArgFileDocumentRaw defaultSection;

java/src/main/resources/args_file_schema.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
"$schema": "http://json-schema.org/draft-04/schema#",
33
"type": "object",
44
"properties": {
5+
"title": { "type": "string" },
6+
"logo": { "type": "string" },
7+
"home-page": { "type": "string" },
58
"options": {
69
"type": "object",
710
"properties": {

md2html_args.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
"title": "MD2HTML",
3+
"logo": "doc/favicon.png",
4+
"home-page": "readme.html",
25
"options": {
36
"verbose": true
47
},

python/args_file_schema.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
"$schema": "http://json-schema.org/draft-04/schema#",
33
"type": "object",
44
"properties": {
5+
"title": { "type": "string" },
6+
"logo": { "type": "string" },
7+
"home-page": { "type": "string" },
58
"options": {
69
"type": "object",
710
"properties": {

0 commit comments

Comments
 (0)