Sketchup API (Ruby) - offline copy
-
Offline viewing used to be built-in to MSIE, but I think it was removed.
So do a search for 3rd party utilities:
http://www.google.com/search?q=offline+webpages -
That looks great John! Thanks for posting it,
Chris
-
@chris fullmer said:
That looks great John! Thanks for posting it,
Chrisif you could add the PC bits [so it has both] it could be a 'Plugin'
john
-
I'll look at the Ruby later tonite.
But a few thoughts.
LEGAL
There have been others who thought about doing this in the past.. as well as a corrected version,... but:- The content is copyrighted by Google.
- Questions asked to Google whether they would allow "mirroring" or "derived works" of the API docs, have gone unanswered.
- We must, in the absence of an answer, assume a NO responce.
CONTROL
- By "mirroring" locally (without any auto-update feature,) you take Google's control of the content away from them.
- Correction comments, added to the bottom of the page, will not propagate into the local files, without an update feature.
- The same for Google additions and corrections to the content itself. (Such as after a maintenance release.)
- These kind of "copies" have a way of "living on" forever, despite being obsolete. People email attach them to their friends, Websites in other countries post them for download and never remove them.
- The API does NOT really have a formal revision number (and I DID ask that it be implemented..,) so it's difficult to say what revision the local copy is, other than that it was copied on a certain date.
IMPLEMENTATION
- The Sketchup API is multi-version. Installing it into a specific version's "plugins" folder does not make sense.
On PC, I'd put it in a "
%ProgramFiles%/Google/Google Sketchup API
" folder.* see my bridge_ext.rb example of how to have a common multi-version plugin- Some kind of update feature is a necessity. Google Updater a plus.
-
Just, noting that (because the issues I give in the above post,) .. is the reason I suggested to the topic poster, that he find an 3rd party offline utility, and do it himself.
-
Hi,
not sure if this is what your after, it's a ruby WebDialog with a CSS trimmedversion of the API code site, i.e. no Sidebar and I commented out some external links and added a local prettify.js.
It works the same offline or online i.e. faster then the online one.Some of the links will take you online if your connected to the internet, but the back arrow or Docs link brings you back to the local files.
If you want the Sidebar, navigate to local_extensions.css and delete .g-first in the list that says {display: none;}
It is a bit ugly, because it just stacks on the top, but I might add a button for that if anyones interested.It is for Mac, for a PC you'll have to add the PC path to the ruby file and delete _modal.
I made this to link to from Ruby Code Editor because of the changes in Safari blocking Sketchup API site from inside SU.
I think Google should make us one of these, with online/offline switching for updating, etc...
BTW, if you want to use it in Safari offline just open the html with Safari and bookmark it.To Instal on Mac:
Open the zip folder, inside there is
_api_off_line folder
_api_Off_Line.rb
plugins symlink folder.Drag both api folder and ruby onto the symlink.
Open SU and in Help you click on api [Off Line]
if its not there do a manual copy into plugins as per usual...
Please report back if the symlink work on your system...
@Dan, could you check if the ruby is OK for general consumption?
LINKED FILE REMOVED by me, until I know the legality... see below
john -
Hi Dan,
I've used so many other versions [by other people], I hadn't considered the legality, I've removed the file for now.Ideally, as I say above, Google should provide an API WebDialog [like they do for the 3D Warehouse] but with offline functionality and user css options or a media query that hides the sidebar for a 'webdialog' width, but goes full width if you pull it out.
Does Chrome have offline viewing options?
Personally, I like to have the API available inside SU, when I'm 'trying' to write a ruby, and as I'm mostly online, using an iFramed link to the API was adequate.
However, with the latest Safari security enhancements combined with how SU acts as an server. half of Alex's Reference Links no longer work.
oddly, Google Code Site still does but the Sketchup stuff doesn't...
That is why I use BlueCrab.app + some additional css to make a local copy for my own use.
The OP could try that on his Mac for his personal copy if FF or Chrome don't have view offline options...
john
-
Yup... any "WebDialog API plugin" would have to have the user actually do the downloading, after getting them to agree explicitly (checking a box, clicking an "I Agree" button,) to only use the content on that computer, and not redistribute it in any way (incl. copying or network access.)
This way the "plugin" would not itself be distributing the content. (It comes direct from the Google servers.)
The user must also be made aware that it is their responsibility, to update the archive when needed. (A "redownload" option somewhere.)
Google SketchUp Ruby API: Terms Of Service
Google Code: Terms Of Service (also applies.)
The number of offline users are likely to be so small, relative to the online users, that I don't think Google themselves would bother spending any time or money on this idea. It's just simple economics.
Chrome: I can open local links in Chrome, like:
file:///C:/Program%20Files/Google/Google%20SketchUp%208/Resources/en-US/helpcontent/tool/21020/index.html
-
There may be some Chrome plugins that can do the job (have not tried any.)
https://chrome.google.com/webstore/search?hl=en-US&q=offline
-
this will do the job nicely http://paksoy.net/post/31856715/take-google-gears-documentation-offline
but, looking at the terms of service
5.3 You agree not to access (or attempt to access) any of the Services by any means other than through the interface that is provided by Google, unless you have been specifically allowed to do so in a separate agreement with Google.
although SU is an interface that is provided by Google, so...I can open Docs page inside SU, it has only stopped working in iFrame's and there may be a solution for that.
Offline seems to be the tricky bit.
john
-
Yea I thought some utility like curl would be needed.
-
FYI... Chrome does not currently have a "Offline" mode. They say they are interested in adding it in the future.
http://www.google.com/support/forum/p/Chrome/thread?tid=61b8334bb4cb160d&hl=enGears CAN run in Chrome, in FireFox, and MSIE.
http://www.google.com/support/forum/p/Chrome/thread?tid=467bd9b7938130d3&hl=enBut not OSX Snow Leopard+
Gears is also dying (ie, depecated, and no updates planned.)
http://gearsblog.blogspot.com/2010/02/hello-html5.htmlIt looks like "Offline" mode will need to be HTML5 with a local proxy. (Chrome is not 100% ready for offline mode in this respect.)
-
You can use WinHTTrack to make a copy of the API on a hard-drive.
Advertisement