Initial testing
The first time I ran the CLI to import a document, it crashed. I sent the trace to BigPickle, and it fixed it. It was a minor issue with wiring, easily fixed.
I tried it on a markdown file exported from Scrivener, but Scrivener MD files don't use double newlines for paragraph breaks, and they don't add a newline at the end of a sentence, so I needed to add a mode that uses single line breaks (on read only).
Then to use that mode, I executed it as follows (my test chapter was copied into the
/tmp/dockb-test directory):
python -m dockb.cli.import_document /tmp/dockb-test --single-newline-paragraphs
It worked.
So then I tried the reconstruct_chapter CLI, and it produced the identical file:
python -m dockb.cli.reconstruct_chapter 2cf3f4b6-0754-4311-9e9c-f568009ef05e -o /tmp/dockb-test/Opening\ 1a.md
diff /tmp/dockb-test/Opening\ 1.md /tmp/dockb-test/Opening\ 1a.md
I pointed my browser at http://localhost:7474/browser/ used bolt,
and the password. Then used this query to see the graph of a whole chapter:
MATCH (d:Document {title: "dockb-test"})
MATCH (c:Chapter)-[rc:PART_OF]->(d)
MATCH (p:Paragraph)-[rp:PART_OF]->(c)
MATCH (s:Sentence)-[rs:PART_OF]->(p)
MATCH (t:Token)-[rt:PART_OF]->(s)
RETURN c, p, s, t, rc, rp, rs, rt
And when I zoomed up on the first paragraph, I found the first word, which is "Current" (as seen at the start of the markdown file).
---
id: 2cf3f4b6-0754-4311-9e9c-f568009ef05e
title: Opening 1
---
<span data-par-id="aa05dca7-eb1c-44c8-8364-3ec6468e6a62">
Current time.
</span>