Fossil SCM

Added web pages to the info file. Only the settings page now missing, however the output is butt-ugly. The .texi will need to be seriously massaged to get good looking info output.

brickviking 2024-12-25 13:18 bv-infotool
Commit a71499a27f57540df5046a95d45c6655440a89cdda33fe8bd13318b4f5dd59f5
1 file changed +80 -3
--- tools/fossil-makeinfo
+++ tools/fossil-makeinfo
@@ -84,10 +84,11 @@
8484
@menu
8585
* Fossil:: Introduction and features listed from the website front page.
8686
* Common commands:: These are the commands that are most likely to be used.
8787
* Uncommon commands:: These aren't used as often, but they're still there when needed.
8888
* Test commands:: These are definitely not recommended for production use.
89
+* Web commands:: Available webpage help.
8990
* Common arguments:: arguments common to all commands.
9091
* License:: The license agreement of the fossil project.
9192
@end menu
9293
9394
Help is available for any of the available fossil commands by using:
@@ -266,11 +267,11 @@
266267
cat workfile >> fossil.texi
267268
echo "" >> fossil.texi
268269
269270
# Now the test commands. Here be dragons.
270271
echo "List test commands"
271
-echo "@node Test commands,Common arguments,Uncommon commands,Top
272
+echo "@node Test commands,Web commands,Uncommon commands,Top
272273
@chapter Testing commands
273274
274275
These are testing commands, listed by fossil when you run the command:
275276
276277
@example
@@ -280,11 +281,10 @@
280281
They're often used to solve specific little problems that didn't warrant a full
281282
tool, but are useful enough to be kept around. They are most definitely not
282283
supported, and the developers will expect to change these far more often. They
283284
are not stable, so do not depend upon their behavior, or even their existence.
284285
285
-They're
286286
@menu
287287
" >> fossil.texi
288288
289289
# Insert test commands in here
290290
echo "Grab test keywords for menu"
@@ -324,13 +324,90 @@
324324
325325
# ... and adds it to the output file with a spacer line
326326
cat workfile >> fossil.texi
327327
echo "" >> fossil.texi
328328
329
+# Now the webpage content. Here be wild wild web pages.
330
+echo "List web commands"
331
+echo "@node Web commands,Common arguments,Test commands,Top
332
+@chapter Web commands
333
+
334
+These are help pages for the internal web pages, listed by fossil when you run the command:
335
+
336
+@example
337
+fossil help -w
338
+@end example
339
+
340
+All of these can be provided to the URL line on the browser address input like the
341
+example below, that starts from the final / (in this case, /timeline?ms=glob):
342
+
343
+@example
344
+https://fossil.example.com/fossil/timeline?ms=glob
345
+@end example
346
+
347
+@menu
348
+" >> fossil.texi
349
+
350
+# Insert webpage keywords in here
351
+echo "Grab web keywords for menu"
352
+for u in $(for t in $(fossil help -w); do echo "$t"; done | sort); do echo "* ${u}::"; done >> fossil.texi
353
+
354
+
355
+# Now end that menu (Webpages)
356
+echo "@end menu
357
+
358
+" >> fossil.texi
359
+
360
+# Now add all the help from "fossil help -w -v"
361
+# WARNING: tail count is brittle
362
+# sed comands remove the last two lines.
363
+echo "Fossil output webpage help to workfile"
364
+fossil help -w -v | tail -n +4 | sed '$d' | sed '$d' >workfile
365
+
366
+# swap out @ with @@ so texinfo doesn't barf
367
+echo "Doubling up the @'s"
368
+sed -i -e 's/@/@@/g' workfile
369
+
370
+# This swaps out "# keyword" with
371
+# @node keyword
372
+# @unnumbered keyword
373
+# breaks on *BSD's seds, needs gsed there
374
+echo "Swapping out # for @node ... \n@unnumbered ..."
375
+
376
+if [[ ${MYOS} == "Linux" ]]; then
377
+# use a different separator here, as we need to keep /_. in strings
378
+ sed -i -e 's%^##* /\([_.a-z0-9-]\{1,\}\)%@node /\1\n@section /\1\n%' workfile
379
+else
380
+ # We'll assume we're on a BSD here, even though this won't always be true
381
+ gsed -i -e 's%^##* /\([_.a-z0-9-]\{1,\}\)%@node /\1\n@section /\1\n%' workfile
382
+fi
383
+
384
+# This has to be done before swapping --switches because the next command
385
+# adds @option(--switches} and hence reuses the {}.
386
+echo "Swapping out {} for @{ @}"
387
+# swaps out {} for @{ @}
388
+if [[ ${MYOS} == "Linux" ]]; then
389
+ sed -i -e 's/{/@{/g' -e 's/}/@}/g' workfile
390
+else
391
+ gsed -i -e 's/\{/@\{/g' -e 's/\}/@\}/g' workfile
392
+fi
393
+
394
+echo "Swapping out --switches for @option{--switches}"
395
+# turns --switches into @option{--switches}
396
+if [[ ${MYOS} == "Linux" ]]; then
397
+ sed -i -e 's/--\([[:alnum:]-]\{1,\}\)/@option\{--\1\}/g' workfile
398
+else
399
+ gsed -i -e 's/--\([[:alnum:]-]\{1,\}\)/@option\{--\1\}/g' workfile
400
+fi
401
+
402
+# ... and adds it to the output file with a spacer line
403
+cat workfile >> fossil.texi
404
+echo "" >> fossil.texi
405
+
329406
# Add in common args
330407
echo "List common args"
331
-echo "@node Common arguments,License,Test commands,Top
408
+echo "@node Common arguments,License,Web commands,Top
332409
@chapter Common arguments
333410
334411
These are commandline arguments that are common to all fossil commands.
335412
336413
" >> fossil.texi
337414
--- tools/fossil-makeinfo
+++ tools/fossil-makeinfo
@@ -84,10 +84,11 @@
84 @menu
85 * Fossil:: Introduction and features listed from the website front page.
86 * Common commands:: These are the commands that are most likely to be used.
87 * Uncommon commands:: These aren't used as often, but they're still there when needed.
88 * Test commands:: These are definitely not recommended for production use.
 
89 * Common arguments:: arguments common to all commands.
90 * License:: The license agreement of the fossil project.
91 @end menu
92
93 Help is available for any of the available fossil commands by using:
@@ -266,11 +267,11 @@
266 cat workfile >> fossil.texi
267 echo "" >> fossil.texi
268
269 # Now the test commands. Here be dragons.
270 echo "List test commands"
271 echo "@node Test commands,Common arguments,Uncommon commands,Top
272 @chapter Testing commands
273
274 These are testing commands, listed by fossil when you run the command:
275
276 @example
@@ -280,11 +281,10 @@
280 They're often used to solve specific little problems that didn't warrant a full
281 tool, but are useful enough to be kept around. They are most definitely not
282 supported, and the developers will expect to change these far more often. They
283 are not stable, so do not depend upon their behavior, or even their existence.
284
285 They're
286 @menu
287 " >> fossil.texi
288
289 # Insert test commands in here
290 echo "Grab test keywords for menu"
@@ -324,13 +324,90 @@
324
325 # ... and adds it to the output file with a spacer line
326 cat workfile >> fossil.texi
327 echo "" >> fossil.texi
328
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
329 # Add in common args
330 echo "List common args"
331 echo "@node Common arguments,License,Test commands,Top
332 @chapter Common arguments
333
334 These are commandline arguments that are common to all fossil commands.
335
336 " >> fossil.texi
337
--- tools/fossil-makeinfo
+++ tools/fossil-makeinfo
@@ -84,10 +84,11 @@
84 @menu
85 * Fossil:: Introduction and features listed from the website front page.
86 * Common commands:: These are the commands that are most likely to be used.
87 * Uncommon commands:: These aren't used as often, but they're still there when needed.
88 * Test commands:: These are definitely not recommended for production use.
89 * Web commands:: Available webpage help.
90 * Common arguments:: arguments common to all commands.
91 * License:: The license agreement of the fossil project.
92 @end menu
93
94 Help is available for any of the available fossil commands by using:
@@ -266,11 +267,11 @@
267 cat workfile >> fossil.texi
268 echo "" >> fossil.texi
269
270 # Now the test commands. Here be dragons.
271 echo "List test commands"
272 echo "@node Test commands,Web commands,Uncommon commands,Top
273 @chapter Testing commands
274
275 These are testing commands, listed by fossil when you run the command:
276
277 @example
@@ -280,11 +281,10 @@
281 They're often used to solve specific little problems that didn't warrant a full
282 tool, but are useful enough to be kept around. They are most definitely not
283 supported, and the developers will expect to change these far more often. They
284 are not stable, so do not depend upon their behavior, or even their existence.
285
 
286 @menu
287 " >> fossil.texi
288
289 # Insert test commands in here
290 echo "Grab test keywords for menu"
@@ -324,13 +324,90 @@
324
325 # ... and adds it to the output file with a spacer line
326 cat workfile >> fossil.texi
327 echo "" >> fossil.texi
328
329 # Now the webpage content. Here be wild wild web pages.
330 echo "List web commands"
331 echo "@node Web commands,Common arguments,Test commands,Top
332 @chapter Web commands
333
334 These are help pages for the internal web pages, listed by fossil when you run the command:
335
336 @example
337 fossil help -w
338 @end example
339
340 All of these can be provided to the URL line on the browser address input like the
341 example below, that starts from the final / (in this case, /timeline?ms=glob):
342
343 @example
344 https://fossil.example.com/fossil/timeline?ms=glob
345 @end example
346
347 @menu
348 " >> fossil.texi
349
350 # Insert webpage keywords in here
351 echo "Grab web keywords for menu"
352 for u in $(for t in $(fossil help -w); do echo "$t"; done | sort); do echo "* ${u}::"; done >> fossil.texi
353
354
355 # Now end that menu (Webpages)
356 echo "@end menu
357
358 " >> fossil.texi
359
360 # Now add all the help from "fossil help -w -v"
361 # WARNING: tail count is brittle
362 # sed comands remove the last two lines.
363 echo "Fossil output webpage help to workfile"
364 fossil help -w -v | tail -n +4 | sed '$d' | sed '$d' >workfile
365
366 # swap out @ with @@ so texinfo doesn't barf
367 echo "Doubling up the @'s"
368 sed -i -e 's/@/@@/g' workfile
369
370 # This swaps out "# keyword" with
371 # @node keyword
372 # @unnumbered keyword
373 # breaks on *BSD's seds, needs gsed there
374 echo "Swapping out # for @node ... \n@unnumbered ..."
375
376 if [[ ${MYOS} == "Linux" ]]; then
377 # use a different separator here, as we need to keep /_. in strings
378 sed -i -e 's%^##* /\([_.a-z0-9-]\{1,\}\)%@node /\1\n@section /\1\n%' workfile
379 else
380 # We'll assume we're on a BSD here, even though this won't always be true
381 gsed -i -e 's%^##* /\([_.a-z0-9-]\{1,\}\)%@node /\1\n@section /\1\n%' workfile
382 fi
383
384 # This has to be done before swapping --switches because the next command
385 # adds @option(--switches} and hence reuses the {}.
386 echo "Swapping out {} for @{ @}"
387 # swaps out {} for @{ @}
388 if [[ ${MYOS} == "Linux" ]]; then
389 sed -i -e 's/{/@{/g' -e 's/}/@}/g' workfile
390 else
391 gsed -i -e 's/\{/@\{/g' -e 's/\}/@\}/g' workfile
392 fi
393
394 echo "Swapping out --switches for @option{--switches}"
395 # turns --switches into @option{--switches}
396 if [[ ${MYOS} == "Linux" ]]; then
397 sed -i -e 's/--\([[:alnum:]-]\{1,\}\)/@option\{--\1\}/g' workfile
398 else
399 gsed -i -e 's/--\([[:alnum:]-]\{1,\}\)/@option\{--\1\}/g' workfile
400 fi
401
402 # ... and adds it to the output file with a spacer line
403 cat workfile >> fossil.texi
404 echo "" >> fossil.texi
405
406 # Add in common args
407 echo "List common args"
408 echo "@node Common arguments,License,Web commands,Top
409 @chapter Common arguments
410
411 These are commandline arguments that are common to all fossil commands.
412
413 " >> fossil.texi
414

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button