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

    [Plugin] Plugins help script

    Scheduled Pinned Locked Moved Plugins
    33 Posts 9 Posters 27.7k Views 9 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.
    • W Offline
      watkins
      last edited by

      Dear TIG,

      Do you think you could modify your script to include simple text documents? I ask because when I install a plugin which isn't supplied with a help/readme document (more recently a .pdf file), I create my own help/readme document by making a simple text file and then cutting and pasting any explanation posted with the ruby script. I now have quite a few of these 'readme' files and it would be really useful if I could access them from the Help drop-down menu.

      Many thanks,
      Bob

      1 Reply Last reply Reply Quote 0
      • J Offline
        Jim
        last edited by

        I would go a step further and automatically parse out the header text from the script itself.

        In fact would go even further and suggest authors adopt RDoc, or a similar embedded documentation scheme. RDoc is pure ruby, can be included in the Plugins folder, and creates nicely formatted documentation.

        Hi

        1 Reply Last reply Reply Quote 0
        • EdsonE Offline
          Edson
          last edited by

          didier,

          look what happened to your script on mac: there seems to be a problem as it does not see all i have and does not return anything. after this post i there is one on TIG version of the script, that appears to be working.

          the script shows in the menu plugins
          what it foundthe result: nothing?

          edson mahfuz, architect| porto alegre • brasil
          http://www.mahfuz.arq.br

          1 Reply Last reply Reply Quote 0
          • EdsonE Offline
            Edson
            last edited by

            TIG,

            this is what happened to your script on mac: it seems to be working fine.

            it shows on the help menuit found 3 rather than 2 items


            it returns the path to the info for that plugin, as intended

            edson mahfuz, architect| porto alegre • brasil
            http://www.mahfuz.arq.br

            1 Reply Last reply Reply Quote 0
            • TIGT Offline
              TIG Moderator
              last edited by

              @edson said:

              TIG,
              this is what happened to your script on mac: it seems to be working fine.

              [attachment=2:2kcjb1a2]<!-- ia2 -->PluginsListB_01.png<!-- ia2 -->[/attachment:2kcjb1a2][attachment=1:2kcjb1a2]<!-- ia1 -->PluginsListB_02.png<!-- ia1 -->[/attachment:2kcjb1a2]

              So Edson, you are saying that my version works OK ?

              Note: the reason mine lists one more help-file than the other version is that it looks in all of the sub-folders in the Plugins folder and lists any it finds in there too...

              TIG

              1 Reply Last reply Reply Quote 0
              • TIGT Offline
                TIG Moderator
                last edited by

                @watkins said:

                Dear TIG,

                Do you think you could modify your script to include simple text documents? I ask because when I install a plugin which isn't supplied with a help/readme document (more recently a .pdf file), I create my own help/readme document by making a simple text file and then cutting and pasting any explanation posted with the ruby script. I now have quite a few of these 'readme' files and it would be really useful if I could access them from the Help drop-down menu.

                Many thanks,
                Bob

                The problem is that many people add a .txt suffix to the end of the name of any scripts they don't want to have always loaded - they can 'load "script.txt"' through the Ruby Console later if needed. If the help script listed all .txt files these would come up in the list too. The formats that are found and listed are pdf htm html mht and doc - so you could make the txt files into doc ones ? OR you could make your help files end with a suffix .bob and set .bob files always to open with NotePad.exe; then edit the script and add ".bob" to the list of files it finds - easy to see how it works - and off you go...

                TIG

                1 Reply Last reply Reply Quote 0
                • W Offline
                  watkins
                  last edited by

                  Dear TIG,

                  Many thanks for your helpful suggestions. I will give it a go.

                  Kind regards,

                  .bob

                  1 Reply Last reply Reply Quote 0
                  • W Offline
                    watkins
                    last edited by

                    Dear TIG,

                    I wrote before thinking (not unusual). I simply added "txt" to the list as I almost never load scripts using 'load "script.txt"' through the Ruby Console. This is a quick fix, although I should think about doing what you suggested in the future and loading little used scripts via the Ruby Console.

                    Kind regards.
                    .txt

                    1 Reply Last reply Reply Quote 0
                    • EdsonE Offline
                      Edson
                      last edited by

                      @tig said:

                      So Edson, you are saying that my version works OK ?

                      yes, it seemed to work fine but i was unsure of it since i did not know whether the result i obtained was the one to be expected from the script or not. is it what you expected?

                      edson mahfuz, architect| porto alegre • brasil
                      http://www.mahfuz.arq.br

                      1 Reply Last reply Reply Quote 0
                      • W Offline
                        watkins
                        last edited by

                        Dear TIG,

                        Its me again (bad penny and all that).

                        Okay, adding .txt works fine, except that for long text files I can only see what will fit on the screen (no vertical scroll bars). I note that .pdf files open with scroll bars and so viewing them is just fine. I also have a lot of .txt files in my plugin folder and so when I try to select a file I can only view/select those that are visible in the text window. It would be useful if your script could be made to work like the Plugin drop-down menu, viz. the window opens and stays open with a single click and then items on the list are accessed (if required) using up/down arrows. This might be a useful feature anyway as users are likely to accumulate lots of .pdf help files with time.

                        Kind regards,
                        Bob

                        1 Reply Last reply Reply Quote 0
                        • TIGT Offline
                          TIG Moderator
                          last edited by

                          @edson said:

                          @tig said:

                          So Edson, you are saying that my version works OK ?

                          yes, it seemed to work fine but i was unsure of it since i did not know whether the result i obtained was the one to be expected from the script or not. is it what you expected?

                          Yes - all is OK.

                          TIG

                          1 Reply Last reply Reply Quote 0
                          • TIGT Offline
                            TIG Moderator
                            last edited by

                            @watkins said:

                            Dear TIG,

                            Its me again (bad penny and all that).

                            Okay, adding .txt works fine, except that for long text files I can only see what will fit on the screen (no vertical scroll bars). I note that .pdf files open with scroll bars and so viewing them is just fine. I also have a lot of .txt files in my plugin folder and so when I try to select a file I can only view/select those that are visible in the text window. It would be useful if your script could be made to work like the Plugin drop-down menu, viz. the window opens and stays open with a single click and then items on the list are accessed (if required) using up/down arrows. This might be a useful feature anyway as users are likely to accumulate lots of .pdf help files with time.

                            Kind regards,
                            Bob

                            Making the top bar menu list is what takes the time and slows down any model opening - and it's what we are trying to avoid... It's a limitation of the current Ruby dialogs that long lists go off the screen. However if you type the first character of the likely file's name e.g. W for Windowizer_help then the list will jump to that (or at least near that) and scrolling down is then possible... This applies to lots of Ruby dialogs like ones listing layers or colours. It could be done better with a web-dialog... but others have that expertise (and time) - perhaps someone can clobber 'my' getting the list of files into 'their' web-dialog and make it run as a superior form of dialog... before the Ruby dialogs themselves get improved (if ever)...

                            TIG

                            1 Reply Last reply Reply Quote 0
                            • W Offline
                              watkins
                              last edited by

                              Dear TIG,

                              Once again, thanks for giving my enquiries your consideration.

                              Kind regards,
                              Bob

                              1 Reply Last reply Reply Quote 0
                              • OxerO Offline
                                Oxer
                                last edited by

                                Hi, I installed the plugin (TIG version), the plugin appears in Help Menu and you can select a help file but there is a problem, the popup windows of the helps are empty, they don't show the content of the help files, I tried with all extension types (txt, pdf, html...), see the image.

                                Empty help windows help.jpg

                                My intention is create a subfolder into Sketchup plugin folder with all help files of the plugins.

                                Somebody can help me.

                                Thanks !!

                                OSX 10.10.5
                                SU 2015

                                "The result is the end what is important is the process" by Oxer
                                [http://www.oxervision.blogspot.com/(http://www.oxervision.blogspot.com/)]

                                1 Reply Last reply Reply Quote 0
                                • TIGT Offline
                                  TIG Moderator
                                  last edited by

                                  This is a VERY old script.
                                  You are on MAC so I suspect an issue there...
                                  Wait a while as I look into it...

                                  TIG

                                  1 Reply Last reply Reply Quote 0
                                  • OxerO Offline
                                    Oxer
                                    last edited by

                                    Waiting your help TIG. 👍

                                    "The result is the end what is important is the process" by Oxer
                                    [http://www.oxervision.blogspot.com/(http://www.oxervision.blogspot.com/)]

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

                                      oxer

                                      do they show if you Right Click >> Reload?

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

                                      1 Reply Last reply Reply Quote 0
                                      • TIGT Offline
                                        TIG Moderator
                                        last edited by

                                        Try this version.
                                        It should work on PC and MAC.
                                        Read the file to see how it traps out certain 'htm' files that are NOT Help files...


                                        plugins_help_TIG.rb

                                        TIG

                                        1 Reply Last reply Reply Quote 0
                                        • OxerO Offline
                                          Oxer
                                          last edited by

                                          @driven said:

                                          oxer

                                          do they show if you Right Click >> Reload?

                                          No, I probed this, but they weren't shown.

                                          Thanks you very much TIG!! 👍
                                          The content of the plugins' help files is shown now on Mac, in the list appears 'htm' and html' files that are NOT Help files, see the image.

                                          Help Files List.jpg

                                          "The result is the end what is important is the process" by Oxer
                                          [http://www.oxervision.blogspot.com/(http://www.oxervision.blogspot.com/)]

                                          1 Reply Last reply Reply Quote 0
                                          • TIGT Offline
                                            TIG Moderator
                                            last edited by

                                            @Oxer

                                            I realize that some html files will be listed that are not help files.
                                            You can of course tweak the code to exclude htm & html files as types***, but then some genuine html based help files will be missed out.
                                            It already traps for some such issues, but it's really impossible to trap for all...
                                            ***You can edit line #6 to read say:
                                            ext=["pdf","chm","doc","hlp","mht"]
                                            Or to include/exclude whatever file-types you prefer...

                                            TIG

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

                                            Advertisement