aboutsummaryrefslogtreecommitdiffhomepage
path: root/data/doc/sisu/markup-samples/sisu_manual/sisu_commands.sst
blob: 1c5c1cec069d5510b9e674f3a751a7c046ee75f4 (plain)
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
% SiSU 4.0

@title: SiSU
 :subtitle: Commands

@creator:
 :author: Amissah, Ralph

@date:
 :created: 2002-08-28
 :issued: 2002-08-28
 :available: 2002-08-28
 :published: 2007-09-16
 :modified: 2012-10-03

@rights:
 :copyright: Copyright (C) Ralph Amissah 2012
 :license: GPL 3 (part of SiSU documentation)

@classify:
 :topic_register: electronic documents:SiSU:document:commands;SiSU:manual:commands;electronic documents:SiSU:manual:commands;SiSU:document:commands;SiSU:document:commands
 :subject: ebook, epublishing, electronic book, electronic publishing, electronic document, electronic citation, data structure, citation systems, search

:A~? @title @creator

:B~? SiSU Commands

1~commands Commands Summary

2~ Description

SiSU is a document publishing system, that from a simple single marked-up document, produces multiple output formats including: plaintext, HTML, XHTML, XML, EPUB, ODT (OpenDocument (ODF) text), LaTeX, PDF, info, and SQL (PostgreSQL and SQLite), which share text object numbers ("object citation numbering") and the same document structure information. For more see: http://sisudoc.org or http://www.jus.uio.no/sisu

% 2~ Summary of man page

% This man page covers a number of subjects in brief, including: document processing command flags; document markup (basic markup and headers); configuration files; directory structure; skins; document naming; interactive help and other information.

2~ Document Processing Command Flags

!_ -a [filename/wildcard] \\
produces plaintext with Unix linefeeds and without markup, (object numbers are omitted), has footnotes at end of each paragraph that contains them [ -A for equivalent dos (linefeed) output file] [see -e for endnotes]. (Options include: --endnotes for endnotes --footnotes for footnotes at the end of each paragraph --unix for unix linefeed (default) --msdos for msdos linefeed)

!_ -b [filename/wildcard] \\
see --xhtml

!_ --by-* \\
see --output-by-*

!_ -C \\
configure/initialise shared output directory files initialize shared output directory (config files such as css and dtd files are not updated if they already exist unless modifier is used). -C --init-site configure/initialise site more extensive than -C on its own, shared output directory files/force update, existing shared output config files such as css and dtd files are updated if this modifier is used.

!_ -CC \\
see --configure

!_ -c [filename/wildcard] \\
see --color-toggle

!_ --color \\
see --color-on

!_ --color-off \\
turn off color in output to terminal

!_ --color-on \\
turn on color in output to terminal

!_ --color-toggle [filename/wildcard] \\
screen toggle ansi screen colour on or off depending on default set (unless -c flag is used: if sisurc colour default is set to 'true', output to screen will be with colour, if sisurc colour default is set to 'false' or is undefined screen output will be without colour). Alias -c

!_ --configure \\
configure/initialise shared output directory files initialize shared output directory (config files such as css and dtd files are not updated if they already exist unless modifier is used). The equivalent of: -C --init-site configure/initialise site, more extensive than -C on its own, shared output directory files/force update, existing shared output config files such as css and dtd files are updated if -CC is used.

!_ --concordance [filename/wildcard] \\
produces concordance (wordmap) a rudimentary index of all the words in a document. (Concordance files are not generated for documents of over 260,000 words unless this limit is increased in the file sisurc.yml). Alias -w

!_ -D [instruction] [filename] \\
see --pg

!_ -d [--db-[database type (sqlite|pg)]] --[instruction] [filename] \\
see --sqlite

!_ --dal [filename/wildcard/url] \\
assumed for most other flags, creates new intermediate files for processing (document abstraction) that is used in all subsequent processing of other output. This step is assumed for most processing flags. To skip it see -n. Alias -m

!_ --delete [filename/wildcard] \\
see --zap

!_ --dump[=directory_path] [filename/wildcard] \\
places output in directory specified, if none is specified in the current directory (pwd). Unlike using default settings HTML files have embedded css. Compare --redirect

!_ -e [filename/wildcard] \\
see --epub

!_ --epub [filename/wildcard] \\
produces an epub document, [sisu version >=2 ] (filename.epub). Alias -e

!_ --exc-* \\
exclude output feature, overrides configuration settings
 --exc-ocn, (exclude object citation numbering, (switches off object citation numbering), affects html (seg, scroll), epub, xhtml, xml, pdf);
 --exc-toc, (exclude table of contents, affects html (scroll), epub, pdf);
 --exc-links-to-manifest, --exc-manifest-links, (exclude links to manifest, affects html (seg, scroll));
 --exc-search-form, (exclude search form, affects html (seg, scroll), manifest);
 --exc-minitoc, (exclude mini table of contents, affects html (seg), concordance, manifest);
 --exc-manifest-minitoc, (exclude mini table of contents, affects manifest);
 --exc-html-minitoc, (exclude mini table of contents, affects html (seg), concordance);
 --exc-html-navigation, (exclude navigation, affects html (seg));
 --exc-html-navigation-bar, (exclude navigation bar, affects html (seg));
 --exc-html-search-form, (exclude search form, affects html (seg, scroll));
 --exc-html-right-pane, (exclude right pane/column, affects html (seg, scroll));
 --exc-html-top-band, (exclude top band, affects html (seg, scroll), concordance (minitoc forced on to provide seg navigation));
 --exc-segsubtoc (exclude sub table of contents, affects html (seg), epub);
see also --inc-*

!_ -F [--webserv=webrick] \\
see --sample-search-form

!_ -f [optional string part of filename] \\
see --find

!_ --find [optional string part of filename] \\
without match string, glob all .sst .ssm files in directory (including language subdirectories). With match string, find files that match given string in directory (including language subdirectories). Alias -f, --glob, -G

!_ -G [optional string part of filename] \\
see --find

!_ -g [filename/wildcard] \\
see --git

!_ --git [filename/wildcard] \\
produces or updates markup source file structure in a git repo (experimental and subject to change). Alias -g

!_ --glob [optional string part of filename] \\
see --find

!_ -h [filename/wildcard] \\
see --html

!_ --harvest *.ss[tm] \\
makes two lists of sisu output based on the sisu markup documents in a directory: list of author and authors works (year and titles), and; list by topic with titles and author. Makes use of header metadata fields (author, title, date, topic_register). Can be used with maintenance (-M) and remote placement (-R) flags.

!_ --help [topic] \\
provides help on the selected topic, where topics (keywords) include: list, (com)mands, short(cuts), (mod)ifiers, (env)ironment, markup, syntax, headers, headings, endnotes, tables, example, customise, skin, (dir)ectories, path, (lang)uage, db, install, setup, (conf)igure, convert, termsheet, search, sql, features, license.

!_ --html [filename/wildcard] \\
produces html output, in two forms (i) segmented text with table of contents (toc.html and index.html) and (ii) the document in a single file (scroll.html). Alias -h

!_ --html-scroll [filename/wildcard] \\
produces html output, the document in a single file (scroll.html) only. Compare --html-seg and --html

!_ --html-seg [filename/wildcard] \\
produces html output, segmented text with table of contents (toc.html and index.html). Compare --html-scroll and --html

!_ -I [filename/wildcard] \\
see --texinfo

!_ -i [filename/wildcard] \\
see --manpage

!_ --inc-* \\
include output feature, overrides configuration settings, (usually the default if none set), has precedence over --exc-* (exclude output feature). Some detail provided under --exc-*,
see --exc-*

!_ -j [filename/wildcard] \\
copies images associated with a file for use by html, xhtml & xml outputs (automatically invoked by --dump & redirect).

!_ -k \\
see --color-off

!_ --keep-processing-files [filename/wildcard/url] \\
see --maintenance

!_ -M [filename/wildcard/url] \\
see --maintenance

!_ -m [filename/wildcard/url] \\
see --dal (document abstraction level/layer)

!_ --machine [filename/wildcard/url] \\
see --dal (document abstraction level/layer)

!_ --maintenance [filename/wildcard/url] \\
maintenance mode, interim processing files are preserved and their locations indicated. (also see -V). Aliases -M and --keep-processing-files.

!_ --manpage [filename/wildcard] \\
produces man page of file, not suitable for all outputs. Alias -i

!_ -N [filename/wildcard/url] \\
document digest or document content certificate ( DCC ) as md5 digest tree of the document: the digest for the document, and digests for each object contained within the document (together with information on software versions that produced it) (digest.txt). -NV for verbose digest output to screen.

!_ -n [filename/wildcard/url] \\
skip the creation of intermediate processing files (document abstraction) if they already exist, this skips the equivalent of -m which is otherwise assumed by most processing flags.

!_ --no-* \\
see --exc-*

!_ -o [filename/wildcard/url] \\
see --odt

!_ --odf [filename/wildcard/url] \\
see --odt

!_ --odt [filename/wildcard/url] \\
output basic document in opendocument file format (opendocument.odt). Alias -o

!_ --output-by-* \\
select output directory structure from 3 alternatives:
--output-by-language, (language directory (based on language code) with filetype (html, epub, pdf etc.) subdirectories);
--output-by-filetype, (filetype directories with language code as part of filename);
--output-by-filename, (filename directories with language code as part of filename).
This is configurable. Alias --by-*

!_ -P [language_directory/filename language_directory] \\
see --po4a

!_ -p [filename/wildcard] \\
see --pdf

!_ --papersize-(a4|a5|b5|letter|legal) \\
in conjunction with --pdf set pdf papersize, overriding any configuration settings, to set more than one papersize repeat the option --pdf --papersize-a4 --papersize-letter. See also --papersize=*

!_ --papersize=a4,a5,b5,letter,legal
in conjunction with --pdf set pdf papersize, overriding any configuration settings, to set more than one papersize list after the equal sign with a comma separator --papersize=a4,letter. See also --papersize-*

!_ --pdf [filename/wildcard] \\
produces LaTeX pdf (portrait.pdf & landscape.pdf). Orientation and papersize may be set on the command-line. Default paper size is set in config file, or document header, or provided with additional command line parameter, e.g. --papersize-a4 preset sizes include: 'A4', U.S. 'letter' and 'legal' and book sizes 'A5' and 'B5' (system defaults to A4), and; --landscape or --portrait, so: e.g. "sisu --pdf-a4 --pdf-letter --landscape --verbose [filename/wildcard]" or "sisu --pdf --landscape --a4 --letter --verbose [filename/wildcard]". --pdf defaults to both landscape & portrait output, and a4 if no other papersizes are configured. Related options --pdf-landscape --pdf-portrait --pdf-papersize-* --pdf-papersize=[list]. Alias -p

!_ --pdf-l [filename/wildcard] \\
See --pdf-landscape

!_ --pdf-landscape [filename/wildcard] \\
sets orientation, produces LaTeX pdf landscape.pdf. Default paper size is set in config file, or document header, or provided with additional command line parameter, e.g. --papersize-a4 preset sizes include: 'A4', U.S. 'letter' and 'legal' and book sizes 'A5' and 'B5' (system defaults to A4). Related options --pdf --pdf-portrait. See also --papersize-* or --papersize=[list]. Alias --pdf-l or in conjunction with --pdf --landscape

!_ --pdf-p [filename/wildcard] \\
See --pdf-portrait

!_ --pdf-portrait [filename/wildcard] \\
sets orientation, produces LaTeX pdf portrait.pdf.pdf. Default paper size is set in config file, or document header, or provided with additional command line parameter, e.g. --papersize-a4 preset sizes include: 'A4', U.S. 'letter' and 'legal' and book sizes 'A5' and 'B5' (system defaults to A4). Related options --pdf --pdf-landscape. See also --papersize-* or --papersize=[list]. Alias --pdf-p or in conjunction with --pdf --portrait

!_ --pg [instruction] [filename] \\
database PostgreSQL ( --pgsql may be used instead) possible instructions, include: --createdb; --create; --dropall; --import [filename]; --update [filename]; --remove [filename]; see database section below. Alias -D

!_ --po [language_directory/filename language_directory] \\
see --po4a

!_ --po4a [language_directory/filename language_directory] \\
produces .pot and po files for the file in the languages specified by the language directory. SiSU markup is placed in subdirectories named with the language code, e.g. en/ fr/ es/. The sisu config file must set the output directory structure to multilingual. v3, experimental

!_ -Q [filename/wildcard] \\
see --qrcode

!_ -q [filename/wildcard] \\
see --quiet

!_ --qrcode [filename/wildcard] \\
generate QR code image of metadata (used in manifest). v3 only.

!_ --quiet [filename/wildcard] \\
quiet less output to screen.

!_ -R [filename/wildcard] \\
see --rsync

!_ -r [filename/wildcard] \\
see --scp

!_ --redirect[=directory_path] [filename/wildcard] \\
places output in subdirectory under specified directory, subdirectory uses the filename (without the suffix). If no output directory is specified places the subdirectory under the current directory (pwd). Unlike using default settings HTML files have embedded css. Compare --dump

!_ --rsync [filename/wildcard] \\
copies sisu output files to remote host using rsync. This requires that sisurc.yml has been provided with information on hostname and username, and that you have your "keys" and ssh agent in place. Note the behavior of rsync different if -R is used with other flags from if used alone. Alone the rsync --delete parameter is sent, useful for cleaning the remote directory (when -R is used together with other flags, it is not). Also see --scp. Alias -R

!_ -S \\
see --sisupod

!_ -S [filename/wildcard] \\
see --sisupod

!_ -s [filename/wildcard] \\
see --source

!_ --sample-search-form [--webserv=webrick] \\
generate examples of (naive) cgi search form for SQLite and PgSQL depends on your already having used sisu to populate an SQLite and/or PgSQL database, (the SQLite version scans the output directories for existing sisu_sqlite databases, so it is first necessary to create them, before generating the search form) see -d -D and the database section below. If the optional parameter --webserv=webrick is passed, the cgi examples created will be set up to use the default port set for use by the webrick server, (otherwise the port is left blank and the system setting used, usually 80). The samples are dumped in the present work directory which must be writable, (with screen instructions given that they be copied to the cgi-bin directory). Alias -F

!_ --scp [filename/wildcard] \\
copies sisu output files to remote host using scp. This requires that sisurc.yml has been provided with information on hostname and username, and that you have your "keys" and ssh agent in place. Also see --rsync. Alias -r

!_ --sqlite --[instruction] [filename] \\
database type set to SQLite, this produces one of two possible databases, without additional database related instructions it produces a discreet SQLite file for the document processed; with additional instructions it produces a common SQLite database of all processed documents that (come from the same document preparation directory and as a result) share the same output directory base path (possible instructions include: --createdb; --create; --dropall; --import [filename]; --update [filename]; --remove [filename]); see database section below. Alias -d

!_ --sisupod \\
produces a sisupod a zipped sisu directory of markup files including sisu markup source files and the directories local configuration file, images and skins. Note: this only includes the configuration files or skins contained in ./_sisu not those in ~/.sisu -S [filename/wildcard] option. Note: (this option is tested only with zsh). Alias -S

!_ --sisupod [filename/wildcard] \\
produces a zipped file of the prepared document specified along with associated images, by default named sisupod.zip they may alternatively be named with the filename extension .ssp This provides a quick way of gathering the relevant parts of a sisu document which can then for example be emailed. A sisupod includes sisu markup source file, (along with associated documents if a master file, or available in multilingual versions), together with related images and skin. SiSU commands can be run directly against a sisupod contained in a local directory, or provided as a url on a remote site. As there is a security issue with skins provided by other users, they are not applied unless the flag --trust or --trusted is added to the command instruction, it is recommended that file that are not your own are treated as untrusted. The directory structure of the unzipped file is understood by sisu, and sisu commands can be run within it. Note: if you wish to send multiple files, it quickly becomes more space efficient to zip the sisu markup directory, rather than the individual files for sending). See the -S option without [filename/wildcard]. Alias -S

!_ --source [filename/wildcard] \\
copies sisu markup file to output directory. Alias -s

!_ -T [filename/wildcard (*.termsheet.rb)] \\
standard form document builder, preprocessing feature

!_ -t [filename/wildcard] \\
see --txt

!_ --texinfo [filename/wildcard] \\
produces texinfo and info file, (view with pinfo). Alias -I

!_ --txt [filename/wildcard] \\
produces plaintext with Unix linefeeds and without markup, (object numbers are omitted), has footnotes at end of each paragraph that contains them [ -A for equivalent dos (linefeed) output file] [see -e for endnotes]. (Options include: --endnotes for endnotes --footnotes for footnotes at the end of each paragraph --unix for unix linefeed (default) --msdos for msdos linefeed). Alias -t

!_ -U [filename/wildcard] \\
see --urls

!_ -u [filename/wildcard] \\
provides url mapping of output files for the flags requested for processing, also see -U

!_ --urls [filename/wildcard] \\
prints url output list/map for the available processing flags options and resulting files that could be requested, (can be used to get a list of processing options in relation to a file, together with information on the output that would be produced), -u provides url output mapping for those flags requested for processing. The default assumes sisu_webrick is running and provides webrick url mappings where appropriate, but these can be switched to file system paths in sisurc.yml. Alias -U

!_ -V \\
on its own, provides SiSU version and environment information (sisu --help env)

!_ -V [filename/wildcard] \\
even more verbose than the -v flag.

!_ -v \\
on its own, provides SiSU version information

!_ -v [filename/wildcard] \\
see --verbose

!_ --v3 [filename/wildcard] \\
invokes the sisu v3 document parser/generator. You may run sisu3 instead.

!_ --v4 [filename/wildcard] \\
invokes the sisu v4 document parser/generator. This is the default and is normally omitted.

!_ --verbose [filename/wildcard] \\
provides verbose output of what is being generated, where output is placed (and error messages if any), as with -u flag provides a url mapping of files created for each of the processing flag requests. Alias -v

!_ -W \\
see --webrick

!_ -w [filename/wildcard] \\
see --concordance

!_ --webrick \\
starts ruby's webrick webserver points at sisu output directories, the default port is set to 8081 and can be changed in the resource configuration files. [tip: the webrick server requires link suffixes, so html output should be created using the -h option rather than -H ; also, note -F webrick ]. Alias -W

!_ --wordmap [filename/wildcard] \\
see --concordance

!_ --xhtml [filename/wildcard] \\
produces xhtml/XML output for browser viewing (sax parsing). Alias -b

!_ --xml-dom [filename/wildcard] \\
produces XML output with deep document structure, in the nature of dom. Alias -X

!_ --xml-sax [filename/wildcard] \\
produces XML output shallow structure (sax parsing). Alias -x

!_ -X [filename/wildcard] \\
see --xml-dom

!_ -x [filename/wildcard] \\
see --xml-sax

!_ -Y [filename/wildcard] \\
produces a short sitemap entry for the document, based on html output and the sisu_manifest. --sitemaps generates/updates the sitemap index of existing sitemaps. (Experimental, [g,y,m announcement this week])

!_ -y [filename/wildcard] \\
produces an html summary of output generated (hyperlinked to content) and document specific metadata (sisu_manifest.html). This step is assumed for most processing flags.

!_ -Z [filename/wildcard] \\
see --zap

!_ --zap [filename/wildcard] \\
Zap, if used with other processing flags deletes output files of the type about to be processed, prior to processing. If -Z is used as the lone processing related flag (or in conjunction with a combination of -[mMvVq]), will remove the related document output directory. Alias -Z

1~command_modifiers command line modifiers

!_ --no-ocn \\
[with --html --pdf or --epub] switches off object citation numbering. Produce output without identifying numbers in margins of html or LaTeX/pdf output.

!_ --no-annotate \\
strips output text of editor endnotes~[* square brackets ]~ denoted by asterisk or dagger/plus sign

!_ --no-asterisk \\
strips output text of editor endnotes~[* square brackets ]~ denoted by asterisk sign

!_ --no-dagger \\
strips output text of editor endnotes~[+ square brackets ]~ denoted by dagger/plus sign

1~commands_database database commands

!_ dbi - database interface

!_ -D or --pgsql
set for PostgreSQL
!_ -d or --sqlite
default set for SQLite -d is modifiable with --db=[database type (PgSQL or SQLite)]

!_ --pg -v --createall \\
initial step, creates required relations (tables, indexes) in existing PostgreSQL database (a database should be created manually and given the same name as working directory, as requested) (rb.dbi) [ -dv --createall SQLite equivalent] it may be necessary to run sisu -Dv --createdb initially NOTE: at the present time for PostgreSQL it may be necessary to manually create the database. The command would be 'createdb [database name]' where database name would be SiSU_[present working directory name (without path)]. Please use only alphanumerics and underscores.

!_ --pg -v --import \\
[filename/wildcard] imports data specified to PostgreSQL db (rb.dbi) [ -dv --import SQLite equivalent]

!_ --pg -v --update \\
[filename/wildcard] updates/imports specified data to PostgreSQL db (rb.dbi) [ -dv --update SQLite equivalent]

!_ --pg --remove \\
[filename/wildcard] removes specified data to PostgreSQL db (rb.dbi) [ -d --remove SQLite equivalent]

!_ --pg --dropall \\
kills data" and drops (PostgreSQL or SQLite) db, tables & indexes [ -d --dropall SQLite equivalent]

The -v is for verbose output.

1~command_shorcuts Shortcuts, Shorthand for multiple flags

!_ --update [filename/wildcard] \\
Checks existing file output and runs the flags required to update this output. This means that if only html and pdf output was requested on previous runs, only the -hp files will be applied, and only these will be generated this time, together with the summary. This can be very convenient, if you offer different outputs of different files, and just want to do the same again.

!_ -0 to -5 [filename or wildcard] \\
Default shorthand mappings (for v3, note that the defaults can be changed/configured in the sisurc.yml file):

!_ -0 \\
-NQhewpotbxXyYv [this is the default action run when no options are give, i.e. on 'sisu [filename]']

!_ -1 \\
-Qhewpoty

!_ -2 \\
-NQhewpotbxXy

!_ -3 \\
-NQhewpotbxXyY

!_ -4 \\
-NQhewpotbxXDyY --update

!_ -5 \\
-NQhewpotbxXDyYv --update

add -v for verbose mode and -c to toggle color state, e.g. sisu -2vc [filename or wildcard]

consider -u for appended url info or -v for verbose output

2~ Command Line with Flags - Batch Processing

In the data directory run sisu -mh filename or wildcard eg. "sisu -h cisg.sst" or "sisu -h *.{sst,ssm}" to produce html version of all documents.

Running sisu (alone without any flags, filenames or wildcards) brings up the interactive help, as does any sisu command that is not recognised. Enter to escape.