mcdemarco / dotgraph

A Twine 2 proofing format that renders nodes as a GraphViz (dot) graph.
http://mcdemarco.net/tools/scree/dotgraph/
MIT License
7 stars 0 forks source link

Problem with Scandinavian Characters #9

Closed StoltHD closed 4 years ago

StoltHD commented 4 years ago

It seems that there are some problem with Passage Names that have Norwegian Characters ÆØÅ æøå in them ...

The Characters are just gone in the Graph and in the dot file.

mcdemarco commented 4 years ago

I haven't been able to reproduce this with the new version, so it may have been fixed along with some similar issues by an update to the underlying graphviz engine. Can you try again with the latest version (2.2.0; depending on your setup it may update automatically), and if you still have the issue, let me know what version of Twine and/or any compilers you're using?

StoltHD commented 4 years ago

Yes, I will run a test and come back to you with an update

Thanks for answering :-)

ons. 22. jul. 2020 kl. 05:22 skrev M. C. DeMarco notifications@github.com:

I haven't been able to reproduce this with the new version, so it may have been fixed along with some similar issues by an update to the underlying graphviz engine. Can you try again with the latest version (2.2.0; depending on your setup it may update automatically), and if you still have the issue, let me know what version of Twine and/or any compilers you're using?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mcdemarco/dotgraph/issues/9#issuecomment-662219175, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGWEGB5BK7TTJZ3KPVHIYT3R4ZLRDANCNFSM4OZ7LEGQ .

StoltHD commented 4 years ago

Sorry to confuse you, by deleting a respone ...

Problem was that the "offline" variant of the script (the link provided on your website, is still version 2.2.1, and that still have the error.

If I use the online version link, it report 2.2.0 and the the problems with the characters are gone ... so this is fixed ...

I just wonder if its possible to run all of this in real offline mode?, I see that the script path in the offline mode point to the viz.js on your website, not as an embeded js script nor a local js file ...

It might be that this is impossible because of the security settings in Chrome and other web browser, I just wanted to ask ...

StoltHD commented 4 years ago

Another problem is I had while testing this, was that if I download the zip from github,unpack it and try to use the when I try to use the local path to the format.js file ... I get a timeout error in Twine 2 .

mcdemarco commented 4 years ago

Sorry to confuse you, by deleting a respone ...

Problem was that the "offline" variant of the script (the link provided on your website, is still version 2.2.1, and that still have the error.

Looking at the offline files (http://mcdemarco.net/tools/scree/dotgraph/offline/format.js, http://mcdemarco.net/tools/scree/dotgraph/offline/header.html, depending on your twine version), they both seem to be DotGraph 2.2.0 and Viz 2.1.2.

If I use the online version link, it report 2.2.0 and the the problems with the characters are gone ... so this is fixed ...

Great! But I updated the online version and the offline version at the same time. Maybe you were still getting a cached version of the offline file somehow?

I just wonder if its possible to run all of this in real offline mode?, I see that the script path in the offline mode point to the viz.js on your website, not as an embeded js script nor a local js file ...

The entire viz file (actually, two files) is embedded in the offline file in script tags; it shouldn't have any external URLs linked. It makes for a large story file afterwards.

It might be that this is impossible because of the security settings in Chrome and other web browser, I just wanted to ask ...

Actually, it's impossible to run the online file in some configurations (like desktop Twine) because of security settings; that's the main reason for the offline versions.

mcdemarco commented 4 years ago

Another problem is I had while testing this, was that if I download the zip from github,unpack it and try to use the when I try to use the local path to the format.js file ... I get a timeout error in Twine 2 .

I haven't had a chance to look into this yet, but I will.

StoltHD commented 4 years ago

Did you really understand that last sentence ... wow ... I wrote it in the middle of the night and forgot to check it for any errors (English ar not my native language) ...

There might be a cache problem, but where is the cache for Twine 2?

I didn' figure out where the cache are, but after I deleted the app.asar file 2 times and reinstalled Twine 2 without having Dotgraph added as a format, and then added the offline version from you site, it reports the correct version

I have no clue to what or where got changed, but it's clearly a Twine 2 problem, not with Dotgraph.

Diggression:

Its a great tool, I'm not a writer, but I research history and genealogy outside of the "norrmal" lineage-linked approach trying to find relations to Events and people outside the families and how they affected my ancestors choices, and started to use Twine 2 to track relations that was difficult to find in other software, problem was that there was no "real" way to analyze all the none family relations I added, until I found your tools ...

I can use the graphviz file dotgraph generate in Tulip and generate a gml file that can be used in i.e. Cytoscape or Gephi, there I can add multiple graph networks and find the links and relations ...

So, it's a little unortodox way of using Twine and DotGraph and Dotscap, (I also use Scrivener 3 RC for Windows, Scapple, Freeplane, Gramps and some other tools for this ), but the graphical output of your tools really help to see some relations and between places, events, sources and people/families I can't get so easy from other tools ...

So thanks for taking the time to create this and to help me out :-)

Jaran

fre. 24. jul. 2020 kl. 06:39 skrev M. C. DeMarco notifications@github.com:

Another problem is I had while testing this, was that if I download the zip from github,unpack it and try to use the when I try to use the local path to the format.js file ... I get a timeout error in Twine 2 .

I haven't had a chance to look into this yet, but I will.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mcdemarco/dotgraph/issues/9#issuecomment-663343370, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGWEGBZFTVU2YDAUIAMZGKLR5EGBVANCNFSM4OZ7LEGQ .

mcdemarco commented 4 years ago

Did you really understand that last sentence ... wow ... I wrote it in the middle of the night and forgot to check it for any errors (English ar not my native language) ... There might be a cache problem, but where is the cache for Twine 2?

In the website version of Twine 2, a story format could be cached in local storage (though I'm not sure under what circumstances this happens), or the browser's cache could be using an old version when Twine 2 tries to retrieve it from the URL. In the downloaded version of Twine 2, the Electron engine seems to be caching story formats rather aggressively (Twine bug #566).

I didn' figure out where the cache are, but after I deleted the app.asar file 2 times and reinstalled Twine 2 without having Dotgraph added as a format, and then added the offline version from you site, it reports the correct version I have no clue to what or where got changed, but it's clearly a Twine 2 problem, not with Dotgraph.

There are a few Twine 2 issues involving story formats, but no open bugs for timeouts while loading a big story format. So I should still look into that, if only to report yet another story format bug to the author.

Diggression: Its a great tool, I'm not a writer, but I research history and genealogy outside of the "norrmal" lineage-linked approach trying to find relations to Events and people outside the families and how they affected my ancestors choices, and started to use Twine 2 to track relations that was difficult to find in other software, problem was that there was no "real" way to analize all the none family relations I added, until I found your tools ... I can use the graphviz file dotgraph generate in Tulip and generate a gml file that can be used in i.e. Cytoscape or Gephi, there I can add multiple graph networks and find the links and relations ... So, it's a little unortodox way of using Twine and DotGraph and Dotscap, (I also use Scrivener 3 RC for Windows, Scapple, Freeplane, Gramps and some other tools for this ), but the graphical output of your tools really help to see some relations and between places, events, sources and people/families I can't get so easy from other tools ... So thanks for taking the time to create this and to help me out :-)

Well, that's an unexpected (and complicated) use case! If you're just taking the plain text dot file out of dotgraph, you don't actually need the whole embedded Viz engine (though I imagine it's still helpful to preview the graph). Let me know if you could use a version that doesn't attempt to load Viz.js at all. Or if Tulip is only converting from dot to GML for you, I could probably output GML directly. It doesn't look all that different from the dot format, at least for the sort of dot files that DotGraph produces.

StoltHD commented 4 years ago

I only use Tulip to convert files, the interactive functions are a little buggy on Windows 10 insider ... and Cytoscape, Gephi and yEd have better ways of adding nodes and edges, and to Cytoscape and Gephi works really well on larger networks ...

Cytoscape can import gv and dot files, but have the same error with characters that you have fixed ...

I also export graphviz files from Gramps, and just learned that there are a merge application in Graphview that can merge multiple files, so that would be something to test ...

It would be really great if you manage to make a version with output to gml or graphml ... if you also found a easy way to add the whole passage text somehow it would be ultimate, but please dont see it as anything but a dream ... For the analyzes I can work with the work you have already done, I really appreciate it ...

So if you find a way and use for a gml or graphml export format, I will be the first to use it :-) ........

Yes, I thought it might be a little unexpected, and yes it is a little complicated, but the benefit with using Twine 2 desktop and your addons are that I can just write in cleartext what I find in a source, and create links where its needed, and I can see the result in 2 click ... And since you also have a way to export both to scapple and scrivener, I can merge text, docs and sources there from all my software, I use Zotero for all my sources and findings, and can copy/paste bibliography and citations directly from there to all the software that doesn't support any automtic with citeproc and betterbibtex (plugin for Zotero) Everything I find are also added to Gramps, but there are no real analyzing functions in Gramps, I am trying to get them over on more Event Based and Document Based research, than lineage-linked, and there will be som new great feature in the next 2-3 version releases ... I have already found a few connections with Twine 2 and dotgraph, that would be difficult to see without a some clicking forward and backward in Gramps ...

I would think that for creating games, it will also be useful to be able to maybe add a layout in a tool like Gephi, Sosial Network Analyzer or Cytoscape and be able to import it to Twine or some of the other engines as either an xml, csv or json, and from there write the history ... often its easier to see thing grapical than as a free text or table view ...

Best Regards

Jaran

fre. 24. jul. 2020 kl. 18:23 skrev M. C. DeMarco notifications@github.com:

Did you really understand that last sentence ... wow ... I wrote it in the middle of the night and forgot to check it for any errors (English ar not my native language) ... There might be a cache problem, but where is the cache for Twine 2?

In the website version of Twine 2, a story format could be cached in local storage (though I'm not sure under what circumstances this happens), or the browser's cache could be using an old version when Twine 2 tries to retrieve it from the URL. In the downloaded version of Twine 2, the Electron engine seems to be caching story formats rather aggressively (Twine bug #566 https://github.com/klembot/twinejs/issues/566).

I didn' figure out where the cache are, but after I deleted the app.asar file 2 times and reinstalled Twine 2 without having Dotgraph added as a format, and then added the offline version from you site, it reports the correct version I have no clue to what or where got changed, but it's clearly a Twine 2 problem, not with Dotgraph.

There are a few Twine 2 issues involving story formats, but no open bugs for timeouts while loading a big story format. So I should still look into that, if only to report yet another story format bug to the author.

Diggression: Its a great tool, I'm not a writer, but I research history and genealogy outside of the "norrmal" lineage-linked approach trying to find relations to Events and people outside the families and how they affected my ancestors choices, and started to use Twine 2 to track relations that was difficult to find in other software, problem was that there was no "real" way to analize all the none family relations I added, until I found your tools ... I can use the graphviz file dotgraph generate in Tulip and generate a gml file that can be used in i.e. Cytoscape or Gephi, there I can add multiple graph networks and find the links and relations ... So, it's a little unortodox way of using Twine and DotGraph and Dotscap, (I also use Scrivener 3 RC for Windows, Scapple, Freeplane, Gramps and some other tools for this ), but the graphical output of your tools really help to see some relations and between places, events, sources and people/families I can't get so easy from other tools ... So thanks for taking the time to create this and to help me out :-)

Well, that's an unexpected (and complicated) use case! If you're just taking the plain text dot file out of dotgraph, you don't actually need the whole embedded Viz engine (though I imagine it's still helpful to preview the graph). Let me know if you could use a version that doesn't attempt to load Viz.js at all. Or if Tulip is only converting from dot to GML for you, I could probably output GML directly. It doesn't look all that different from the dot format, at least for the sort of dot files that DotGraph produces.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mcdemarco/dotgraph/issues/9#issuecomment-663620657, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGWEGB455ZWYXP52CVAEMYDR5GYRLANCNFSM4OZ7LEGQ .

mcdemarco commented 4 years ago

I've been playing around with GML and GraphML. They seem pretty under-specified compared to the graphviz format, but I think I have something that works to some extent.

I put a beta up here: https://mcdemarco.net/tools/scree/dotgraph/beta/ (e.g., https://mcdemarco.net/tools/scree/dotgraph/beta/format.js or https://mcdemarco.net/tools/scree/dotgraph/beta/offline/format.js). Click on the header for GML or GraphML to see the output, or set the ones you want to stay open in your dotgraph settings passage:

::DotGraphSettings

{"hideDot":true,
"hideGML":false,
"hideGraphML":false}
StoltHD commented 4 years ago

I will try out both as soon as I have time ...

I will give you a feedback as soon as I can ...

Thanks, Great job ...

fre. 31. jul. 2020 kl. 18:10 skrev M. C. DeMarco notifications@github.com:

I've been playing around with GML and GraphML. They seem pretty under-specified compared to the graphviz format, but I think I have something that works to some extent.

I put a beta up here: https://mcdemarco.net/tools/scree/dotgraph/beta/ (e.g., https://mcdemarco.net/tools/scree/dotgraph/beta/format.js or https://mcdemarco.net/tools/scree/dotgraph/beta/offline/format.js). Click on the header for GML or GraphML to see the output, or set the ones you want to stay open in your dotgraph settings passage:

::DotGraphSettings

{"hideDot":true, "hideGML":false, "hideGraphML":false}

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mcdemarco/dotgraph/issues/9#issuecomment-667203852, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGWEGB25YDJWLRAWF5CCNHLR6LUIXANCNFSM4OZ7LEGQ .

StoltHD commented 4 years ago

Its really strange, I have created 3 files, identical data, but all occur different in the tree software I have tested so far... Cytoscape open the gml without problems and use the labels as it should, but the graphml file, is just numbers, most likely Node ID (need to check a little more) Tulip open both, but with differend results, the GML is as it should be, the graphml is "strange looking"

Socnetv did not do a good job with none of them, and could not import the graphviz file

Constellation did not show any data for the graphml file, and not correct for the gml.

I'll try out yEd and Gephi and Pajek later.

And then I will create files with the same data, but without cluster, at the moment the best result I can generate are to create a .gv file, covert it in Tulip and then import it to the program of choice...

StoltHD commented 4 years ago

I have discovered one problem...

If you have a Passage and a TAG in Twine with the same name, they get somehow merged into one Node when Proofing with dotgraph.

That can be a problem...

I have a Passage with the name "Norge" and a tag with the same name, when running dotgraph, I only get one Node with that name, but if I rename the Node to i.e. "Norge (NO)" I get one Node with the label "Norge (NO)" and one with the name "Norge" (Used as a Legend for the color).

Maybe you could add an ID to the Nodes (Passages), but not to the Tags or something similar?

mcdemarco commented 4 years ago

I created a separate issue for the conflicting tag nodes (#10). It shouldn't happen with graphml or gml output, because those are currently completely ignoring the tags.