diff --git a/asciidoc/QuickStart.adoc b/asciidoc/QuickStart.adoc new file mode 100644 index 0000000..3e75ea4 --- /dev/null +++ b/asciidoc/QuickStart.adoc @@ -0,0 +1,350 @@ += QuickStart ! +Apostolos rootApostolos@swarmlab.io +// Metadata: +:description: Intro and Install +:keywords: doc, Quick +:data-uri: +:toc: right +:toc-title: Πίνακας περιεχομένων +:toclevels: 4 +:source-highlighter: highlight +:icons: font +:sectnums: + + +include::header.adoc[] + +{empty} + + + +[[cheat-Ascii]] +== Install (swarmlab-adoc) + +https://git.swarmlab.io:3000/swarmlab/swarmlab-adoc[^] + + +[[cheat-useadoc]] + +== Create project + +- Open a console + +[source,bash] +---- +mkdir mytest +cd mytest +swarmlab-adoc +---- + +== Copy-Paste asciidoc source + +.copy-paste source +[source,asciidoc] +---- +Paragraphs don't require any special markup in AsciiDoc. +A paragraph is just one or more lines of consecutive text. + +To begin a new paragraph, separate it by at least one blank line. +Newlines within a paragraph are not displayed. + A paragraph offset by at least one space becomes a literal paragraph. + All lines in a literal paragraph must be adjacent. + + A literal paragraph is displayed as preformatted text. + The text is shown in a fixed-width font. + Spaces and newlines, + like the ones in this sentence, + are preserved. + +NOTE: An admonition paragraph draws the reader's attention to +auxiliary information. +Its purpose is determined by the label +at the beginning of the paragraph. + +Here are the other built-in admonition types: + +TIP: Pro tip... + +IMPORTANT: Don't forget... + +WARNING: Watch out for... + +CAUTION: Ensure that... + +bold *constrained* & **un**constrained + +italic _constrained_ & __un__constrained + +bold italic *_constrained_* & **__un__**constrained + +monospace `constrained` & ``un``constrained + +monospace bold `*constrained*` & ``**un**``constrained + +monospace italic `_constrained_` & ``__un__``constrained + +monospace bold italic `*_constrained_*` & ``**__un__**``constrained + += Document Title (Level 0) + +== Level 1 Section Title + +=== Level 2 Section Title + +==== Level 3 Section Title + +===== Level 4 Section Title + +====== Level 5 Section Title + +== Another Level 1 Section Title + +Rubies are red, + +Topazes are blue. + +[%hardbreaks] +Ruby is red. + + + +* Edgar Allen Poe +* Sheri S. Tepper +* Bill Bryson + +Unordered, basic (alt) + +- Edgar Allen Poe +- Sheri S. Tepper +- Bill Bryson + +* [*] checked +* [x] also checked +* [ ] not checked +* normal list item + +https://asciidoctor.org - automatic! + +https://asciidoctor.org[Asciidoctor] + +https://github.com/asciidoctor[Asciidoctor @ *GitHub*] + +image::sunset.jpg[] + +image::sunset.jpg[Sunset] + +.A mountain sunset +[#img-sunset] +[caption="Figure 1: ",link=https://www.flickr.com/photos/javh/5448336655] +image::sunset.jpg[Sunset,300,200] + + + +video::video_file.mp4[] + +video::video_file.mp4[width=640, start=60, end=140, options=autoplay] + +Embedded Youtube video + +video::rPQoq7ThGAU[youtube] + +Embedded Vimeo video + +video::67480300[vimeo] + + + + +---- + +.view result + +Paragraphs don't require any special markup in AsciiDoc. +A paragraph is just one or more lines of consecutive text. + +To begin a new paragraph, separate it by at least one blank line. +Newlines within a paragraph are not displayed. + A paragraph offset by at least one space becomes a literal paragraph. + All lines in a literal paragraph must be adjacent. + + A literal paragraph is displayed as preformatted text. + The text is shown in a fixed-width font. + Spaces and newlines, + like the ones in this sentence, + are preserved. + +NOTE: An admonition paragraph draws the reader's attention to +auxiliary information. +Its purpose is determined by the label +at the beginning of the paragraph. + +Here are the other built-in admonition types: + +TIP: Pro tip... + +IMPORTANT: Don't forget... + +WARNING: Watch out for... + +CAUTION: Ensure that... + +bold *constrained* & **un**constrained + +italic _constrained_ & __un__constrained + +bold italic *_constrained_* & **__un__**constrained + +monospace `constrained` & ``un``constrained + +monospace bold `*constrained*` & ``**un**``constrained + +monospace italic `_constrained_` & ``__un__``constrained + +monospace bold italic `*_constrained_*` & ``**__un__**``constrained + += Document Title (Level 0) + +== Level 1 Section Title + +=== Level 2 Section Title + +==== Level 3 Section Title + +===== Level 4 Section Title + +====== Level 5 Section Title + +== Another Level 1 Section Title + +Rubies are red, + +Topazes are blue. + +[%hardbreaks] +Ruby is red. + + + +* Edgar Allen Poe +* Sheri S. Tepper +* Bill Bryson + +Unordered, basic (alt) + +- Edgar Allen Poe +- Sheri S. Tepper +- Bill Bryson + +* [*] checked +* [x] also checked +* [ ] not checked +* normal list item + +https://asciidoctor.org - automatic! + +https://asciidoctor.org[Asciidoctor] + +https://github.com/asciidoctor[Asciidoctor @ *GitHub*] + +image::sunset.jpg[] + +image::sunset.jpg[Sunset] + +.A mountain sunset +[#img-sunset] +[caption="Figure 1: ",link=https://www.flickr.com/photos/javh/5448336655] +image::sunset.jpg[Sunset,300,200] + + + +video::video_file.mp4[] + +video::video_file.mp4[width=640, start=60, end=140, options=autoplay] + +Embedded Youtube video + +video::rPQoq7ThGAU[youtube] + +Embedded Vimeo video + +video::67480300[vimeo] + + +== Run + +.run +[source,bash] +---- +cd mytest +swarmlab-adoc +---- + +TIP: swarmlab-adoc convert all *.adoc files recursiva in html5 and pdf + +.If you need to convert only one file +[NOTE] +==== +``` +docker run --rm -v $(pwd):/documents/ registry.vlabs.uniwa.gr:5080/swarmlab-asciidoctor asciidoctor --safe -b html5 -a theme=flask -a toc2 -a toc-placement=right -o ./path/to/FILENAME.html ./path/from/FILENAME.adoc +``` +Please note, there is a **.** in ./path +==== + +== Setup live preview Using a web browser + + +All you need to preview an AsciiDoc document in a web browser is to install + +- the https://chrome.google.com/webstore/detail/asciidoctorjs-live-previe/iaalpfgpbocpdfblpnhhgllgbdbchmia[Chrome extension] +- or the https://addons.mozilla.org/en-US/firefox/addon/asciidoctorjs-live-preview[Firefox add-on] +- or the https://addons.opera.com/fr/extensions/details/asciidoctorjs-live-preview[Opera extension] + +Then you can see the AsciiDoc file rendered as HTML just by visiting it! + +.Live Preview +image:tiled-editor-and-web-preview.png[alt="Swarmlab"] + +=== Installing the Chrome Extension + +. Download https://github.com/asciidoctor/asciidoctor-chrome-extension/releases/download/v1.5.4.100/asciidoctor-chrome-extension.nex[asciidoctor-chrome-extension.nex] +. Open chrome://extensions +. Drag'n'drop the `.nex` file into the page to install + +=== Installing the Firefox Extension + +. Download https://github.com/asciidoctor/asciidoctor-firefox-addon/releases/download/v0.5.3/asciidoctor-firefox-addon-0.5.3-signed.xpi[asciidoctor-firefox-addon.xpi] +. Open the file with Firefox to install + +=== Installing the Opera Extension + +. Dowload https://github.com/asciidoctor/asciidoctor-chrome-extension/releases/download/v1.5.4.100/asciidoctor-chrome-extension.nex[asciidoctor-chrome-extension.nex] +. Open opera://extensions +. Drag'n'drop the `.nex` file into the page to install + + +That's all folks! :-) + + + + + + +:hardbreaks: + +{empty} + +{empty} + +{empty} + +:!hardbreaks: + +''' + +.Reminder +[NOTE] +==== +:hardbreaks: +Caminante, no hay camino, +se hace camino al andar. + +Wanderer, there is no path, +the path is made by walking. + +*Antonio Machado* Campos de Castilla +====