forked from TrueBlocks/trueblocks-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rdme-cat.sh
executable file
·164 lines (151 loc) · 3.37 KB
/
rdme-cat.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
#!/usr/bin/env bash
## Runs from `trueblocks-core/docs/readmes`
## As we get better we can make this more robust, or rewrite it as something that makes more sense
SOURCE=https://raw.githubusercontent.com/TrueBlocks/trueblocks-core/develop/docs
READMES=$SOURCE/readmes
INTROS=$READMES/intros
CONTENT=content/docs/chifra
#DATE=`date "+%FT%T"`
DATE="2021-05-08T01:35:20"
#----------------------------------
ACCOUNTS=$CONTENT/accounts.md
cat << _EOF_ > $ACCOUNTS &&
---
title: "Accounts"
description: ""
lead: ""
date: $DATE
lastmod:
- :git
- lastmod
- date
- publishDate
draft: false
images: []
menu:
docs:
parent: "chifra"
weight: 1100
toc: true
---
_EOF_
echo "Building accounts page..."
curl -s $INTROS/accounts.md >> $ACCOUNTS && \
curl -s $READMES/apps/list.md >> $ACCOUNTS && \
curl -s $READMES/apps/acctExport/README.md >> $ACCOUNTS && \
curl -s $READMES/apps/monitors.md >> $ACCOUNTS && \
curl -s $READMES/tools/ethNames/README.md >> $ACCOUNTS && \
curl -s $READMES/tools/grabABI/README.md >> $ACCOUNTS
#----------------------------------
DATA=$CONTENT/chaindata.md
cat << _EOF_ > $DATA &&
---
title: "Chain Data"
description: ""
lead: ""
date: $DATE
lastmod:
- :git
- lastmod
- date
- publishDate
draft: false
images: []
menu:
docs:
parent: "chifra"
weight: 1200
toc: true
---
_EOF_
echo "Building chain data page..."
curl -s $INTROS/chaindata.md >> $DATA && \
curl -s $READMES/tools/getBlocks/README.md >> $DATA && \
curl -s $READMES/tools/getTrans/README.md >> $DATA && \
curl -s $READMES/tools/getReceipts/README.md >> $DATA && \
curl -s $READMES/tools/getLogs/README.md >> $DATA && \
curl -s $READMES/tools/getTraces/README.md >> $DATA && \
curl -s $READMES/tools/whenBlock/README.md >> $DATA
#----------------------------------
STATE=$CONTENT/chainstate.md
cat << _EOF_ > $STATE &&
---
title: "Chain State"
description: ""
lead: ""
date: $DATE
lastmod:
- :git
- lastmod
- date
- publishDate
draft: false
images: []
menu:
docs:
parent: "chifra"
weight: 1300
toc: true
---
_EOF_
echo "Building chain state page..."
curl -s $INTROS/chainstate.md >> $STATE && \
curl -s $READMES/tools/getState/README.md >> $STATE && \
curl -s $READMES/tools/getTokens/README.md >> $STATE
#----------------------------------
ADMIN=$CONTENT/admin.md
cat << _EOF_ > $ADMIN &&
---
title: "Admin"
description: ""
lead: ""
date: $DATE
lastmod:
- :git
- lastmod
- date
- publishDate
draft: false
images: []
menu:
docs:
parent: "chifra"
weight: 1400
toc: true
---
_EOF_
echo "Building admin page..."
curl -s $INTROS/admin.md >> $ADMIN && \
curl -s $READMES/apps/cacheStatus/README.md >> $ADMIN && \
curl -s $READMES/apps/serve.md >> $ADMIN && \
curl -s $READMES/apps/blockScrape/README.md >> $ADMIN && \
curl -s $READMES/apps/init.md >> $ADMIN && \
curl -s $READMES/apps/pinMan/README.md >> $ADMIN
#----------------------------------
OTHER=$CONTENT/other.md
cat << _EOF_ > $OTHER &&
---
title: "Other"
description: ""
lead: ""
date: $DATE
lastmod:
- :git
- lastmod
- date
- publishDate
draft: false
images: []
menu:
docs:
parent: "chifra"
weight: 1500
toc: true
---
_EOF_
echo "Building other page..."
curl -s $INTROS/other.md >> $OTHER && \
curl -s $READMES/tools/getQuotes/README.md >> $OTHER && \
curl -s $READMES/apps/fireStorm/README.md >> $OTHER && \
curl -s $READMES/tools/ethslurp/README.md >> $OTHER
echo "Pages built. To see what's changed, run git diff content/docs/chifra"