You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This folder contains the AsciiDoc source files used to produce the HTML, XML (DOCBOOK), EPUB, MOBI and PDF output.
5
4
6
-
The `Practical-Gremlin.adoc` file contains links to the different sections of the book. The names of the other AsciiDoc format files follow the naming convention : __*Section-\*.adoc*__. You can browse `Practical-Gremlin.adoc` and the various 'Section-\*.adoc' files directly from within GitHub, but you will not get the full color coding, chapter numbering, and other niceties that are present in the HTML and PDF versions; as they have been run through an AsciiDoc processor and had various style sheets and code pretty printers applied. Your mileage may vary, but I find the HTML and PDF versions to be the most pleasing to read. The PDF version includes page numbers, the HTML version is one continuous document.
5
+
This folder contains the AsciiDoc source files used to produce the HTML, XML
6
+
(DOCBOOK), EPUB, MOBI, and PDF output.
7
7
8
-
The '.adoc' files in this folder represent the most recent updates and may not have been published elsewhere yet, even in preview form. The other formats (HTML,DocBook,PDF, ePub and MOBI) will be generated once there are enough updates to make it worthwhile creating a full release.
8
+
The `Practical-Gremlin.adoc` file contains links to the different sections of the
9
+
book. The names of the other AsciiDoc format files follow the naming convention:
10
+
__*Section-\*.adoc*__. You can browse `Practical-Gremlin.adoc` and the various
11
+
'Section-\*.adoc' files directly from within GitHub, but you will not get the full
12
+
color coding, chapter numbering, and other niceties that are present in the HTML and
13
+
PDF versions; as they have been run through an AsciiDoc processor and had various
14
+
style sheets and code pretty printers applied. Your mileage may vary, but I find the
15
+
HTML and PDF versions to be the most pleasing to read. The PDF version includes page
16
+
numbers, the HTML version is one continuous document.
17
+
18
+
The '.adoc' files in this folder represent the most recent updates and may not have
19
+
been published elsewhere yet, even in preview form. The other formats (HTML, DocBook,
20
+
PDF, ePub, and MOBI) will be generated once there are enough updates to make it
21
+
worthwhile creating a full release.
9
22
10
23
## Building the book
11
-
If you want to build the output format files yourself they can be generated by running the `make-book.sh` script. The script assumes you have Asciidoctor installed (which is a Ruby Gem) as well as Pygments.rb (another Ruby Gem). The tools can be installed using various package managers and are available on most, commonly used, desktop operating system platforms.
12
24
13
-
To do the conversion to MOBI and EPUB the script assumes that Calibre and Pandoc are installed. I have successfully built the book on several Linux distros including Ubuntu, CentOS and Red Hat. I have successfully used Asciidoctor on Mac OS as well, but I always use Linux to produce the EPUB abd MOBI versions.
25
+
If you want to build the output format files yourself, they can be generated by
26
+
running the `make-book.sh` script. The script assumes you have Asciidoctor installed
27
+
(which is a Ruby Gem) as well as Pygments.rb (another Ruby Gem). The tools can be
28
+
installed using various package managers and are available on most, commonly used,
29
+
desktop operating system platforms.
30
+
31
+
To do the conversion to MOBI and EPUB, the script assumes that Calibre and Pandoc are
32
+
installed. I have successfully built the book on several Linux distros, including
33
+
Ubuntu, CentOS, and Red Hat. I have successfully used Asciidoctor on macOS as well,
34
+
but I always use Linux to produce the EPUB and MOBI versions.
14
35
15
36
### Building the HTML version
16
-
```
37
+
38
+
```shell
17
39
asciidoctor Practical-Gremlin.adoc
18
40
```
19
41
20
42
### Building the PDF version
21
-
```
43
+
44
+
```shell
22
45
asciidoctor-pdf Practical-Gremlin.adoc
23
46
```
24
47
25
48
### Building additional versions
26
-
The XML (DOCBOOK) file is generated using Asciidoctor and can be viewed on Linux using the Yelp tool among many others or used to produce other formats. The EPUB and MOBI files can be viewed using most popular e-book readers and some browsers.
27
49
28
-
Please note that the DOCBOOK, EPUB and MOBI format files currently do not have all of the nice source code highlighting and colors that the HTML and PDF versions have.
50
+
The XML (DOCBOOK) file is generated using Asciidoctor and can be viewed on Linux
51
+
using the Yelp tool among many others or used to produce other formats. The EPUB and
52
+
MOBI files can be viewed using most popular e-book readers and some browsers.
29
53
30
-
```
54
+
Please note that the DOCBOOK, EPUB, and MOBI format files currently do not have all
55
+
the nice source code highlighting and colors that the HTML and PDF versions have.
56
+
57
+
```shell
31
58
# Docbook / XML
32
59
asciidoctor -n -b docbook -d book Practical-Gremlin.adoc -o krltemp.xml
33
60
sed -e s/language=\"groovy\"/language=\"java\"/ krltemp.xml > Practical-Gremlin.xml
Preview versions of the book in HTML are automatically published [here](https://krlawrence.github.io/graph/) as changes arrive to the `main` branch of the repository.
47
73
48
74
## How the book is organized
49
-
This is the current layout of the second edition. As work progresses additional chapters
50
-
may be added and the layout further refined.
51
75
52
-
**Chapter 1 - INTRODUCTION**
76
+
This is the current layout of the second edition. As work progresses, additional
77
+
chapters may be added and the layout further refined.
78
+
79
+
**Chapter 1 – INTRODUCTION**
53
80
- We start our journey with a brief introduction to Apache Tinkerpop and a quick look
54
81
at why Graph databases are of interest to us. We also discuss how the book is
55
-
organized and where to find additional materials; such as sample code and data
82
+
organized and where to find additional materials, such as sample code and data
56
83
sets.
57
84
58
-
**Chapter 2 - GETTING STARTED**
85
+
**Chapter 2 – GETTING STARTED**
59
86
- Many of the examples throughout the book use the Gremlin Console and TinkerGraph,
60
87
and both are introduced in this chapter. We also introduce the air-routes example
61
-
graph - `air-routes.graphml` - used throughout the book.
88
+
graph - `air-routes.graphml` - used throughout the book.
62
89
63
90
**Chapter 3 - WRITING GREMLIN QUERIES**
64
91
- Now that the basics have been covered, things start to get a lot more interesting!
65
-
It's time to start writing Gremlin queries. We
66
-
briefly explore how we could have built the 'air-routes' graph using a
67
-
relational database, and then look at how SQL and Gremlin are both similar in some
68
-
way,s and very different in others. We then introduce several of the key Gremlin
69
-
query language '"steps"'. We focus on exploring the graph rather than changing it
70
-
in this chapter.
92
+
It's time to start writing Gremlin queries. We briefly explore how we could have
93
+
built the 'air-routes' graph using a relational database, and then look at how SQL
94
+
and Gremlin are both similar in some ways and very different in others. We then
95
+
introduce several of the key Gremlin query language '"steps"'. We focus on
96
+
exploring the graph rather than changing it in this chapter.
71
97
72
98
**Chapter 4 - BEYOND BASIC QUERIES**
73
99
- Having now introduced Gremlin in some detail, we introduce the Gremlin steps that
74
-
can be used to create, modify and delete, data. We present a selection of best
100
+
can be used to create, modify, and delete, data. We present a selection of best
75
101
practices and start to explore some more advanced query writing.
76
102
77
-
**Chapter 5 - MISCELLANEOUS QUERIES AND THE RESULTS THEY GENERATE**
103
+
**Chapter 5 – MISCELLANEOUS QUERIES AND THE RESULTS THEY GENERATE**
78
104
- Using the Gremlin steps introduced in Chapters 3 and 4, we are now ready to use
79
105
what we have learned so far and write queries that analyze the air-routes graph in
80
106
more depth and answer more complicated questions. The material presented includes
81
107
a discussion of analyzing distances, route distribution, and writing geospatial
82
108
queries.
83
109
84
-
**Chapter 6 - MOVING BEYOND THE GREMLIN CONSOLE**
110
+
**Chapter 6 – MOVING BEYOND THE GREMLIN CONSOLE**
85
111
- The next step in our journey is to move beyond the Gremlin console and take a look
86
112
at interacting with a TinkerGraph using Java and Groovy applications.
87
113
@@ -91,15 +117,15 @@ may be added and the layout further refined.
91
117
remotely hosted graphs.
92
118
93
119
**Chapter 8 - COMMON GRAPH SERIALIZATION FORMATS**
94
-
- Having introduced Gremlin Server we take a look at some common Graph serialization
120
+
- Having introduced Gremlin Server, we take a look at some common Graph serialization
95
121
file formats along with coverage of how to use them in the context of TinkerPop
96
122
enabled graphs. We take a close look at the TinkerPop GraphSON (JSON) format which
97
123
is used extensively when using Gremlin queries in conjunction with a Gremlin
98
124
Server.
99
125
100
-
**Chapter 9 - FURTHER READING**
126
+
**Chapter 9 – FURTHER READING**
101
127
- Our journey to explore Apache TinkerPop and Gremlin concludes with a look at
102
-
useful sources of further reading. We present l links to useful web sites where you
128
+
useful sources of further reading. We present l links to useful websites where you
103
129
can find tools and documentation for many of the topics and technologies covered in
0 commit comments