简体   繁体   English

将服务器HTML应用程序更改为独立的桌面应用程序

[英]Change server HTML app into self-contained desktop app

I wrote a simple web server that takes the public link to a google document containing image urls and names and outputs a print-friendly HTML photo directory with its contents. 我写了一个简单的Web服务器,它通过公共链接指向包含图像URL和名称的google文档,并输出包含其内容的易于打印的HTML照片目录。

I created it for a volunteer organization that I will no longer be able to stay involved in. I need to pass on the ability to generate that directory to my successor. 我是为不再能够参与其中的志愿者组织创建的。我需要将生成该目录的能力传递给我的后继者。

I'm not confident that I can trust myself to maintain that web application for the long term the organization needs. 我不确定我可以相信自己可以长期维护组织所需的Web应用程序。 I'm hoping that instead I can change it to a self contained program, that members of the org could email around to whoever needed to generate the directory. 我希望我可以将其更改为一个自包含程序,以便组织成员可以通过电子邮件将其发送给需要生成目录的任何人。

My first thought was to make a .html file the could open in a browser but I can't download the CSV data from google with Ajax, because it is cross domain. 我的第一个想法是制作一个.html文件,该文件可以在浏览器中打开,但是我无法使用Ajax从google下载CSV数据,因为它是跨域的。 After googling there doesn't seem to be a way around this. 谷歌搜索之后,似乎没有解决的办法。

Is there a straightforward framework? 有没有直接的框架? I would guess I could do it with Adobe AIR, but I'd prefer something that simply removed the cross domain security feature. 我想我可以使用Adobe AIR做到这一点,但我更喜欢简单地删除跨域安全性功能的东西。

I could take the time to embed a UIWebView into a Mac app, but since I want to write the app primarily in HTML, I'd have to create a bridge to let the web view make a cross domain request anyway right? 我可以花一些时间将UIWebView嵌入到Mac应用程序中,但是由于我想主要用HTML编写该应用程序,因此我必须创建一个桥梁以使Web视图无论如何都能提出跨域请求,对吗? Also it's not cross platform. 而且它不是跨平台的。

Any other ideas? 还有其他想法吗? How can I package my app as a desktop application instead of a web service? 如何将我的应用程序打包为桌面应用程序而不是Web服务?

You can get around the cross domain XHR using flash. 您可以使用Flash解决跨域XHR。 CrossXhr can do it from apps served by regular http servers. CrossXhr可以从常规http服务器提供的应用程序中执行此操作。 I've never tried it with a static, file-served webapp. 我从未尝试过使用静态的,文件托管的webapp。 Follow the instructions here: 请按照以下说明进行操作:

http://code.google.com/p/crossxhr/wiki/CrossXhr http://code.google.com/p/crossxhr/wiki/CrossXhr

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM