Skip to content

Commit 8eab243

Browse files
authored
Merge pull request chaincodelabs#69 from willcl-ark/epub
2 parents 2a41b3c + 33865ba commit 8eab243

40 files changed

+147
-1030
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ _site
66
.jekyll-cache
77
.jekyll-metadata
88
vendor
9+
images

Gemfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ source 'https://rubygems.org'
55
## version.
66
ruby '3.2.2'
77

8+
gem "asciidoctor", "~>2.0.20"
9+
gem "rouge"
10+
811
## If you add a new Gem below, run `bundle install` to install it.
912
group :development do
1013
gem "jekyll", "~> 4.3.2"
@@ -16,11 +19,14 @@ group :development do
1619
end
1720

1821
group :jekyll_plugins do
22+
gem "asciidoctor-diagram"
1923
gem "jekyll-feed", "~> 0.12"
2024
gem "jekyll-asciidoc", "~> 3.0.0"
21-
gem "asciidoctor-diagram"
25+
end
26+
27+
group :asciidoc_plugins do
28+
gem "asciidoctor-epub3"
2229
gem "asciidoctor-pdf"
23-
gem 'rouge'
2430
end
2531

2632
group :testing do

Gemfile.lock

Lines changed: 37 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,17 @@ GEM
66
public_suffix (>= 2.0.2, < 6.0)
77
afm (0.2.2)
88
asciidoctor (2.0.20)
9-
asciidoctor-diagram (2.2.11)
9+
asciidoctor-diagram (2.2.14)
1010
asciidoctor (>= 1.5.7, < 3.x)
1111
asciidoctor-diagram-ditaamini (~> 1.0)
1212
asciidoctor-diagram-plantuml (~> 1.2021)
1313
rexml
1414
asciidoctor-diagram-ditaamini (1.0.3)
15-
asciidoctor-diagram-plantuml (1.2023.10)
15+
asciidoctor-diagram-plantuml (1.2023.12)
16+
asciidoctor-epub3 (1.5.1)
17+
asciidoctor (>= 1.5.6, < 3.0.0)
18+
gepub (~> 1.0.0)
19+
mime-types (~> 3.0)
1620
asciidoctor-pdf (2.3.9)
1721
asciidoctor (~> 2.0)
1822
concurrent-ruby (~> 1.1)
@@ -23,12 +27,12 @@ GEM
2327
prawn-table (~> 0.2.0)
2428
prawn-templates (~> 0.1.0)
2529
treetop (~> 1.6.0)
26-
async (2.6.3)
30+
async (2.6.5)
2731
console (~> 1.10)
2832
fiber-annotation
2933
io-event (~> 1.1)
3034
timers (~> 4.1)
31-
chef-utils (18.2.7)
35+
chef-utils (18.3.0)
3236
concurrent-ruby
3337
colorator (1.1.0)
3438
concurrent-ruby (1.2.2)
@@ -43,11 +47,14 @@ GEM
4347
ethon (0.16.0)
4448
ffi (>= 1.15.0)
4549
eventmachine (1.2.7)
46-
ffi (1.15.5)
50+
ffi (1.16.3)
4751
fiber-annotation (0.2.0)
4852
fiber-local (1.0.0)
4953
forwardable-extended (2.6.0)
50-
google-protobuf (3.24.0-x86_64-linux)
54+
gepub (1.0.15)
55+
nokogiri (>= 1.8.2, < 2.0)
56+
rubyzip (> 1.1.1, < 2.4)
57+
google-protobuf (3.25.1-x86_64-linux)
5158
hashery (2.1.2)
5259
html-proofer (5.0.8)
5360
addressable (~> 2.3)
@@ -61,7 +68,7 @@ GEM
6168
http_parser.rb (0.8.0)
6269
i18n (1.14.1)
6370
concurrent-ruby (~> 1.0)
64-
io-event (1.2.3)
71+
io-event (1.3.3)
6572
jekyll (4.3.2)
6673
addressable (~> 2.4)
6774
colorator (~> 1.0)
@@ -78,11 +85,13 @@ GEM
7885
safe_yaml (~> 1.0)
7986
terminal-table (>= 1.8, < 4.0)
8087
webrick (~> 1.7)
81-
jekyll-asciidoc (3.0.0)
82-
asciidoctor (>= 1.5.0)
88+
jekyll-asciidoc (3.0.1)
89+
asciidoctor (>= 1.5.0, < 3.0.0)
8390
jekyll (>= 3.0.0)
8491
jekyll-feed (0.17.0)
8592
jekyll (>= 3.7, < 5.0)
93+
jekyll-include-cache (0.2.1)
94+
jekyll (>= 3.7, < 5.0)
8695
jekyll-redirect-from (0.16.0)
8796
jekyll (>= 3.3, < 5.0)
8897
jekyll-sass-converter (3.0.0)
@@ -91,10 +100,11 @@ GEM
91100
jekyll (>= 3.8, < 5.0)
92101
jekyll-watch (2.2.1)
93102
listen (~> 3.0)
94-
json-schema (4.0.0)
103+
json-schema (4.1.1)
95104
addressable (>= 2.8)
96-
just-the-docs (0.5.4)
105+
just-the-docs (0.7.0)
97106
jekyll (>= 3.8.5)
107+
jekyll-include-cache
98108
jekyll-seo-tag (>= 2.0)
99109
rake (>= 12.3.1)
100110
kramdown (2.4.0)
@@ -106,19 +116,22 @@ GEM
106116
rb-fsevent (~> 0.10, >= 0.10.3)
107117
rb-inotify (~> 0.9, >= 0.9.10)
108118
matrix (0.4.2)
109-
mdl (0.12.0)
119+
mdl (0.13.0)
110120
kramdown (~> 2.3)
111121
kramdown-parser-gfm (~> 1.1)
112122
mixlib-cli (~> 2.1, >= 2.1.1)
113123
mixlib-config (>= 2.2.1, < 4)
114124
mixlib-shellout
115125
mercenary (0.4.0)
126+
mime-types (3.5.1)
127+
mime-types-data (~> 3.2015)
128+
mime-types-data (3.2023.1003)
116129
mixlib-cli (2.1.8)
117130
mixlib-config (3.0.27)
118131
tomlrb
119132
mixlib-shellout (3.2.7)
120133
chef-utils
121-
nokogiri (1.15.4-x86_64-linux)
134+
nokogiri (1.15.5-x86_64-linux)
122135
racc (~> 1.4)
123136
parslet (2.0.0)
124137
pathutil (0.16.2)
@@ -145,18 +158,19 @@ GEM
145158
prawn-templates (0.1.2)
146159
pdf-reader (~> 2.0)
147160
prawn (~> 2.2)
148-
public_suffix (5.0.3)
149-
racc (1.7.1)
161+
public_suffix (5.0.4)
162+
racc (1.7.3)
150163
rainbow (3.1.1)
151-
rake (13.0.6)
164+
rake (13.1.0)
152165
rb-fsevent (0.11.2)
153166
rb-inotify (0.10.1)
154167
ffi (~> 1.0)
155168
rexml (3.2.6)
156-
rouge (4.1.3)
169+
rouge (4.2.0)
157170
ruby-rc4 (0.1.5)
171+
rubyzip (2.3.2)
158172
safe_yaml (1.0.5)
159-
sass-embedded (1.64.2-x86_64-linux-gnu)
173+
sass-embedded (1.69.5-x86_64-linux-gnu)
160174
google-protobuf (~> 3.23)
161175
terminal-table (3.0.2)
162176
unicode-display_width (>= 1.1.1, < 3)
@@ -167,18 +181,20 @@ GEM
167181
treetop (1.6.12)
168182
polyglot (~> 0.3)
169183
ttfunk (1.7.0)
170-
typhoeus (1.4.0)
184+
typhoeus (1.4.1)
171185
ethon (>= 0.9.0)
172-
unicode-display_width (2.4.2)
186+
unicode-display_width (2.5.0)
173187
webrick (1.8.1)
174188
yell (2.2.2)
175-
zeitwerk (2.6.11)
189+
zeitwerk (2.6.12)
176190

177191
PLATFORMS
178192
x86_64-linux
179193

180194
DEPENDENCIES
195+
asciidoctor (~> 2.0.20)
181196
asciidoctor-diagram
197+
asciidoctor-epub3
182198
asciidoctor-pdf
183199
html-proofer
184200
jekyll (~> 4.3.2)

Makefile

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
all: test-before-build build-other-versions build test-after-build
2+
build-other-versions: html pdf epub
23
publish: test-before-build build-other-versions build
34
production: clean all production-test
45

@@ -45,14 +46,20 @@ test-after-build: build
4546
## Check for broken links
4647
bundle exec htmlproofer --disable-external --ignore-urls '/^\/bin/.*/' ./_site
4748

48-
build-other-versions:
49+
html:
4950
mkdir -p bin
5051
## Single page HTML
5152
## Set imagesdir to parent_dir/images to work with jekyll build
52-
bundle exec asciidoctor -r asciidoctor-diagram -o onboarding-to-bitcoin-core.html index.adoc --attribute imagesdir=../images
53+
bundle exec asciidoctor -r asciidoctor-diagram -o onboarding-to-bitcoin-core.html index.adoc
5354
## Delete non-deterministic asciidoctor output
5455
sed -i '/^Last updated /d' onboarding-to-bitcoin-core.html
5556
mv onboarding-to-bitcoin-core.html bin/
56-
## PDF version
57-
bundle exec asciidoctor -r asciidoctor-pdf -b pdf -r asciidoctor-diagram -o onboarding-to-bitcoin-core.pdf index.adoc --attribute imagesdir=../images
57+
cp -r images bin/
58+
59+
pdf:
60+
bundle exec asciidoctor -r asciidoctor-pdf -b pdf -r asciidoctor-diagram -o onboarding-to-bitcoin-core.pdf index_pdf.adoc
5861
mv onboarding-to-bitcoin-core.pdf bin/
62+
63+
epub:
64+
asciidoctor -b epub3 -r asciidoctor-epub3 -r asciidoctor-diagram -o index.epub index_epub.adoc
65+
mv index.epub bin/onboarding-to-bitcoin-core.epub

_config.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
title: Bitcoin Core Onboarding
2222
2323
description: >- # this means to ignore newlines until "baseurl:"
24-
Bitcoin Core developer obboarding documentation
24+
Bitcoin Core developer onboarding documentation
2525
baseurl: "" # the subpath of your site, e.g. /blog
2626
url: "https://bitcoincore.academy" # the base hostname & protocol for your site, e.g. http://example.com
2727
twitter_username: chaincodelabs
@@ -30,14 +30,19 @@ github_username: chaincodelabs
3030
# Build settings
3131
theme: just-the-docs
3232
plugins:
33+
- asciidoctor-diagram
3334
- jekyll-feed
35+
- jekyll-asciidoc
3436

3537
asciidoc:
3638
processor: asciidoctor
3739

3840
asciidoctor:
3941
attributes:
40-
imagesdir: images
42+
imagesdir: /images
43+
mermaid-config: mermaid-config.json
44+
mermaid-format: svg
45+
mermaid-puppeteer-config: puppeteer-config.json
4146
source-highlighter: rouge
4247
rouge-style: github
4348
icons: font
@@ -67,6 +72,7 @@ mermaid:
6772
# their entries' file path in the `include:` list.
6873
exclude:
6974
- .jekyll-cache/
75+
- all_chapters.adoc
7076
- 01_overview-and-development.adoc
7177
- 02_architecture.adoc
7278
- 03_consensus-and-validation.adoc
@@ -79,7 +85,8 @@ exclude:
7985
- 10_rpc.adoc
8086
- asciidoc_workflow.adoc
8187
- index.adoc
82-
- old.index.adoc
88+
- index_pdf.adoc
89+
- index_epub.adoc
8390
- settings.adoc
8491
- README.adoc
8592
- book.html

addition-removal-mempool.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Transactions are removed from the mempool for a number of reasons:
4646
. The mempool must be trimmed back down below its maximum size `TrimToSize()`
4747

4848
.Removal from the mempool
49-
[mermaid,target=mempool-removal,format=svg,align="center"]
49+
[mermaid,target=mempool-removal,align="center"]
5050
....
5151
flowchart LR
5252
remove_staged["RemoveStaged()"]

all_chapters.adoc

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
include::01_overview-and-development.adoc[]
2+
3+
include::02_architecture.adoc[]
4+
5+
include::03_consensus-and-validation.adoc[]
6+
7+
include::04_wallet.adoc[]
8+
9+
include::05_gui.adoc[]
10+
11+
include::06_p2p.adoc[]
12+
13+
include::07_mempool.adoc[]
14+
15+
include::08_script.adoc[]
16+
17+
include::09_build-system.adoc[]
18+
19+
include::10_rpc.adoc[]
20+
21+
include::appendix.adoc[]
22+
23+
include::glossary.adoc[]

components-overview.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ WARNING: This diagram is **not** exhaustive and includes simplifications.
1111
NOTE: dashed lines indicate optional components
1212

1313
.`bitcoind` overview
14-
[mermaid, target=bitcoind-overview, format=svg, id=bitcoind-overview]
14+
[mermaid, target=bitcoind-overview, id=bitcoind-overview]
1515
....
1616
flowchart LR
1717
bitcoind
@@ -77,7 +77,7 @@ The following diagram gives a brief overview of the major components in bitcoin-
7777
WARNING: This diagram is **not** exhaustive and includes simplifications.
7878

7979
.`bitcoin-cli` overview
80-
[mermaid, target=bitcoin-cli-overview, format=svg, id=bitcoin-cli-overview-chart]
80+
[mermaid, target=bitcoin-cli-overview, id=bitcoin-cli-overview-chart]
8181
....
8282
flowchart LR
8383
BaseRequestHandler["BaseRequestHandler()"]
@@ -105,7 +105,7 @@ WARNING: This diagram is **not** exhaustive and includes simplifications.
105105
NOTE: dashed lines indicate optional components
106106

107107
.Wallet structure overview
108-
[mermaid, target=bitcoin-wallet-overview, format=svg]
108+
[mermaid, target=bitcoin-wallet-overview]
109109
....
110110
flowchart LR
111111
ScriptPubKeyMan --> DescriptorScriptPubKeyMan

consensus-and-validation.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
= Consensus and Validation
21
:page-nav_order: 20
32
:page-has_children: true
43
include::links-onepage.adoc[]
4+
= Consensus and Validation
55

66
TIP: This section has been updated to Bitcoin Core @ https://github.com/bitcoin/bitcoin/tree/v23.0[v23.0^]
77

images/ATMP-validation-flow.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)