DocGist is a tool that renders AsciiDoc documents fetched from GitHub gists or other sources. The rendering is performed in the browser using the asciidoctor.js library. The original use case for this was http://gist.neo4j.org/ which has additional features to create examples for the Neo4j graph database.
package y; | |
import java.io.BufferedReader; | |
import java.io.File; | |
import java.io.FileNotFoundException; | |
import java.io.FileReader; | |
import java.io.IOException; | |
import java.util.HashMap; | |
import java.util.Iterator; |
= The Neo4j GraphGist Console = | |
This is a sample GraphGist explaining some of the base concepts of sharing graphs using http://docs.neo4j.org/chunked/milestone/cypher-query-lang.html[the Cypher query language]. | |
[source,cypher] | |
---- | |
CREATE ({name:'you'})-[:SEE]->({name:'This GraphGist'})-[:FORK_ON_GITHUB]->(your_gistfile{name:'Your Gist'}) | |
CREATE (your_gistfile)-[:INSERT_ID_HERE]->({name:'Your GraphGist'}) | |
---- |
= The Neo4j GraphGist Console = | |
This is a sample GraphGist explaining some of the base concepts of sharing graphs using http://docs.neo4j.org/chunked/milestone/cypher-query-lang.html[the Cypher query language]. | |
// The following is a placeholder for a Cypher console. | |
//console | |
[source,cypher] | |
---- |
Neo4j GraphGists are a way to share documents including Cypher queries. The queries can be executed in an online console. GraphGists can be used to share examples or ideas or outline a question you have.
See also the GraphGist Collection and check out the GraphGist Challenge!
You create a GraphGist by creating a GitHub Gist in AsciiDoc and enter the URL to it in the form on this page. The GraphGist is just as private as the GitHub Gist you created.
You create a GraphGist by creating a GitHub Gist in AsciiDoc and enter the URL to it in the form on this page.
Click on the Page Source button in the menu to see the source for this GraphGist!
You create a GraphGist by creating a GitHub Gist in AsciiDoc and enter the URL to it in the form on this page. Alternatively, you can put an AsciiDoc document in Dropbox and enter the public URL in the form.
This GraphGist shows the basics of using AsciiDoc syntax and a few additions for GraphGists. The additions are entered as comments on their own line. They are: //console for a query console; //hide, //setup and //output to configure a query; //graph and //table to visualize queries and show a result table.
Click on the Page Source button in the menu to see the source for this GraphGist.
`CREATE UNIQUE` will make sure we don't create duplicate patterns. | |
Using this: `[r:ACTED_IN]` lets us return the relationship. |
= Business Rule / Recommendation gist = | |
Let's see if I can create a graphgist for business rules/simple recommendations. | |
//console | |
First, lets create the graph: | |
//setup | |
[source,cypher] |