Grence

Textconv

Read a Graph blob, convert it to text format, and output the result to stdout

The textconv command reads a Graph blob file, converts it from one supported format to another, and prints the converted result to stdout. This command is useful for inspecting or transforming Graph file contents without modifying the original file.

The textconv command is used internally by Git Graph and is not intended to be used directly by users.

Usage

$ git graph textconv [options] <path>

Description

Run the textconv command with the source file path as an argument. The command converts the file contents from the specified source format (using the --from option) into a target format (using the --to option) and outputs the result directly to standard output. This is particularly useful for quickly previewing or processing Graph blobs as human-readable text.

If no options are provided, the command assumes the source format is jsonl and the target format is json.

Arguments

  • path

    The path of the Graph blob file to read and convert.

Options

  • -f, --from <format> (default: jsonl)

    The source format to parse from.

    Choices: pg, json, jsonl, cypher, neo4j, dot, tgf, canvas, graphology, ncol

  • -t, --to <format> (default: json)

    The target format to serialize to.

    Choices: pg, json, jsonl, cypher, cypherl, neo4j, dot, tgf, canvas, graphology, ncol, xml, yarspg, csv, neptune, mmd, gexf

  • -h, --help

    Display help for the command.

All conversion choices are case-sensitive. Ensure that the specified source and target formats are supported.

Examples

Help

$ git graph textconv -h
 
Usage: git-graph textconv [options] <path>
 
Read a Graph blob, convert it to text format, and output the result to stdout
 
Arguments:
  path                 Path of the file to read
 
Options:
  -f, --from <format>  Source format to parse from (choices: "pg", "json", "jsonl", "cypher", "neo4j", "dot", "tgf", "canvas", "graphology", "ncol", default: "jsonl")
  -t, --to <format>    Target format to serialize to (choices: "pg", "json", "jsonl", "cypher", "cypherl", "neo4j", "dot", "tgf", "canvas", "graphology", "ncol", "xml", "yarspg",
                       "csv", "neptune", "mmd", "gexf", default: "json")
  -h, --help           display help for command
 
Supported conversion formats:
  pg         from/to PG format
  json       from/to PG-JSON
  jsonl      from/to PG-JSONL
  cypher     from/to Cypher CREATE statements
  cypherl    to CYPHERL (one query per line, requires id property)
  neo4j      from/to Neo4J database (via Cypher query)
  dot        from/to GraphViz DOT
  tgf        from/to Trivial Graph Format
  canvas     from/to JSON Canvas (experimental)
  graphology from/to Graphology import/export
  ncol       from/to NCOL file format
  xml        to GraphML
  yarspg     to YARS-PG
  csv        to OpenCypher/Neo4J CSV files
  neptune    to Neptune CSV import (aka Gremlin load data format)
  mmd        to Meermaid Flowchart (experimental)
  gexf       to Graph Exchange XML Format (GEXF)

How is this guide?

On this page