tmap icon indicating copy to clipboard operation
tmap copied to clipboard

Embedding javascript in the output HTML tmap file

Open aparente-nurix opened this issue 4 years ago • 2 comments

When generating a tmap in an jupyter notebook, the output is a single HTML file that includes the javascript used to plot the map within the HTML file. Oddly, when turning the same code into a script, it generates the .js and .html files separately. Is there an option that can be called to embed the javascript within the html file, such that there's only one file thats created?

aparente-nurix avatar Jul 01 '20 21:07 aparente-nurix

As far as I know, js script can be embedded to html file. Thus, you can write simple script to merge two files together. I think that BeautifulSoup is good enough to help you with this mission

Lerbytech avatar Jul 08 '20 18:07 Lerbytech

Yeah, it can totally be merged after the files are created. However, I’m wondering why the files automatically get merged in jupyter notebook but not when run in a script. Is there a flag that can be set in tmap to merge them automatically?

From: Anton Vasilkov [email protected] Sent: Wednesday, July 8, 2020 11:19 AM To: reymond-group/tmap [email protected] Cc: Angelica Parente [email protected]; Author [email protected] Subject: Re: [reymond-group/tmap] Embedding javascript in the output HTML tmap file (#13)

As far as I know, js script can be embedded to html file. Thus, you can write simple script to merge two files together. I think that BeautifulSoup is good enough to help you with this mission

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/reymond-group/tmap/issues/13#issuecomment-655678928, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMUZ5FGEPMWCNMOJUAKLKETR2S2BNANCNFSM4OOCEFMA.

Disclaimer

The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful.

aparente-nurix avatar Jul 08 '20 18:07 aparente-nurix