ucsd-ccbb / visJS2jupyter

visJS2jupyter is a tool to bring the interactivity of networks created with vis.js into jupyter notebook cells
MIT License
78 stars 17 forks source link

Enabling saving HTML in standalone file #6

Closed amrotork closed 6 years ago

amrotork commented 6 years ago

Hi Everyone,

Thanks for the great tool. It's really nice and extremely helpful tool for visualization. I really liked it. I wanted to enable the saving the output to standalone HTML rather than keeping it in Jupyter Notebook. I have made the changes necessary for that. I wish if you could accept my changes.

I have removed as well the pycharm project files ".idea" and added it to .gitignore.

Thanks for your support on this.

Regards, Amro

m1webste commented 6 years ago

Big thanks for suggesting the gitignore and removing those excess files. That was a little sloppy of us!

As for the changes to allow printing HTML to a stand alone file:

Our code already does print the graph to an HTML file regardless of whether you also print it to the jupyter notebook cell or not. If you'd like to change the name of that file (guaranteed to be named something close to stylefile), you could just rename it or copy and paste it using your file browser.

We intentionally made it so that the style file's names would never change to prevent accidentally overwriting the style files of other graphs. Every graph displayed in a jupyter notebook cell needs its own uniquely named style file, or else they will not all display in the cell. It's easy to accidentally overwrite your old style files when you copy and paste code. (I had that problem way too often when we were first coding up this thing!)

But thank you very much for your interest in visJS2jupyter, and that you were willing to take the time to try to improve it. It means a lot to us (: