Problem with html5 JS export source name


(Joel Lalancette) #1

Hi!

I am using an export script to export html5 content into one folder.

The problem is that the script adds a “./” before the source name of the JS file and I can’t seem to find where to correct this.

Has anyone ever seen this?

Thanks for your help!

<div id="index2_hype_container" style="margin:auto;position:relative;width:300px;height:50px;overflow:hidden;">
	<script type="text/javascript" charset="utf-8" src="./index2_hype_generated_script.js"></script>
</div>

#2

Can you share the Export Script you’re using?


(Joel Lalancette) #3

Thanks for your help, really appreciated! I’m new with Hype and I am trying to do multiple exports more efficiently using this script.

Gendron-EyeReturn.hype-export.py.zip (4.7 KB)


(Jonathan Deutsch) #4

I would be curious why this is a problem? Are there cases where you find ./ is not properly referencing the script?

The specific line in the export script is:

		if int(args.url_type) == HypeURLType.ResourcesFolder:
			url_info['url'] = "."

Using a "." here is a special value to indicate that resources should be placed alongside the .html file instead of in the typical .hyperesources folder.

As such, I think the only automated way to change this would be to manually parse and replace the text in the args.modify_staging_path section of the code.


(Joel Lalancette) #5

Understood. I was worried that it could create problems. Thank you very much for your help!


(Jonathan Deutsch) #6

I can’t think of any cases where it would be problematic, but if it ever does let me know!