📺 Develpreneur YouTube Episode

Video + transcript

Ascii Doc Tutorial - Part 3

2021-12-02 •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]
another way to do it
new
another bullet
but here we do
astrid asterisk
it will automatically put it as a child
of our first bullet
if i want to go another tear down you
just add another bullet
one go even further down
i gotta make sure that they're in order
but as you keep going
they just keep adding blocks after that
but over here it's still readable
now we can also change our bullets
so you could still use asterisk
or you could do
hyphen
uh
and
it's a nice title
and then if i do dash
you see it repeats the process
so you can use dashes or asterisks
all right that's unordered lists
we want to do ordered list
title
alright so if we do an ordered list
you do dot
number
so if you just keep adding dots
space and text it'll just keep adding
the next
incrementation
if you want to do a sub child
and then it will do numbers
we do three
we'll do letters
we do four
you'll now do capital
and then if you do five
you'll do capital
i's
still fairly readable
another way you can do it
you can actually combine
let's say we want to do letters
so if we wanted letters just start out
with letters
and then if i wanted
to add children to that
now you can add indentations here
or not
uh if you add indentations it just kind
of makes it cleaner to read over here in
the text
now if we wanted to combine
letters and numbers
so we could do child we could do
single dot
which then changes us back to a number
we could also use numbers
now on we can mix them
you could also do definitions
copy this in to make it cleaner
definitions look like this
so you have your term
and then
definition
so to do that you use two colons
the text two colons and then it converts
it to a definition
and if you want
crowds
just add another
colon
here we
have definition for one
add another colon pushes it over
push it over again
and we want to add
definitions within definitions
that use semicolons
get colons
treats it as if they are
straight definitions so one two
but if i change it to semicolons it now
staggers them
now we could also change how we read
the definitions
so right now they're stacked
so we have term
and then the definition on the next line
if we
lead
with the bracket horizontal
it puts our definition
right next to our term
and if we change our label
here um
the horizontal has to be at the
left-hand side
you could also do question and answers
this is good if you're doing
like a quiz site
if you want to break your list
you can do something like this
list
if we want to do number
item one
and one
two three four
but this was actually gonna be one and
two again
what we do here we can
create a block
and as you can see it restarted the
numbering
you can nest all kinds of formatting
so here we have our title
doing a bullet we're doing a number
block
and a bullet again
non-literal
another block
over here
very
you clean also do tables
here's an example of a table
three columns
five rows
and our text looks like this
so you have your bracket
options headers and footers
i have a header
my headers are going to be bolded
and then i use pipes
and i use equal signs
and i use pipes to separate
my
columns
very clean easy to read
it did the same thing for comma
delimited data
so you can take csv data
and say 15 for each column
you can format csv
the width is 60
columns are four
you can set your frame
you can set different things like top
bot
grid none with the grid
i also believe you can read
cvs files in
that's kind of cool
you want to add some additional
formatting
so options
header
columns
here's some additional formatting
and then you can also do multi-cell
wristband
of the melting multi-cell
row column span
two three four eight duration average
notes
if you want to do two columns
or two rows plus two or dot two
come over here
making
two rows
that's just an example of how to use the
ascii doc
now there are other things you can use
with ascii doc
you can use things like
ascii doctor
which allow you to install
this in
docker
and it's basically another translator
you can take ascii doc
html5
doc book or more
this is good if you have ruby
so you can use it as a ruby plugin
and there's essentially a plugin for
ascii doc
for almost every language
what's kind of cool is and what turned
me on to asciidoc
was
spring is actually now using it
with their rest packages
i go to a few projects
so if you do spring rest stock
it actually
auto-generates ascii doc
syntax with ascii doctor
so instead of it looking all nasty with
your old java docs
actually makes a very clean api for your
code
i know we started early um
that's kind of
it an overview
does anyone have any questions
michael um this is just a comment this
is really cool and it really piqued my
interest um uh as a short backstory of
him
was in the middle of writing my thesis
in word
and and so it was a docx and um
we had a number of equations that we
were trying to uh format in word and
word started crashing on me because uh i
guess it just wasn't a stable
implementation
of all those equations and so
this uh uh
this tool would have helped me convert
that docx to
a tech which was the format that we uh
ended up using a tech file uh then latex
to uh
uh render the document um it's really
cool so i i like the presentation just
for that and um and also i saw a
as i was listening i was doing a uh
a search there is a um a pan doc i don't
know if you ran across that in your uh
preparations uh pandoc which can convert
to and from this ascii doc format
um
uh i
again just started tinkering with it and
it's really powerful as well so that's a
great presentation
yeah there's a lot you can do with it uh
there's pac-man
uh like for example i forgot to mention
the plugins so if you go to the ascii
doc page
and here are all the different plugins
so you can actually convert it to like a
wordpress
uh like gman and you mentioned math
so if you come down here to the filters
uh you can do block diagrams for diagram
filter
uh i think there's a yeah there's a
graphics one
and i think there's even a math one
so this probably would have been perfect
for what you were trying to do
absolutely it would have i agree
but that's the thing that's why i
brought this up because
i saw this at java one a couple years
ago
but i couldn't remember the name of it
and
now that spring has incorporated it
within their rest docs i was like ah
that's it
because i actually write most of my
documentation in notepad plus plus
or just me
kind of a superficial text editor
and most of my documentation
looks like this or is close to this and
i was like that's kind of cool i could
easily just
tweak how i do my shorthand
and then i can convert this document
into
an html or a pdf document
yeah yeah
that's that's uh that's really powerful
um and i again uh
that can dock tool as well
um
i'm the lazy guy that wants to use a lot
less shorthand and
just open up a docx file or a word
document and compile some things like
that
it can convert your docx to uh an ascii
doc that's a and that then that markup
can all
persist across whatever format you need
it to
yep and here's another one so this is
another theme called power man
which is a
condensed version
i'm with you
it's really cool
any other questions
bring none
with that we'll wrap things up we
appreciate your time and if you'd like
to discuss any of these topics further
just reach out to us
we're on info developer.com
we're also on
twitter at developerner we're still on
facebook at facebook.com
developmenter
and you can reach us on our contact us
page at developernerd.com
our videos are also on vimeo
and we're also on
youtube
so
come check out our blogs and our videos
and
as always our goal is making every
developer better have a great day
[Music]
you
Transcript Segments
1.35

[Music]

26.32

another way to do it

29.84

new

33.68

another bullet

35.76

but here we do

38.239

astrid asterisk

40.399

it will automatically put it as a child

43.92

of our first bullet

50.16

if i want to go another tear down you

51.84

just add another bullet

55.28

one go even further down

62.719

i gotta make sure that they're in order

65.76

but as you keep going

67.439

they just keep adding blocks after that

71.6

but over here it's still readable

79.04

now we can also change our bullets

84.56

so you could still use asterisk

87.36

or you could do

90.079

hyphen

108.159

uh

114.96

and

121.2

it's a nice title

123.36

and then if i do dash

126.799

you see it repeats the process

130

so you can use dashes or asterisks

134.4

all right that's unordered lists

138.959

we want to do ordered list

143.44

title

148.8

alright so if we do an ordered list

150.959

you do dot

154.239

number

159.36

so if you just keep adding dots

162.239

space and text it'll just keep adding

164.72

the next

165.68

incrementation

167.599

if you want to do a sub child

174.72

and then it will do numbers

182.8

we do three

185.2

we'll do letters

187.76

we do four

190.56

you'll now do capital

192.64

and then if you do five

195.76

you'll do capital

197.76

i's

201.68

still fairly readable

205.92

another way you can do it

208.08

you can actually combine

213.68

let's say we want to do letters

228.48

so if we wanted letters just start out

230.56

with letters

234.64

and then if i wanted

237.12

to add children to that

252.319

now you can add indentations here

255.04

or not

256.239

uh if you add indentations it just kind

258.4

of makes it cleaner to read over here in

260

the text

261.919

now if we wanted to combine

264.16

letters and numbers

266.8

so we could do child we could do

269.36

single dot

270.88

which then changes us back to a number

274.72

we could also use numbers

293.52

now on we can mix them

299.759

you could also do definitions

305.199

copy this in to make it cleaner

308.56

definitions look like this

311.039

so you have your term

313.52

and then

314.56

definition

316.88

so to do that you use two colons

321.52

the text two colons and then it converts

324.4

it to a definition

328.24

and if you want

330.639

crowds

332

just add another

334.32

colon

335.84

here we

336.84

have definition for one

341.68

add another colon pushes it over

345.36

push it over again

354.8

and we want to add

356.479

definitions within definitions

366.24

that use semicolons

369.52

get colons

370.88

treats it as if they are

373.199

straight definitions so one two

376.72

but if i change it to semicolons it now

378.8

staggers them

386.8

now we could also change how we read

390.639

the definitions

394.96

so right now they're stacked

397.12

so we have term

398.56

and then the definition on the next line

401.68

if we

403.28

lead

405.6

with the bracket horizontal

408.8

it puts our definition

410.479

right next to our term

415.599

and if we change our label

420.84

here um

453.599

the horizontal has to be at the

455.12

left-hand side

460.479

you could also do question and answers

465.199

this is good if you're doing

467.12

like a quiz site

488.24

if you want to break your list

494.639

you can do something like this

498.639

list

502.56

if we want to do number

505.28

item one

523.599

and one

529.04

two three four

531.12

but this was actually gonna be one and

532.64

two again

535.2

what we do here we can

538.08

create a block

543.92

and as you can see it restarted the

545.519

numbering

562.56

you can nest all kinds of formatting

566.399

so here we have our title

568.72

doing a bullet we're doing a number

570.24

block

571.36

and a bullet again

574.48

non-literal

575.76

another block

578.959

over here

580.08

very

589.68

you clean also do tables

595.68

here's an example of a table

598.16

three columns

599.92

five rows

604.8

and our text looks like this

606.8

so you have your bracket

608.72

options headers and footers

611.279

i have a header

614

my headers are going to be bolded

621.6

and then i use pipes

624.24

and i use equal signs

627.44

and i use pipes to separate

629.92

my

630.839

columns

632.8

very clean easy to read

635.6

it did the same thing for comma

637.519

delimited data

641.44

so you can take csv data

644.48

and say 15 for each column

647.36

you can format csv

649.92

the width is 60

651.76

columns are four

654.16

you can set your frame

656.48

you can set different things like top

657.839

bot

658.72

grid none with the grid

665.279

i also believe you can read

667.279

cvs files in

670.24

that's kind of cool

673.12

you want to add some additional

674.32

formatting

682

so options

684.399

header

685.44

columns

688.959

here's some additional formatting

698.959

and then you can also do multi-cell

701.279

wristband

715.12

of the melting multi-cell

717.68

row column span

722.48

two three four eight duration average

725.2

notes

726.639

if you want to do two columns

728.72

or two rows plus two or dot two

736.16

come over here

738.32

making

739.519

two rows

748.32

that's just an example of how to use the

751.04

ascii doc

754

now there are other things you can use

755.6

with ascii doc

757.279

you can use things like

760.72

ascii doctor

763.519

which allow you to install

765.44

this in

767.04

docker

769.519

and it's basically another translator

772.16

you can take ascii doc

773.88

html5

775.44

doc book or more

778.48

this is good if you have ruby

780.56

so you can use it as a ruby plugin

783.279

and there's essentially a plugin for

785.2

ascii doc

786.639

for almost every language

789.2

what's kind of cool is and what turned

791.44

me on to asciidoc

793.36

was

794.88

spring is actually now using it

797.68

with their rest packages

800.8

i go to a few projects

806.639

so if you do spring rest stock

809.68

it actually

812.079

auto-generates ascii doc

814.639

syntax with ascii doctor

817.36

so instead of it looking all nasty with

819.76

your old java docs

821.839

actually makes a very clean api for your

824.48

code

833.04

i know we started early um

835.68

that's kind of

837.12

it an overview

839.519

does anyone have any questions

846

michael um this is just a comment this

848.48

is really cool and it really piqued my

850.24

interest um uh as a short backstory of

854.32

him

855.36

was in the middle of writing my thesis

857.279

in word

858.639

and and so it was a docx and um

862

we had a number of equations that we

864.16

were trying to uh format in word and

866.639

word started crashing on me because uh i

869.44

guess it just wasn't a stable

871.12

implementation

872.88

of all those equations and so

876.48

this uh uh

878.24

this tool would have helped me convert

880.079

that docx to

882.16

a tech which was the format that we uh

885.68

ended up using a tech file uh then latex

888.56

to uh

889.519

uh render the document um it's really

892.48

cool so i i like the presentation just

895.68

for that and um and also i saw a

899.6

as i was listening i was doing a uh

902.72

a search there is a um a pan doc i don't

906.639

know if you ran across that in your uh

908.48

preparations uh pandoc which can convert

911.68

to and from this ascii doc format

915.68

um

916.639

uh i

918.079

again just started tinkering with it and

919.76

it's really powerful as well so that's a

922.56

great presentation

924.079

yeah there's a lot you can do with it uh

926.48

there's pac-man

927.92

uh like for example i forgot to mention

930.48

the plugins so if you go to the ascii

933.68

doc page

935.36

and here are all the different plugins

937.6

so you can actually convert it to like a

939.12

wordpress

940.639

uh like gman and you mentioned math

944.24

so if you come down here to the filters

946.72

uh you can do block diagrams for diagram

949.199

filter

950.399

uh i think there's a yeah there's a

952.24

graphics one

953.519

and i think there's even a math one

956.16

so this probably would have been perfect

957.68

for what you were trying to do

959.36

absolutely it would have i agree

962.079

but that's the thing that's why i

963.36

brought this up because

964.88

i saw this at java one a couple years

966.88

ago

967.759

but i couldn't remember the name of it

970.48

and

971.36

now that spring has incorporated it

973.839

within their rest docs i was like ah

977.04

that's it

978.079

because i actually write most of my

980.839

documentation in notepad plus plus

983.839

or just me

985.839

kind of a superficial text editor

989.519

and most of my documentation

991.92

looks like this or is close to this and

994.8

i was like that's kind of cool i could

996.72

easily just

998

tweak how i do my shorthand

1000.639

and then i can convert this document

1003.44

into

1004.48

an html or a pdf document

1007.279

yeah yeah

1008.88

that's that's uh that's really powerful

1011.04

um and i again uh

1013.6

that can dock tool as well

1016.16

um

1016.959

i'm the lazy guy that wants to use a lot

1019.6

less shorthand and

1022

just open up a docx file or a word

1024.24

document and compile some things like

1026.72

that

1028.48

it can convert your docx to uh an ascii

1032.559

doc that's a and that then that markup

1035.039

can all

1036

persist across whatever format you need

1038

it to

1039.76

yep and here's another one so this is

1041.52

another theme called power man

1043.839

which is a

1045.439

condensed version

1047.919

i'm with you

1049.28

it's really cool

1053.52

any other questions

1061.52

bring none

1068.799

with that we'll wrap things up we

1070.88

appreciate your time and if you'd like

1072.96

to discuss any of these topics further

1075.36

just reach out to us

1077.12

we're on info developer.com

1080.24

we're also on

1082

twitter at developerner we're still on

1084.64

facebook at facebook.com

1086.96

developmenter

1088.72

and you can reach us on our contact us

1090.799

page at developernerd.com

1093.76

our videos are also on vimeo

1096.24

and we're also on

1099.2

youtube

1100.48

so

1101.52

come check out our blogs and our videos

1103.919

and

1104.72

as always our goal is making every

1106.559

developer better have a great day

1111.29

[Music]

1125.919

you