• Login
sketchucation logo sketchucation
  • Login
⚠️ Libfredo 15.4b | Minor release with bugfixes and improvements Update

Load_from_url

Scheduled Pinned Locked Moved Developers' Forum
22 Posts 4 Posters 666 Views 4 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.
  • C Offline
    chrisglasier
    last edited by 20 Apr 2012, 10:54

    @thomthom said:

    It's your server configuration you need to address. Not your plugin.

    Beyond my ken!

    Anything like dialog.allow_actions_from_host(url)?

    If not what does that do?

    Any more help much appreciated!

    Thanks

    With TBA interfaces we can analyse what is to be achieved so that IT can help with automation to achieve it.

    1 Reply Last reply Reply Quote 0
    • T Offline
      thomthom
      last edited by 20 Apr 2012, 11:32

      @chrisglasier said:

      Anything like dialog.allow_actions_from_host(url)?

      It's nothing related to SketchUp. As you can see - you cannot even access the files from a web browser. Don't know what you have to do because it all depend on what type of server and configuration you have.

      @chrisglasier said:

      If not what does that do?

      webdialog.allow_actions_from_host(url) is allowing websites to send commands to SketchUp, via window.location = "skp:command@params"; type of commands.

      Thomas Thomassen — SketchUp Monkey & Coding addict
      List of my plugins and link to the CookieWare fund

      1 Reply Last reply Reply Quote 0
      • D Offline
        Dan Rathbun
        last edited by 20 Apr 2012, 13:52

        Chris if it's a UNIX server, you would need to have the file permissions set correctly using chmod.

        I'm not here much anymore.

        1 Reply Last reply Reply Quote 0
        • C Offline
          chrisglasier
          last edited by 20 Apr 2012, 23:32

          Thanks T & D.

          With TBA interfaces we can analyse what is to be achieved so that IT can help with automation to achieve it.

          1 Reply Last reply Reply Quote 0
          • C Offline
            chrisglasier
            last edited by 21 Apr 2012, 09:54

            I put skp files into a zip file which I manually download and extract to a subdirectory named in bridge.rb. I can then open each component in its location.

            Do you think it possible to automate the downloads and their extraction into a named folder? I have searched but have difficulty getting to grips with the results.

            If I could do that then I could demonstrate the benefits of collecting skps and json data from multiple trusted/vetted sources. If required complex js/php analysis of the data to set design criteria for example could be done say in Chrome browser before the url is plopped into the web dialog to see what the various options look like.

            Please bear with me!

            With TBA interfaces we can analyse what is to be achieved so that IT can help with automation to achieve it.

            1 Reply Last reply Reply Quote 0
            • D Offline
              Dan Rathbun
              last edited by 21 Apr 2012, 12:31

              @chrisglasier said:

              Do you think it possible to automate the downloads and their extraction into a named folder?

              Well the new rbz interface will do this. The "subfolder" must be wrapped inside the zip, and currently will only end up beneath the "plugins" dir. (Google has not yet given us the option to have the extraction go someplace else.)

              The other option is that if a user has a full Ruby install, the standard Ruby lib Zlib can be used to extract from several different archive formats.
              Then Ruby also has some other file moving modules, as well as the Dir class.

              Another option is to use platform dependent shell commands (backtick delimited, or %x delimited strings.)

              I'm not here much anymore.

              1 Reply Last reply Reply Quote 0
              • C Offline
                chrisglasier
                last edited by 21 Apr 2012, 19:17

                @dan rathbun said:

                @chrisglasier said:

                Do you think it possible to automate the downloads and their extraction into a named folder?

                Well the new rbz interface will do this. The "subfolder" must be wrapped inside the zip, and currently will only end up beneath the "plugins" dir. (Google has not yet given us the option to have the extraction go someplace else.)

                Thanks but I am not sure I understand how this automates the extraction to the plug in folder. It seems you have to click the install button in extensions?

                I was thinking to click a js link in my url (standalone or in wd) to pick up a plain zip file from any trusted url and extract it into one or more named local folders. Dreaming perhaps!

                With TBA interfaces we can analyse what is to be achieved so that IT can help with automation to achieve it.

                1 Reply Last reply Reply Quote 0
                • T Offline
                  TIG Moderator
                  last edited by 21 Apr 2012, 19:35

                  There are new API methods with the latest v8M2 to extract files/subfolders [into Plugins] from zip/rbz files.
                  However, if you already have ways of extracting them, then the moving to their new locations can be done with vanilla Ruby Dir and File commands...

                  TIG

                  1 Reply Last reply Reply Quote 0
                  • D Offline
                    Dan Rathbun
                    last edited by 21 Apr 2012, 19:38

                    @chrisglasier said:

                    Thanks but I am not sure I understand how this automates the extraction to the plug in folder. It seems you have to click the install button in extensions?

                    see: Sketchup.install_from_archive

                    👊 (because we have no "slappin' ya' upside da' head" emoticon)

                    @chrisglasier said:

                    I was thinking to click a js link in my url (standalone or in wd) to pick up a plain zip file from any trusted url and extract it into one or more named local folders. Dreaming perhaps!

                    Your link or html button can execute a callback to Ruby that does the install, moves files around etc.

                    I'm not here much anymore.

                    1 Reply Last reply Reply Quote 0
                    • D Offline
                      Dan Rathbun
                      last edited by 21 Apr 2012, 19:43

                      @tig said:

                      There are new API methods with the latest v8M2 to extract files/subfolders [into Plugins] from zip/rbz files.
                      However, if you already have ways of extracting them, then the moving to their new locations can be done with vanilla Ruby Dir and File commands...

                      Or the extended library FileUtils

                      FYI.. there is a Pure Ruby (beta) edition of the Zlib library that is cross-platfrom (no need to deal with compiled so/dll, Ruby version, compiler versions, etc. etc.) It is by Park Heesob (who is involved with Daniel Berger's win32-api project.)

                      I'm not here much anymore.

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

                      Advertisement