📺 Develpreneur YouTube Episode

Video + transcript

Ascii Doc Tutorial - Part 2

2021-11-30 •Youtube

Detailed Notes

We always need to document our code and processes. That does not mean we always do. Ascii Doc is a tool that can make it easy for us to quickly create documentation that looks good and in many formats.

Ascii Doc Link: https://asciidoc-py.github.io

Transcript Text
[Music]
you can also do
blocks
they would just want to do a code block
like this
you could put in
four dashes
and end with four dashes so now
everything inside of here is a code
block
you could also wrap this with the source
and now it becomes a source block
so if we put in a bunch of
code in here
and if we had the code plugin it would
actually convert this to a colored
syntax
we could also do a
sidebar block
and that is
this
that's going to be with asterix one two
three four
and then in here this is a sidebar
block
and as you can see here it's like a note
card
in html
so we have our title and then we have
our paragraph code
we can also do an example block
now here's something that's interesting
so here we have our option title
and we have example one
option title
so here's our example
in our block
so here's the
code here
it's written inside of here
but we did example one
option title because we're using
our equals
or our example block
you can also do comments
elements look like this
so it's four forward slashes
n or forward slashes
if you come over here you see we don't
have the text
all right say we wanted to
insert
some
html code or some markup languages
you would use ford pluses
and close four pluses
and then inside of here
you can put in your html code so say you
want to insert a html table
you have to make sure you close your
tags correctly
if we come down here here's our markup
so we have a
html table
we have table border one
one row with two columns
we can also add a quote
and so quote
looks like this
so you start out
sorry
with
the brackets specifying the parameters
that you're going to pass in
for the quote the city author and the
source
and then you're going to pass in
or put in your text
you follow it with underscores
and you have your quote
block
use city somebody
come over here and look
use
site somebody
site source
site author
all right so for text in html
if we're using the paragraph tag and we
wanted to break
the line up without using the pre-format
we would have to use the br tag
in ascii code it looks something like
this
one
forced
hit enter and now it forces the library
now if you see if i don't hit enter it
stays on one line
i remove the plus
it stays on one line
that's how you force a line
now for
our different types of formatting
instead of using style sheets
uh or the old bold
underline
or italic tags
you use something like this
so normal text you just type
if you want to italicize your text
underscore in front of it
and end with an underscore
over here and look at our text
normal
italicized
we want to bold
you astrid
close it
it becomes bold
and if you want to do mono text
or with a plus
and minus
now we have our code block
uh let's see
double quotes and single quotes
instead of escaping them it's kind of
like the old
how we have to escape it for
sql
so for double quote it's
two apostrophes
apostrophes
oops sorry
this is actually
both
in code
that actually
represents it correctly
and same with single quotes
but for single quotes we have to
actually
use two single quotes
see what else we have uh oh
um super and sub
we can actually do like x squared
we could do x
base
here
the second power
gonna look over here
x squared
and say we want to do like log
and then do a sub
log n
like this
you could actually do command line text
so for that it would be single quote
like ls-la
italicizes it
and formats it so that you know its
command line
you can combine formats
so just like the old old
metallic then you have to close italic
close bold
all you have to do is
take the catalyst
hello there
add
mixed
and then end your house
oh no space at the end
here we go
so as you can see you have to get used
to
you're not adding spaces between things
because it is a little touchy
once i add that
okay so we have mono bold
paths
uh you can do colors
here's a
sample one
you can do red
and red
type in your text or put your text
inside your pounds
and we have red yell red and yellow
okay so we have red text on yellow
large and all bull
if we wanted to separate these
plus
rebecca verona
let's see we can add
copyrights trademarks
special formatting
just like you can with html except this
is pretty cool it's
kind of like word
so copyright is just c
r trademark
other formatting so you can do
dash dash
solid uh
dash
three dots gets converted to the three
dots
arrows
equal then arrow greater than arrow
you can also do a special character
ascii characters
if you want to put in a horizontal line
it's four hyphens
and now we have a break
we can also escape
so if we want to actually show the
underscores the pluses
you just do the escape
nothing new
if we want to do anchors
or we can link to an anchor
looks like this
we have two
square brackets and ending square
brackets
let's do this let's stick in
all right so here's an example with
anchors so i have my starting anchor
i've added another anchor anchor two
and then here
if i click the anchor links it will jump
down
to here
enter two
jump to here
and then all i have to use is a single
bracket
to add the links
minimize this a little bit
here we have paragraph block one
block two
i'll jump into here
i'll jump you to here
i can anchor first enter
documents
and then you can add in
links
you can see this is fairly readable just
in text
and then when it gets converted
it looks like whatever format you want
html or pdf
uh lists
pretty straightforward so
you want to do bullet
there's our title so bullet is just
asterick
all at one
point two
say we wanted a sub bullet
have dash
now it creates a
the next tier
that's readable
you
Transcript Segments
1.35

[Music]

26.64

you can also do

27.92

blocks

35.12

they would just want to do a code block

37.12

like this

38.399

you could put in

40.16

four dashes

42.239

and end with four dashes so now

44.079

everything inside of here is a code

45.84

block

52.96

you could also wrap this with the source

66.64

and now it becomes a source block

69.28

so if we put in a bunch of

71.52

code in here

81.28

and if we had the code plugin it would

83.6

actually convert this to a colored

87.759

syntax

95.119

we could also do a

97.36

sidebar block

99.36

and that is

101.439

this

118.96

that's going to be with asterix one two

122

three four

126.64

and then in here this is a sidebar

130.64

block

133.28

and as you can see here it's like a note

135.28

card

138.08

in html

140.56

so we have our title and then we have

142.56

our paragraph code

153.84

we can also do an example block

160.319

now here's something that's interesting

162.64

so here we have our option title

165.44

and we have example one

167.44

option title

169.44

so here's our example

171.599

in our block

173.76

so here's the

175.12

code here

176.64

it's written inside of here

180.319

but we did example one

182.8

option title because we're using

186.8

our equals

189.84

or our example block

199.36

you can also do comments

204.319

elements look like this

207.92

so it's four forward slashes

211.28

n or forward slashes

214.08

if you come over here you see we don't

215.68

have the text

230.959

all right say we wanted to

233.04

insert

234.56

some

235.76

html code or some markup languages

238.72

you would use ford pluses

242.64

and close four pluses

245.599

and then inside of here

248.48

you can put in your html code so say you

251.28

want to insert a html table

267.36

you have to make sure you close your

268.4

tags correctly

274.16

if we come down here here's our markup

276.72

so we have a

277.919

html table

281.12

we have table border one

283.36

one row with two columns

295.36

we can also add a quote

306.88

and so quote

308.72

looks like this

314.32

so you start out

317.12

sorry

318.479

with

319.919

the brackets specifying the parameters

322.88

that you're going to pass in

324.639

for the quote the city author and the

327.36

source

330.08

and then you're going to pass in

333.199

or put in your text

336.639

you follow it with underscores

340.08

and you have your quote

342.24

block

343.199

use city somebody

346.88

come over here and look

348.56

use

349.6

site somebody

351.039

site source

352.4

site author

363.919

all right so for text in html

368

if we're using the paragraph tag and we

370.72

wanted to break

372.72

the line up without using the pre-format

376

we would have to use the br tag

380.16

in ascii code it looks something like

382.479

this

385.039

one

386.88

forced

398.8

hit enter and now it forces the library

402.72

now if you see if i don't hit enter it

404.4

stays on one line

406.96

i remove the plus

409.199

it stays on one line

416.56

that's how you force a line

425.039

now for

426.88

our different types of formatting

430.16

instead of using style sheets

432.8

uh or the old bold

436.56

underline

441.12

or italic tags

446.8

you use something like this

448.88

so normal text you just type

455.599

if you want to italicize your text

458.4

underscore in front of it

463.759

and end with an underscore

466.72

over here and look at our text

469.199

normal

470.319

italicized

474.319

we want to bold

476.84

you astrid

482.16

close it

484.16

it becomes bold

487.759

and if you want to do mono text

490.4

or with a plus

493.199

and minus

497.12

now we have our code block

501.28

uh let's see

503.039

double quotes and single quotes

505.52

instead of escaping them it's kind of

507.599

like the old

509.52

how we have to escape it for

512

sql

513.44

so for double quote it's

516.399

two apostrophes

522.159

apostrophes

528.56

oops sorry

531.76

this is actually

533.12

both

536.48

in code

538.32

that actually

539.92

represents it correctly

543.279

and same with single quotes

564.64

but for single quotes we have to

566.16

actually

568.16

use two single quotes

579.839

see what else we have uh oh

582.48

um super and sub

585.04

we can actually do like x squared

589.04

we could do x

591.6

base

594.64

here

596.32

the second power

599.76

gonna look over here

601.44

x squared

604.8

and say we want to do like log

607.839

and then do a sub

610.8

log n

614.079

like this

620.16

you could actually do command line text

624.56

so for that it would be single quote

627.76

like ls-la

634.24

italicizes it

635.92

and formats it so that you know its

637.36

command line

641.36

you can combine formats

643.92

so just like the old old

647.12

metallic then you have to close italic

651.12

close bold

654.16

all you have to do is

656.959

take the catalyst

660.56

hello there

662.72

add

663.76

mixed

666.88

and then end your house

676.88

oh no space at the end

678.72

here we go

682

so as you can see you have to get used

683.839

to

685.519

you're not adding spaces between things

688

because it is a little touchy

691.6

once i add that

729.6

okay so we have mono bold

737.44

paths

739.92

uh you can do colors

743.12

here's a

745.04

sample one

749.519

you can do red

751.6

and red

753.12

type in your text or put your text

755.12

inside your pounds

765.04

and we have red yell red and yellow

772.959

okay so we have red text on yellow

776.24

large and all bull

779.76

if we wanted to separate these

782.88

plus

789.44

rebecca verona

820.32

let's see we can add

824.24

copyrights trademarks

827.519

special formatting

830.24

just like you can with html except this

832.72

is pretty cool it's

834.399

kind of like word

837.279

so copyright is just c

840.16

r trademark

842.959

other formatting so you can do

845.199

dash dash

847.04

solid uh

848.48

dash

849.36

three dots gets converted to the three

851.36

dots

852.72

arrows

855.76

equal then arrow greater than arrow

858.399

you can also do a special character

860.399

ascii characters

866.88

if you want to put in a horizontal line

875.12

it's four hyphens

877.12

and now we have a break

884.639

we can also escape

888.48

so if we want to actually show the

890.24

underscores the pluses

892.8

you just do the escape

896.16

nothing new

906.16

if we want to do anchors

908.399

or we can link to an anchor

912.399

looks like this

914.399

we have two

915.839

square brackets and ending square

917.519

brackets

924.639

let's do this let's stick in

937.519

all right so here's an example with

938.959

anchors so i have my starting anchor

942.24

i've added another anchor anchor two

946.72

and then here

948.16

if i click the anchor links it will jump

950.32

down

951.279

to here

952.56

enter two

954.72

jump to here

956.72

and then all i have to use is a single

959.04

bracket

960.16

to add the links

962.8

minimize this a little bit

964.959

here we have paragraph block one

967.12

block two

969.199

i'll jump into here

971.279

i'll jump you to here

973.68

i can anchor first enter

976.399

documents

977.839

and then you can add in

979.759

links

988.399

you can see this is fairly readable just

990.32

in text

992

and then when it gets converted

993.839

it looks like whatever format you want

996

html or pdf

1000.8

uh lists

1003.199

pretty straightforward so

1005.519

you want to do bullet

1008.48

there's our title so bullet is just

1011.92

asterick

1014.399

all at one

1019.36

point two

1023.12

say we wanted a sub bullet

1026.079

have dash

1037.36

now it creates a

1039.76

the next tier

1043.439

that's readable

1060

you