sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Sketchup API (Ruby) - offline copy

    Scheduled Pinned Locked Moved Developers' Forum
    14 Posts 5 Posters 1.6k Views 5 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Dan RathbunD Offline
      Dan Rathbun
      last edited by

      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:

      1. The content is copyrighted by Google.
      2. Questions asked to Google whether they would allow "mirroring" or "derived works" of the API docs, have gone unanswered.
      3. We must, in the absence of an answer, assume a NO responce.

      CONTROL

      1. By "mirroring" locally (without any auto-update feature,) you take Google's control of the content away from them.
      2. Correction comments, added to the bottom of the page, will not propagate into the local files, without an update feature.
      3. The same for Google additions and corrections to the content itself. (Such as after a maintenance release.)
      4. 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.
      5. 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

      1. 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

      1. Some kind of update feature is a necessity. Google Updater a plus.

      I'm not here much anymore.

      1 Reply Last reply Reply Quote 0
      • Dan RathbunD Offline
        Dan Rathbun
        last edited by

        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.

        I'm not here much anymore.

        1 Reply Last reply Reply Quote 0
        • D Offline
          driven
          last edited by

          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.

          _api_off_Line_WD.png
          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...

          _api_Off_Line.png
          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

          learn from the mistakes of others, you may not live long enough to make them all yourself...

          1 Reply Last reply Reply Quote 0
          • D Offline
            driven
            last edited by

            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

            learn from the mistakes of others, you may not live long enough to make them all yourself...

            1 Reply Last reply Reply Quote 0
            • Dan RathbunD Offline
              Dan Rathbun
              last edited by

              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

              I'm not here much anymore.

              1 Reply Last reply Reply Quote 0
              • Dan RathbunD Offline
                Dan Rathbun
                last edited by

                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

                I'm not here much anymore.

                1 Reply Last reply Reply Quote 0
                • D Offline
                  driven
                  last edited by

                  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

                  learn from the mistakes of others, you may not live long enough to make them all yourself...

                  1 Reply Last reply Reply Quote 0
                  • Dan RathbunD Offline
                    Dan Rathbun
                    last edited by

                    Yea I thought some utility like curl would be needed.

                    I'm not here much anymore.

                    1 Reply Last reply Reply Quote 0
                    • Dan RathbunD Offline
                      Dan Rathbun
                      last edited by

                      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=en

                      Gears CAN run in Chrome, in FireFox, and MSIE.
                      http://www.google.com/support/forum/p/Chrome/thread?tid=467bd9b7938130d3&hl=en

                      But not OSX Snow Leopard+
                      Gears is also dying (ie, depecated, and no updates planned.)
                      http://gearsblog.blogspot.com/2010/02/hello-html5.html

                      It looks like "Offline" mode will need to be HTML5 with a local proxy. (Chrome is not 100% ready for offline mode in this respect.)

                      I'm not here much anymore.

                      1 Reply Last reply Reply Quote 0
                      • T Offline
                        tomasz
                        last edited by

                        You can use WinHTTrack to make a copy of the API on a hard-drive.

                        Author of [Thea Render for SketchUp](http://www.thearender.com/sketchup)

                        1 Reply Last reply Reply Quote 0
                        • 1 / 1
                        • First post
                          Last post
                        Buy SketchPlus
                        Buy SUbD
                        Buy WrapR
                        Buy eBook
                        Buy Modelur
                        Buy Vertex Tools
                        Buy SketchCuisine
                        Buy FormFonts

                        Advertisement