- Please use a desktop browser (Chrome preferred). While mobile browsers kinda-sorta work if you're just clicking through the examples, keyboard input doesn't work on mobiles (yet).
- Pigshell has few users (in fact, using the plural is a slight marketing exaggeration) so please bear with me for any teething issues, broken links, inadequate documentation...
- One of the practical use cases is copying files across Google accounts, and backing it up to your desktop. (Details here: http://pigshell.com/v/0.6.2/doc/gdrive.html) The nice thing about a unix approach is that the exact same cp command can be used to copy GDrive to Dropbox, or any other supported filesystem.
Hi tubelite, on mobile safari and chrome IOS7.04 with an ipad the keyboard comes up after I clicked on this example command:
pig:/$
cat http://pigshell.com/sample/photos/bchips.jpg
I can type in stuff and after enter the keyboard disappears again. A external bluetooth keyboard might work.
Yes, that happens, but it is awkward and unreliable. The CLI is a CodeMirror instance (version 2.something), which has known issues with iOS. I need to check if later versions work better on iOS.
I looked through the four documentation links on the right and was unable to find out how to cat a Google spreadsheet as anything consumable by the shell. I took a guess and tried cat -o gdrive.fmt=txt and csv, but those were not fruitful. Is this possible currently?
edit: found mimeMap.js and saw tsv was an option. That didn't work either.
IIRC the Drive API does not support those conversion options. The way forward would be for an xlsx parsing JS library to convert it into CSV or a stream of Javascript objects. I didn't find any GPL-compatible library last time I checked.
Oh, I didn't read the whole thread, I was just thinking about my own experience with `cat gdrive/something` showing me a lot of unreadable bytes when it could show an iframe.
Are write operations possible with pigshell? If I connected my Facebook account and want to post a new status update or add a picture to an album, it doesn't seem like I can do something like this:
pig> echo "Testing status update" >> /facebook/me/posts
echo "Testing status update" > /facebook/me/posts/
I tried it and it WorksForMe (TM)
That said, two caveats:
- The FB filesystem hasn't been worked on in 1+ year.
- AFAIK v2 of the graph API will become mandatory sometime next year and does not allow apps to get lists of friends. Friend list returns only friends who also use the same app... which is pretty disappointing.
Fitting web apis into a filesystem metaphor isn't always straightforward. For instance, it is common to POST into a container URI (which we represent as a directory) and have no control over the name or id of the object which is created. This is the case with Facebook posts.
echo "foo" > /facebook/me/posts
would imply overwriting the posts directory, which is not allowed (either on pigshell or on unix)
OTOH, asking the user to do a
echo foo >/facebook/me/posts/post-11oct2014
sets up the expectation that the post will be named that way, when it will most likely be a long numeric id. Thus, the trailing slash. Not perfect, but the best compromise I could think of.
echo "Testing status update" >> /facebook/me/posts
I think appending content to a file path (with or without the trailing slash) is clearer than the analogy of a truncating write to a directory path (where the trailing slash is required).
The current model seems similar to the REST interpretation of CRUD, where > equates to 'create' and >> to 'update', and creating a resource is done at the collection URL. Nothing wrong with this, but it seems slightly unintuitive to me.
My suggested mapping would be:
>/facebook/me/posts - Unsupported (or delete all posts, and make a new one)
>>/facebook/me/posts - Add a new facebook post
>/facebook/me/posts/long_numeric_id - Update post (truncate)
>>/facebook/me/posts/long_numeric_id - Update post (append)
In this case, both > and >> are context dependent, but more flexible. Would this strategy mesh well with the rest of the implementation?
Also, nice work! The project reminds me of Plan 9's /net.
- Please use a desktop browser (Chrome preferred). While mobile browsers kinda-sorta work if you're just clicking through the examples, keyboard input doesn't work on mobiles (yet).
- Pigshell has few users (in fact, using the plural is a slight marketing exaggeration) so please bear with me for any teething issues, broken links, inadequate documentation...
- One of the practical use cases is copying files across Google accounts, and backing it up to your desktop. (Details here: http://pigshell.com/v/0.6.2/doc/gdrive.html) The nice thing about a unix approach is that the exact same cp command can be used to copy GDrive to Dropbox, or any other supported filesystem.
- Some more D3 visualization examples here, using Mike Bostock's gist viewer: http://bl.ocks.org/ganeshv (Do use the "Open in a new window" links, like this one: http://bl.ocks.org/ganeshv/raw/46cc526d41d16995ccdc/).