18 comments

[ 2.8 ms ] story [ 30.7 ms ] thread
Honestly one of the most interesting "web shells" I've looked at. But not something I can use regularly since most of my workflow is local for developing software.
Would like every url to be a directory, and for that site to have its data nested within that url.
I suspect this works essentially like that, if you have the psty proxy companion program running so pigshell can get around COR restrictions.
The problem is that it is very difficult to understand the documentation, it is very difficult to develop plugins (like Google Drive) and extend the functionalities, it is very difficult to run the local server in a VPS, customization (dotfiles) is also complicated and undocumented.
I agree. Mea culpa.

I am still active on the project and I am working to address the issues you mention, though progress has been slower than I could wish.

Could we do the same thing with FUSE filesystems?
Exactly what I was thinking. That would make all linux utils available to use as well.
Just tried to grep BBC News site but got a `cross-origin request denied` error. In the man page for hgrep, it suggests hgrep on a wikipedia page, and I got the same error.

The error in full: Cross-origin request denied (check if psty is running): http://en.wikipedia.org/wiki/List_of_countries_and_dependenc...

I don't know how to check if psty is running. Anyone got any ideas?

Since most websites are not CORS-friendly, you need to run the psty proxy on your desktop.

python psty.py -a

For further information on psty, and a download link, see: http://pigshell.com/v/0.6.4/usr/doc/psty.html

Alternately, if you don't want to run psty, you could try the "ycat" command which uses YQL to bypass CORS. This is useful if you are trying to access HTML pages, rather than binary resources. e.g.

ycat http://en.wikipedia.org/wiki/List_of_countries_and_dependenc... | hgrep table.wikitable | html

You may have to try it a couple of times; I notice that the YQL endpoint sometimes refuses connections.

It seems that buying a domain name is so expensive. Why pig?
The example of grabbing a page and feeding it into d3 is whizbang! ( https://github.com/pigshell/pigshell#hello-world )

I tried to cat this hn page, but also got the CORS error -- trying to route through [h]ttp://localhost:50937/...

need to run psty for proxying certain things and local access ...so its not "pure client-side Javascript app running in the browser"

pretty cool nonetheless -- maybe psty could be baked into a chrome or FF extention (?)

Try

ycat https://news.ycombinator.com | hgrep .athing | html

ycat uses YQL to bypass CORS.

There are a few interesting workflows which can be done completely in the browser without a proxy: e.g. copying files from one Google Drive account to another, backing up Google Drive to Dropbox, and so on.

I wish it would at least try to do a real CORS request before giving up and forcing you to use the proxy. I have a CloudFront distribution with CORS all set up but it doesn't even try to make the request.
I don't understand why this runs in the browser. Surely this is all stuff you can do in a local shell? What am I missing?