User Tools

Site Tools


playground:misc:asciidoc_snippet

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
playground:misc:asciidoc_snippet [2022/04/28 14:44] – [asciidoc table] hc9playground:misc:asciidoc_snippet [2022/05/01 18:51] – [Converter] hc9
Line 184: Line 184:
 </code> </code>
  
-  * Convert the //ht802.html// file to a //dokuwiki// txt file. :!: Needs work/review.+  * Convert the //ht802.adoc// file to a //dokuwiki// txt file.
  
 <code> <code>
-$ pandoc -f html -t dokuwiki ht802.html -o ht802.txt+$ asciidoc -b dockbook45 -s ht820.adoc 
 +$ pandoc -f docbook -t dokuwiki ht820.xml -o ht820.txt
 </code> </code>
 +
 +|Try **pandoc**! (link); [[https://pandoc.org/try/?text=&from=docbook&to=latex&standalone=0]]|
 +|Learn **LaTeX** (link); [[https://www.learnlatex.org/en]]|
  
 ==== Editing ==== ==== Editing ====
Line 196: Line 200:
 ^Reference:^ ^Reference:^
 |[[https://docs.slackware.com/howtos:misc:dokuwiki_versus_asciidoc_markups|dokuwiki versus asciidoc markups; Conversion Table and Cheat Sheet]]| |[[https://docs.slackware.com/howtos:misc:dokuwiki_versus_asciidoc_markups|dokuwiki versus asciidoc markups; Conversion Table and Cheat Sheet]]|
 +|[[https://asciidoctor.org/docs/asciidoc-writers-guide|AsciiDoc Writer’s Guide]]|
 +|[[https://docs.asciidoctor.org/asciidoc/latest/syntax-quick-reference|AsciiDoc Syntax Quick Reference]]|
  
 ===== asciidoc table ===== ===== asciidoc table =====
Line 208: Line 214:
  
 ---- ----
-% acme+  % acme
 ---- ----
  
Line 298: Line 304:
 |**_/usr/$user/-rc_** **Del Snarf : Look Send Noscroll** |**_/usr/$user/-rc_** **Del Snarf : Look Send Noscroll**
 |cpu: |cpu:
 +|===
 +
 +== acme images
 +
 +A brief mention of acme, for those who are attending the SDF Plan 9 Boot Camp.
 +
 +|===
 +|% acme
 +|===
 +
 +image::https://wiki.sdf.org/lib/exe/fetch.php?media=plan9-acme-1.png[alt="plan9-acme-1",width=600]
 +
 +. Press the middle button of your mouse while the pointer is over the text "New" (to the left), in the row marked with a **1**.
 +. Type the text "win" in the row, or newly created area, marked with a **2**.
 +. Press the middle button of your mouse while the pointer is over the text "win" in the row, or newly created area, marked with a **2**.
 +. Type the text "Mail" in the row marked with a **3**.
 +. Press the middle button of your mouse while the pointer is over the text "Mail", in the row marked with a **3**.
 +
 +image::https://wiki.sdf.org/lib/exe/fetch.php?media=plan9-acme-2.png[alt="plan9-acme-2",width=600]
 +
 +. Press the right button of your mouse while the pointer is used to highlight a file name.
 +. Once the highlight covers the filename, release the right mouse button to open the file.
 +
 +|===
 +|http://acme.cat-v.org/[The Acme User Interface for Programmers]
 +|Plan 9 https://wiki.sdf.org/doku.php?id=vps_-_plan_9_9front#videos[Acme] videos Plan 9 Acme Intro - Part 1, 2, & 3
 +|===
 +
 +__1__.) From a Plan 9 Rio rc prompt.
 +
 +== sam
 +
 +* https://wiki.sdf.org/doku.php?id=playground:plan9_tutorial_sam[Text Editing with the sam editor]
 +
 +Sam is a text editor. While the cursor is over the sam window, press the right button of your mouse and drag the cursor over the file name. Release the right mouse button once the cursor is over the file name. The cursor pointer will change to a square. Press the right button, while the square cursor is over the lower panel, to load the file in the lower panel.
 +
 +image::https://wiki.sdf.org/lib/exe/fetch.php?media=sam-editor1.png[alt="sam-editor1",width=600]
 +
 +----
 +  % sam /rc/bin/termrc.local
 +----
 +
 +A few words about (**w**) writing the file, and how to (**q**) quit "sam". Commands (//sam -d//) are typed in the upper panel, while edits are typed in the lower panel. Press the left mouse button to activate the upper panel, or the lower panel. Type a '**w**' in the upper panel, then press the carriage return. This saves the file. Type a '**q**' in the upper panel, then press the carriage return. This quits "sam".
 +
 +Sam uses it's own cut/paste buffer. Exchange it with Rio's cut/paste buffer by using the <**rio**> option in the middle button (2) menu of sam.
 +
 +The following edit ('% sam -d') will work from the https://wiki.sdf.org/doku.php?id=vps_-$$_$$plan9front_-_acme_sam_abaco_mothra_and_man#sam[VM console] rc prompt, or from the upper sam panel.
 +
 +----
 +  % mkdir samlearn
 +  % cd samlearn
 +----
 +
 +----
 +  % cp /lib/ndb/local local2
 +  % sam -d local2
 +  -. local2
 +  /ip=
 +            "Press the Carriage return, following the line output."
 +  s/ip=/#ip=
 +  $+1
 +  a
 +  ip=YOUR_IP sys=plan9 dom=plan9 dns=205.166.94.20
 +  .
 +  w
 +  q
 +  %
 +----
 +
 +----
 +  % cp /rc/bin/termrc.local termrc.local2
 +  % sam -d termrc.local2
 +  -. termrc.local2
 +  $+1
 +  a
 +  ip/ipconfig -g 205.166.94.1 ether /net/ether0 YOUR_IP 255.255.255.0
 +  ndb/cs
 +  ndb/dns -r
 +  .
 +  w
 +  q
 +  %
 +----
 +
 +|===
 +h|**Command**|**Option**|**Quick Reference**
 +|SAM|'sam -d'|http://sam.cat-v.org/cheatsheet/
 +|===
 +
 +== ed
 +
 +Ed is a text editor, and similar to https://wiki.sdf.org/doku.php?id=vps_-$$_$$plan9front_-$$_$$acme_sam_abaco_mothra_and_man#sam[sam -d]. Using the '% sam -d examples from https://wiki.sdf.org/doku.php?id=vps_-$$_$$plan9front_-_acme_sam_abaco_mothra_and_man#sam[Sam], it's possible to use '% ed'. The mentioned examples are from a Drawterm Rio rc prompt.
 +
 +----
 +  % cd samtest
 +  % cp /lib/ndb/local local-1ed
 +----
 +
 +----
 +  % ed local-1ed
 +  291
 +  /ip=
 +  ip=127.0.0.1 sys=localhost dom=localhost
 +  s/ip=/#ip=
 +  #ip=127.0.0.1 sys=localhost dom=localhost
 +  $
 +  #ip=127.0.0.1 sys=localhost dom=localhost
 +  a
 +  ip=YOUR_IP sys=plan9 dom=plan9 dns=205.166.94.20
 +  .
 +  w
 +  341
 +  q
 +  %
 +----
 +
 +----
 +  % cp /rc/bin/termrc.local termrc.local-1ed
 +  % ed termrc.local-1ed
 +----
 +
 +----
 +  % ed termrc.local-1ed
 +  424
 +  $
 +  cpu=CP
 +  a
 +  ip/ipconfig -g 205.166.94.1 ether /net/ether0 YOUR_IP 255.255.255.0
 +  ndb/cs
 +  ndb/dns -r
 +  .
 +  w
 +  510
 +  q
 +  %
 +----
 +
 +|===
 +h|**Command**|**Title**|**Quick Reference**
 +|ED|ed Cheat Sheet|http://sdf.org/?tutorials/ed
 +|===
 +
 +== abaco
 +
 +You can use http://lab-fgb.com/abaco/[Abaco] to browse the web^1^. (Abaco is available in a default Plan 9 system.) You'll need to have your IP configured and DNS working in order to browse the web. After that, you'll have to run "webfs" and [underline]#then#^2^ "abaco". If you don't have a "/usr/$user/lib/webcookies" file, _touch_ it once. (You may want to add "webfs" in your "$home/lib/profile" just before plumber and rio.)
 +
 +image::https://wiki.sdf.org/lib/exe/fetch.php?media=plan9-abaco-1.png[alt="plan9-abaco-1",width=600]
 +
 +----
 +  % touch /usr/$user/lib/webcookies
 +----
 +
 +----
 +  % webfs
 +  % abaco
 +----
 +
 +When abaco starts, you can go to a webpage by clicking "_New_" with the middle button of the mouse, typing the address in the row below the one with "_Del Snarf Get …_" (see the previous figure: it's the one where the current legacy address is), and pressing "[**Enter**]" on your keyboard. You can follow links by clicking on them, as is usual, with the left button (the shape of the cursor won't change, though).
 +
 +^1^ An http URL. ^2^ Both commands are used on one line with a separator: '% webfs; abaco'. ^3^ Another way to run Abaco.
 +
 +== mothra
 +
 +|===
 +|Mothra https://wiki.sdf.org/doku.php?id=vps_-_9front#mothra
 +|===
 +
 +== man
 +
 +Editor reference:
 +
 +|===
 +|Editors: https://en.wikipedia.org/wiki/List_of_Plan_9_applications#Editors[List of Plan 9 applications - Wikipedia]
 +|===
 +
 +|===
 +|https://wiki.sdf.org/doku.php?id=vps_-$$_$$plan9front_-_acme_sam_abaco_mothra_and_man#acme[acme] interactive text editor and shell
 +|https://wiki.sdf.org/doku.php?id=vps_-$$_$$plan9front_-_acme_sam_abaco_mothra_and_man#ed[ed] text editor
 +|https://wiki.sdf.org/doku.php?id=vps_-$$_$$plan9front_-_acme_sam_abaco_mothra_and_man#sam[sam] screen editor with structural regular expressions
 +|===
 +
 +|===
 +|Sam, Ed, Acme https://wiki.sdf.org/doku.php?id=vps_-_9front#editors
 +|===
 +
 +|===
 +|Plan 9 Rc Survival Guide http://sdf.org/?tutorials/Plan_9_rc
 +|===
 +
 +Browser reference:
 +
 +|===
 +|Mothra https://wiki.sdf.org/doku.php?id=vps_-_9front#mothra
 +|===
 +
 +|===
 +|Netsurf usage: netsurf [-cudv] [url]
 |=== |===
  
Line 307: Line 510:
 $ asciidoc -s acme_table.adoc $ asciidoc -s acme_table.adoc
 $ links acme_table.html $ links acme_table.html
 +</code>
 +
 +  * Convert the //acme_table.adoc// file to a //dokuwiki// txt file.
 +
 +<code>
 +$ asciidoc -b dockbook45 -s acme_table.adoc
 +$ pandoc -f docbook -t dokuwiki acme_table.xml -o acme_table.txt
 +</code>
 +
 +==== tidy ====
 +
 +[[https://www.w3.org/People/Raggett/tidy|Clean up your Web pages with HTML TIDY]]
 +
 +  * Use 'tidy' to modify the //acme_table.html// file (for practice).
 +  * Backup the //acme_table.html// file before proceeding.
 +
 +<code>
 +$ tidy -help
 +$ tidy -f errs.txt -m acme_table.html
 </code> </code>