summaryrefslogtreecommitdiff
path: root/tools/neo4j-cypher
diff options
context:
space:
mode:
Diffstat (limited to 'tools/neo4j-cypher')
-rwxr-xr-xtools/neo4j-cypher34
1 files changed, 0 insertions, 34 deletions
diff --git a/tools/neo4j-cypher b/tools/neo4j-cypher
deleted file mode 100755
index c2aee707..00000000
--- a/tools/neo4j-cypher
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/usr/bin/python
-
-import json
-import sys
-import time
-import argparse
-
-help = """Welcome to neo4j-cypher, a tool to submit cypher queries to neo4j
-This tool follows the neo4j REST API and allows submitting queries from command
-line or standard in without using neo4j-shell since that doesn't work on all machines.
-It relies on curl right now although this could be replaced with straight python.
-"""
-
-import rhizi_tools_neo4j
-
-def main(statements):
- one_at_a_time = False
- if len(statements) == 0:
- statements = [l.strip() for l in sys.stdin.readlines() if l.strip()[:2] != '//' and l.strip() != ""]
- one_at_a_time = True
- print("----------------------------------------------------------------------")
- print "\n".join(statements)
- print("----------------------------------------------------------------------")
- results = rhizi_tools_neo4j.run(statements=statements, one_at_a_time=one_at_a_time)
- for result in results:
- json.dump(result, sys.stdout, sort_keys=True, indent=4, separators=(',', ': '))
- print()
-
-if __name__ == '__main__':
- parser = argparse.ArgumentParser(description=help, add_help=True)
- parser.add_argument('--verbose', action='store_true', default=False)
- args, statements = parser.parse_known_args(sys.argv[1:])
- verbose = args.verbose
- main(statements)