-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
63 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,9 @@ | ||
ROWS=15 | ||
TABLE_START_LINE="[embedmd]:# (table.md)" | ||
|
||
build: | ||
go run scripts/csvgen.go -path ./presentations -out data.csv -rows $(ROWS) | ||
cat data.csv | mdtable csv > table.md | ||
embedmd -w README.md | ||
|
||
# Find the line where the table embedmd starts | ||
TABLE_START=$$(grep -n $(TABLE_START_LINE) README.md | cut -d: -f1) | ||
|
||
# Delete the line immediately after the TABLE_START line | ||
sed -i '' "$$((TABLE_START+1))d" README.md | ||
|
||
# Skip 2 + ROWS lines and delete that line | ||
sed -i '' "$$((TABLE_START+2+$(ROWS)))d" README.md | ||
go run scripts/csvgen.go -path ./presentations -out scripts/data.csv -rows $(ROWS) | ||
cat scripts/data.csv | go run moul.io/mdtable csv > scripts/table.md | ||
go run github.com/leohhhn/embedmd -w README.md | ||
|
||
# Clean up | ||
rm data.csv table.md | ||
rm scripts/data.csv scripts/table.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,26 @@ | ||
module github.com/gnolang/workshops | ||
|
||
go 1.22 | ||
go 1.22.0 | ||
|
||
toolchain go1.22.3 | ||
|
||
require ( | ||
github.com/gnolang/gno v0.2.0 | ||
github.com/leohhhn/embedmd v0.0.0-20240927092809-8e38263bfca4 | ||
github.com/soypat/go-presentx v1.1.0 | ||
golang.org/x/tools v0.23.0 | ||
gopkg.in/yaml.v3 v3.0.1 | ||
moul.io/mdtable v1.0.0 | ||
) | ||
|
||
require ( | ||
github.com/peterbourgon/ff/v3 v3.4.0 // indirect | ||
github.com/pmezard/go-difflib v1.0.0 // indirect | ||
github.com/soypat/rebed v0.2.2 // indirect | ||
github.com/yuin/goldmark v1.4.13 // indirect | ||
golang.org/x/net v0.27.0 // indirect | ||
golang.org/x/sys v0.22.0 // indirect | ||
golang.org/x/term v0.22.0 // indirect | ||
moul.io/banner v1.0.1 // indirect | ||
moul.io/climan v1.0.0 // indirect | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters