justincy / signs-of-the-second-coming

Exploring the order of the signs of the Second Coming of Christ as mentioned in scripture
https://www.greatdayofthelord.org/
1 stars 0 forks source link

Publish scripture references #2

Closed justincy closed 5 years ago

justincy commented 5 years ago

I want to share the scripture references from which I derived signs and relationships. I'd like for a panel to slide in when a sign is clicked on that lists the references.

Right now the scripture references are notes immediately before the signs.

https://github.com/justincy/signs-of-the-second-coming/blob/6fa9e73742f990bbc9d7cc4b97f57367a943fcf1/graphs/signs.gv#L9

Sometimes we get many signs from a single reference in which case I still use the preceding reference.

https://github.com/justincy/signs-of-the-second-coming/blob/6fa9e73742f990bbc9d7cc4b97f57367a943fcf1/graphs/signs.gv#L39

How would I do this? I eventually want to build a DB, but I don't need it immediately for this. When processing the graph (which I already do line by line) I can extract and store the references grouped with the signs.

How would I get that data down to the client? JSON.

justincy commented 5 years ago

I might want the scripture refs to be annotated both on the signs (nodes) as well as the links (edges). If I just do the nodes then I don't have to make many big changes in processing the graph, but if I do the edges too then I would need to update the graph to have objects representing the edges, and that would be a much larger change. But I think it'd be useful. I'd love to hover over or click on an edge and see the scripture references which support that edge.

justincy commented 5 years ago

Though I currently have scriptures references annotating the edges, it is actually easier to publish them on the nodes and not edges for two reasons:

  1. The graph processing I do is centered on nodes and doesn't have edges as a first-class citizen (that can be changed with a little refactoring)
  2. When running different processes to simplify the graph, I will never delete nodes (I merge some, but don't delete) however I will likely delete edges when doing #6, and so I'd be losing some data. But maybe I don't need to care about losing annotations for data I'm not displaying? After all, I plan on showing both the full and simplified versions.
justincy commented 5 years ago

This isn't going to be so easy. I thought that I could just have the parse keep track of the last comment and annotate all subsequent data with it until another ref is seen. However, I have some comments in there. The comments are problematic because they are often between the scripture ref and the signs. So I have to ignore the comments. Developing a parser that can distinguish scripture refs from other comments will be more work than it's worth. I think I can just go through and have all comments be preceded with ## and leave scripture refs with a single #. That way the parse can ignore ## and only look at #.

justincy commented 5 years ago

I just quickly implemented a process that extracts the scripture reference data (without assembling the graph) and outputs it to a JSON file. I did it independent of the graph because it was easier. However, I just realized that it only works for the full version of the graph. I can't use that method for the simplified version because I lose the refs unless I process it with the graph. So I guess I need to put it in with the graph processing.

justincy commented 5 years ago

I'm building the refs json for both full and simplified now. Next step is to use the data in the UI.