aboutsummaryrefslogtreecommitdiffhomepage
path: root/docs/usingBookmaker.bmh
blob: 65a8df561f8a126da68bf0c8f9a1ce10c16969ca (plain)
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
#External
SkXXX
bmh_SkXXX
CL
C
Visual_Studio
##

#Topic Bookmaker

How to use the Bookmaker utility.

Get the fiddle command line interface tool.

#Code
$ go get go.skia.org/infra/fiddle/go/fiddlecli
##

Get the Bookmaker CL and build it.

#Code
$ git cl patch 9919
$ ninja -C out/dir bookmaker
##

Generate an starter Bookmaker file from an existing include.
This writes SkXXX.bmh in the current directory, which is
out/dir/obj/ from an IDE.

#Code
$ ./out/dir/bookmaker -t -i include/core/SkXXX.h
##

Use your favorite editor to fill out SkXXX.bmh.

Generate fiddle.json from all examples, including the ones you just wrote.
Error checking is syntatic: starting keywords are closed, keywords have the
correct parents.
If you run Bookmaker inside Visual_Studio, you can click on errors and it
will take you to the source line in question.

#Code
$ ./out/dir/bookmaker -e fiddle.json -b current_directory
##

Once complete, run fiddlecli to generate the example hashes.
Errors are contained by the output but aren't reported yet.

#Code
$ $GOPATH/bin/fiddlecli --input fiddle.json --output fiddleout.json
##

Generate bmh_SkXXX.md from SkXXX.bmh and fiddleout.json.
Error checking includes: undefined references, fiddle compiler errors,
missing or mismatched printf output.
Again, you can click on any errors inside Visual_Studio.

#Code
$ ./out/dir/bookmaker -r site/user/api -b current_directory -f fiddleout.json
##

The original include may have changed since you started creating the markdown.
Check to see if it is up to date.
This reports if a method no longer exists or its parameters have changed.

#Code
$ ./out/dir/bookmaker -x -b current_directory/SkXXX.bmh -i include/core/SkXXX.h
##

#Topic Bugs
#List
overaggressive reference finding in code block
missing examples
redundant examples -- got tired so used the same one more than once
some examples need vertical resizing
list doesn't work (ironic, huh)
##
##

#Topic To_Do
#List
check that all methods have one line descriptions in overview
see also -- anything that can be done automatically? maybe any ref shows up everywhere
index by example png
generate pdf or pdf-like out
generate b/w out instead of color -- have b/w versions of examples?
formalize voice / syntax for parts of topic and method
write bmh data back into include
    have a way to write one block that covers multiple nearly indentical methods?
    may want to do this for pdf view as well
write a one-method-per-page online view?
##
##

#Topic Bookmaker ##