Create flowchart from CSV?

To all authors creating branching stories, a question!

Do you happen to know any free software that can generate a flow chart, a mind map or a node map from a CSV file containing origin nodes and destination nodes?

Extra points: local application, not an online service.

Double extra points: runs on Linux.

Triple extra points: can run it from the command line so I can automate it every time I build the story.

Goal: visualizing the shape of the story, and possible paths leading to a certain passage.

What about the Twine interface itself? 2 things about it: first, that I’m using Twee, not Twine itself; and, even if I imported my story into Twine, it wouldn’t show lines between passages because I don’t use the standard Twine links.

Any ideas? Thanks!

2 Likes

Never tried it, but it sounds like Gephi can take CSV files?

1 Like

My go to for directed graphs remains graphviz.
As far as I know it doesn’t accept CSV input, but if you know enough to want to run in automatically you probably also know enough to write a ten line (python/ruby/your favorite language) script to transform csv into dot (their graph description language).

2 Likes

You can check out the thing I made. Maybe it’s what you’re looking for. It turns Twine games into dot files to use with graphviz (and also epub files, but that’s unrelated).

https://github.com/Tayruh/gamebook_markdown

Edit:

it wouldn’t show lines between passages because I don’t use the standard Twine links

A trick that works with my converter (and possibly with Twine itself) is to put the link inside HTML comments. So if you use a macro to create the link, you can force it to be seen in the converter with <!-- [[wherever]] -->.

My converter runs on the command line and is written in JS for use with node.js. I have a compiled Linux version in the releases but I haven’t tested it. Graphviz works from the command and is easily installed in Linux via the package manager (or at least I would assume since it’s so popular). I got graphviz to install on my android phone using the package manager and can use my converter with no issues.

3 Likes

I came here to suggest Gephi, which will happily take .csv files describing nodes and edges and create a visualization of them. My experience, though, was that getting it running under Linux was a real slog, in part because it requires a comparatively old version of Java, and setting it up requires tinkering with the Java setup on the host machine. (In particular, when I tried it circa 2016, it wound up requiring installing only the Oracle version of Java, only version 7, and purging all other version of Java from the machine. It was complex enough that I wound up building a new Linux setup in a virtual machine just to support running Gephi.)

It’s been a few years since I’ve tried it, though, so maybe things have gotten better.

2 Likes

@JoshGrams @patrick_mooney I had forgotten Gephi! I used it myself, in fact, years ago. I’ll take another look.

@nilsf I’ll take a look at graphviz, and that converter @tayruh made looks awesome, perhaps that’s exactly the solution I need. Thanks!

3 Likes