A question for autoload_static

Hi,

I need to run a bokeh script in linux to create html (with tag dumped from autoload_static) and JS file.

I need to publish html and JS file to a web server whose webspace is visible on the linux I am running the above bokeh script

I can create JS file using relative path then move them to absolute path of web space, but I am wondering if there is a better way other than moving JS files?

This is my current way:

#create tag using relative path to jsFile

js, tag = autoload_static(fig, CDN, )

#then move jsFile to webspace absolute path

html points to relative path to jsFile

Thanks

Teng Wang

Hi,

I am not really sure what you are asking. But I will just say: autoload_static returns the text the script. You always have to save it somewhere. The idea is that you could save it from the start wherever it ultimately needs to be, and that you would configure autoload_static to use that location.

Thanks,

Bryan

···

On Aug 22, 2018, at 23:38, [email protected] wrote:

Hi,

I need to run a bokeh script in linux to create html (with tag dumped from autoload_static) and JS file.

I need to publish html and JS file to a web server whose webspace is visible on the linux I am running the above bokeh script

I can create JS file using relative path then move them to absolute path of web space, but I am wondering if there is a better way other than moving JS files?

This is my current way:
#create tag using relative path to jsFile
js, tag = autoload_static(fig, CDN, <relative path to jsFile>)
#then move jsFile to webspace absolute path

html points to relative path to jsFile

Thanks
Teng Wang

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/c3ac01fe-b02c-4a71-ae2c-7038007095a2%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

Say I want to run a script to create html and JS files at path /A (/A is absolute path)

If I provide /A/x.js to autoload_static, then tag (to put into html) will point to /A/x.js

But I need to put html and JS file into web space /B, URL could be http://host/C, but in this case, html will point to absolute path /A/x.js which is not visible from browser URL address.

I hope there is a way to specify the prefix of URL htttp://host and relative path /C so that tag (and html) can point to the correct URL.

Hope I made my question clear.

···

On Thursday, August 23, 2018 at 9:24:29 AM UTC-7, Bryan Van de ven wrote:

Hi,

I am not really sure what you are asking. But I will just say: autoload_static returns the text the script. You always have to save it somewhere. The idea is that you could save it from the start wherever it ultimately needs to be, and that you would configure autoload_static to use that location.

Thanks,

Bryan

On Aug 22, 2018, at 23:38, [email protected] wrote:

Hi,

I need to run a bokeh script in linux to create html (with tag dumped from autoload_static) and JS file.

I need to publish html and JS file to a web server whose webspace is visible on the linux I am running the above bokeh script

I can create JS file using relative path then move them to absolute path of web space, but I am wondering if there is a better way other than moving JS files?

This is my current way:

#create tag using relative path to jsFile

js, tag = autoload_static(fig, CDN, )

#then move jsFile to webspace absolute path

html points to relative path to jsFile

Thanks

Teng Wang


You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/c3ac01fe-b02c-4a71-ae2c-7038007095a2%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.