如何通过GitHub共享NetLogo模型 [英] How to share a NetLogo model through GitHub

查看:143
本文介绍了如何通过GitHub共享NetLogo模型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个确实有用的问题(和答案)非常适合通过Dropbox中的公用文件夹共享NetLogo模型.

This really helpful question (and answer) works great for sharing a NetLogo model through a public folder in Dropbox.

但是,我的理解是 Dropbox将不再(尽管目前仍然支持)共享HTML (以及NetLogo文件).

However, my understanding is that Dropbox will no longer (though for the moment still does) support sharing HTML (and so NetLogo files) this way.

上述问题和答案提到了GitHub,尤其是作为潜在" HTML文件的URL,这是一个潜在的解决方案. 我尝试了这个,但是遇到了一些问题.

The question and answer above mentioned GitHub, and in particular the URL to the "raw" HTML file, as a potential solution. I tried this but had some problems.

这是通过Dropbox托管的文件(有效): https://dl.dropboxusercontent.com/u/1190498/Virus%20on%20a%20Network%20(Hinze).html

Here's the file hosted via Dropbox (it works) : https://dl.dropboxusercontent.com/u/1190498/Virus%20on%20a%20Network%20(Hinze).html

我认为这是通过GitHub托管的相同(原始)文件:

Here's the identical, I think, (raw) file hosted via GitHub: https://raw.githubusercontent.com/jrosen48/netlogo-models/master/Virus%20on%20a%20Network%20(Hinze).html

考虑到关键在于呈现HTML,我试图在 https://htmlpreview.github.io/?到通过GitHub托管的文件,无济于事.

Thinking that the key was rendering the HTML, I tried to prepend https://htmlpreview.github.io/? to the file hosted via GitHub, to no avail.

如何通过GitHub共享NetLogo模型?

How to share a NetLogo model through GitHub?

推荐答案

令人遗憾的是,规则不断变化,但是我想推荐两件事.一种是使用 NetLogo建模公用程序.只需上传文件-也就是说,您甚至不需要执行导出:HTML".

It's kind of sad that the rules for this keep changing, but I guess there are two things that I could kind of recommend. One is to use the NetLogo Modeling Commons. NLW versions of models uploaded there can be directly linked to, simply by uploading the .nlogo file—that is, you never even need to do "Export: HTML".

另一个选择-我认为我可能会更推荐的选择是使用 GitHub Pages ,这实际上是一个免费的基本网络主机.您可以在此处看到我上传到GitHub页面的模型的示例. 存储库的设置相当简单;我刚刚制作了一个名为"[username] .github.io"的存储库,上传了导出的HTML文件,然后可以通过可预测的URL对其进行访问.

The other option—the option that I think I might recommend more strongly is to use GitHub Pages, which is essentially a free, basic web host. You can see here an example of a model that I uploaded to GitHub pages. The setup of the repository is quite trivial; I just made a repo named "[username].github.io", uploaded the exported HTML file, and then it was accessible from a predictable URL.

这篇关于如何通过GitHub共享NetLogo模型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆