Skip to content

Commit 5614558

Browse files
committed
generate png for pdf
1 parent 2a41b3c commit 5614558

31 files changed

+32
-971
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: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,13 @@ group :development do
1616
end
1717

1818
group :jekyll_plugins do
19+
gem "asciidoctor-diagram"
1920
gem "jekyll-feed", "~> 0.12"
2021
gem "jekyll-asciidoc", "~> 3.0.0"
21-
gem "asciidoctor-diagram"
22+
end
23+
24+
group :asciidoc_plugins do
25+
gem "asciidoctor-epub3"
2226
gem "asciidoctor-pdf"
2327
gem 'rouge'
2428
end

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,11 @@ build-other-versions:
4949
mkdir -p bin
5050
## Single page HTML
5151
## 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
52+
bundle exec asciidoctor --attribute imagesdir=./images --attribute mermaid-format=svg -r asciidoctor-diagram -o onboarding-to-bitcoin-core.html index.adoc
5353
## Delete non-deterministic asciidoctor output
5454
sed -i '/^Last updated /d' onboarding-to-bitcoin-core.html
5555
mv onboarding-to-bitcoin-core.html bin/
56+
cp -r images bin/
5657
## 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
58+
bundle exec asciidoctor --attribute imagesdir=./images --attribute mermaid-format=png -r asciidoctor-pdf -b pdf -r asciidoctor-diagram -o onboarding-to-bitcoin-core.pdf index.adoc
5859
mv onboarding-to-bitcoin-core.pdf bin/

_config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ asciidoc:
3838
asciidoctor:
3939
attributes:
4040
imagesdir: images
41+
mermaid-config: mermaid-config.json
42+
mermaid-format: svg
43+
mermaid-puppeteer-config: puppeteer-config.json
4144
source-highlighter: rouge
4245
rouge-style: github
4346
icons: font

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()"]

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

images/ATMP-validation-flow.svg

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

images/atmp-call-graph.svg

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

images/bitcoin-cli-overview.svg

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

images/bitcoin-core-tests.svg

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

0 commit comments

Comments
 (0)