Community
    • Login

    Columns++ missing features / road map

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    15 Posts 6 Posters 1.3k Views
    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.
    • CoisesC
      Coises
      last edited by

      I have no way of knowing how many users my Columns++ plugin has, but I suspect most of them hang around here. I’m reaching a bit of an impasse as far as deciding what to do next, and what should be settled before I try to get Columns++ into Plugins Admin. If anyone would like to weigh in, feel free.

      I’ve listed below a sort of “road map.” Items are in order from what I expect to be the easiest / fastest / most straightforward to the hardest / most time-consuming / most likely to cause unexpected problems — this isn’t necessarily the order in which I would do them, and some probably will never be done.

      I don’t expect anyone to read and evaluate all of this in detail. If you have thoughts — whether on items below or on something else — please comment.

      Thanks to those of you who have used Columns++ while it’s still teething.

      Columnize

      Arrange text that follows a pattern, such as:

          cleaning, 4 days, $160
          staging, 1 day, $60
          safety review, 1 day, $45
          privacy check and sequester, 2 days, $120
      

      in columns:

          cleaning                     4 days  $160
          staging                      1 day   $ 60
          safety review                1 day   $ 45
          privacy check and sequester  2 days  $120
      

      using pattern and spacing (blanks or tabs) as specified by the user. This can be done now, with Elastic tabstops enabled, using Search in indicated region; the point of this command and dialog would be to make it easier when the pattern is simple and repeating, and to make it possible to use spaces without an intermediate Elastic tabstops step.

      Convert spaces to tabs

      Examine selected text (or the entire file) for columns that are consistent across lines and replace blanks between columns with (logical) tabs. This will probably only work as expected when Elastic tabstops are enabled. (One tab per column, plus preceding blanks as needed to keep position, when not elastic?) As yet undetermined what user settings should be available. It might be that the Elastic tabstops profile implies everything we need to know. If Non-ASCII white space (below) is implemented, and maybe even if it isn’t, all Unicode space characters should be recognized and processed as white space.

      Examples

      I’ve kept the Help pretty complete and up-to-date, but it’s rather technically oriented. Building, documenting, illustrating and organizing a comprehensive set of examples will be time-consuming, but it would probably help users — especially new users — a lot.

      Install through Plugins Admin

      Get Columns++ into the Plugins Admin list. The plugin shouldn’t be there until it’s widely tested and believed stable, but it’s not likely to get widely tested until it’s already there. It’s very unclear to me how to decide when to do this, since once it’s done, I no longer control the update schedule. I could find a serious error the day after a Notepad++ release and there would be little I could do about it. How have other plugin authors dealt with this? (See also Notify/update outside Notepad++ updates, below.)

      Non-ASCII white space

      Use any space characters available in the Default Style font — not just ASCII spaces — to get accurate (or as nearly accurate as possible) alignment for proportional fonts. This would affect Calculate…, the Align commands, Columnize (above) and Convert tabs to spaces. Recognition of non-ASCII spaces when Ignore surrounding blanks/tabs in custom Sort… is checked should be supported along with this. I haven’t yet looked into how to enumerate and measure the size of available non-ASCII white space characters, so I don’t know how easy or difficult this will be. Might be useful only for Unicode files?

      Expanded entry dialogs for regular expressions and formulas

      For each dropdown box where the user can enter a search string or expression, a replacement string or expression, or a formula, add a button which opens a user-sizeable dialog giving a larger window into which to type. Expected features include:

      • multi-line entry
      • Scintilla-based edit window, using default style font instead of (often minuscule) system dialog font
      • list of user-saved expressions
      • user-modifiable list of custom expressions; e.g., \T = [^\t\r\n] or (*number) = (?<![\d\.,+\-])[+\-]?(?:\d(?:,?\d)*+(?:\.(?:\d(?:,?\d)*+)?)?|\.\d(?:,?\d)*+)
      • “help” pane that can be opened to show regular expression and/or formula reference (possibly with insert buttons)

      Regex searches in a separate thread

      Run regex searches in a separate thread so as not to lock the GUI thread, and enable a cancel button. If possible, show a progress bar (relatively simple to show for completed steps in Count, Replace All and the like — that doesn’t even require a separate thread; uncertain whether practical or possible to estimate progress within searches by monitoring iterator member function calls). If this all works as intended, see if it is possible to inhibit the “complexity” failure case, since the user will be able to cancel the operation if it is not making progress.

      Print

      Scintilla’s print support (and hence print in Notepad++, which relies on it) does not process custom tab positions correctly (looks like it uses the pixel positions set for the tabs on the screen without taking into account the different pixel density of the printer); the result is that files using Elastic tabstops can’t be printed in a useful fashion without converting tabs to spaces first. Since printer fonts do not necessarily correspond pixel-for-pixel to screen fonts even after adjusting for pixel density, it might not be possible to print files using Elastic tabstops and proportional fonts accurately and reliably without a great deal of complex processing. There should be some way for a user to print a file that uses Elastic tabstops without a lot of fuss and bother, but it is unclear how to make that happen.

      Notify/update outside Notepad++ updates

      The idea would be to modify a Columns++ menu item (for example, change Help/About… to Update! - Help/About…) or add an Update… item at the bottom of the menu to unintrusively alert the user that an update is available, and allow for the user to initiate an update from a dialog, without having to wait for the next Notepad++ update and without having to understand GitHub or access it directly.

      This would make me feel less nervous about the possibility of discovering an important fix just after a version has been baked into the current Plugins Admin. However, I suspect there are worrisome security implications of supporting this sort of update within the plugin, rather than through Notepad++. I suspect there is no good solution to the problem of stale plugins until and unless Notepad++ implements one; it is unclear to me whether a solution in the plugin would be worse than no solution.

      PeterJonesP rdipardoR 2 Replies Last reply Reply Quote 1
      • PeterJonesP
        PeterJones @Coises
        last edited by

        @Coises ,

        Being someone who doesn’t actually use the plugin, but recommends it on a semi-regular basis now ;-) , my suggestions for the first two highest priorities would be putting it in Plugins Admin and allowing easy out-of-cycle updates – because those two coupled together make it easiest for newbies to install it, but not be worried about being out-of-date for critical fixes (and makes it easier for me to recommend to others, thus getting you a higher userbase).

        I don’t think printing needs to be a priority – I think printing is one of the least-useful features of a text editor nowadays.

        My first reaction to “separate thread for searching” was “why bother”… but if it makes it easy to cancel a long search, then it’s actually a really good idea.

        And given my prompting you for examples to put into the FAQ, you can probably guess that I’m also a fan of “more examples”.

        CoisesC 2 Replies Last reply Reply Quote 3
        • CoisesC
          Coises @PeterJones
          last edited by

          @PeterJones Do you (or anyone else) know of any Notepad++ plugin on the Plugins Admin list that does out-of-cycle updates?

          I would like to see how it’s done, especially if it’s a plugin that’s generally accepted by the community as doing it “the right way.”

          PeterJonesP 1 Reply Last reply Reply Quote 0
          • PeterJonesP
            PeterJones @Coises
            last edited by

            @Coises said in Columns++ missing features / road map:

            @PeterJones Do you (or anyone else) know of any Notepad++ plugin on the Plugins Admin list that does out-of-cycle updates?

            I do not.

            I would like to see how it’s done, especially if it’s a plugin that’s generally accepted by the community as doing it “the right way.”

            I cannot answer for “best”, but one possible way would be similar to the way Notepad++ itself does it through gup (or even just use gup – it is specifically designed to be able to handle a different config file). Basically, poll a URL that you control, which returns something like an XML for the most recent download for your plugin (*). There are two ways this could be done:

            1. like, with gup, poll the base url with a query-param for the current version of your URL, and return an XML with a yes/no and a URL for dowonloading:
              • For example, as of today, polling the URL https://notepad-plus-plus.org/update/getDownloadUrl.php?version=8.5.8 gives the XML

                <GUP>
                  <NeedToBeUpdated>no</NeedToBeUpdated>
                </GUP>
                
              • whereas https://notepad-plus-plus.org/update/getDownloadUrl.php?version=8.5.7 gives:

                <GUP>
                  <NeedToBeUpdated>yes</NeedToBeUpdated>
                  <Version>8.5.8</Version>
                  <Location>https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v8.5.8/npp.8.5.8.Installer.exe</Location>
                </GUP>
                
              • then you would know if it said yes, you would know to go download your updated plugin from the installer from github

            2. Simpler (IMO), just have your controlled URL always return just the simple XML document <Location>https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v8.5.8/npp.8.5.8.Installer.exe</Location>
              • then have your plugin compare that location to a location stored on your local machine: if the most recent location is different than the one you have stored, download the new copy of the plugin, and update your local stored location to match; if it’s the same, there is no update needed.

            ----

            *: this is to avoid flooding github with “polls” of the server that don’t equate to real downloads… gh has some weird rules about what you are and are not allowed to do, and the old method for the updatable plugins list would have apparently violated that, because it would be treating gh as a distribution host rather than a source-code repository – which is why he didn’t make the plugin-list out-of-cycle updatable. Though why he didn’t do a separate gup url for the plugin-list, and just do it the same way that is apparently perfectly legal for the main application to be downloaded from gh.

            CoisesC 1 Reply Last reply Reply Quote 2
            • rdipardoR
              rdipardo @Coises
              last edited by

              @Coises said in Columns++ missing features / road map:

              I have no way of knowing how many users my Columns++ plugin has . . .

              Shields.io offers a free API for getting download metrics, including GitHub releases. You can simply paste the endpoint into a README to create a vanity badge, e.g.,

              ## Columns++ : total GitHub downloads
              
              ![](https://img.shields.io/github/downloads/Coises/ColumnsPlusPlus/total?logo=github)
              

              Let’s see if it works…

              Columns++ : total GH downloads

              1 Reply Last reply Reply Quote 2
              • Thomas KnoefelT
                Thomas Knoefel
                last edited by Thomas Knoefel

                @Coises said in Columns++ missing features / road map:

                I could find a serious error the day after a Notepad++ release and there would be little I could do about it. How have other plugin authors dealt with this?

                From my point of view, you have to be convinced yourself if it is (almost) stable. If you give users some easy-to-use examples firsthand, they will test it and see if it fits their requirements. And for later, they sneak deeper into the most complex topics, but this may not happen with the first releases. If you have some fans of your plugin, they will support you with enhancements and error findings (if needed). But no worries. Updates will be done frequently, almost monthly, by N++, and even the best programs are not bug-free. I remember Win95 and its endless Blue Screens :-)

                PS: You can also give your code a basic quality check via Codacy which will also be supported by shields.io. Here you can generate a Batch as well. For me it was just fun. Besides there are also other Open Source QA Tools worth trying like cppcheck, which convinced me a bit more.

                1 Reply Last reply Reply Quote 2
                • guy038G
                  guy038
                  last edited by guy038

                  Hello, @coises, @peterjones, @rdipardo, @thomas-knoefel and All,

                  @coises, you said :

                  I have no way of knowing how many users my Columns++ plugin has,…

                  So, I just did this simple search, on Net :

                  How to get the number of people who downloaded a software from GitHub ?

                  Then, I went to the fourth provided link :

                  https://www.artificialworlds.net/blog/2015/10/16/finding-the-download-count-of-github-releases/

                  From this location, I tried, as the Andy Balaam author mentioned, the link :

                  https://api.github.com/repos/andybalaam/rabbit-escape/releases

                  And… bingo, I got a JSON file containing a lot of GitHub download_count values !


                  So, I tried to apply this generic link : https://api.github.com/repos/author/Application/releases to the PythonScript software of bruderstein ( Dave Brotherstone ) !

                  Thus, I used this simple link :

                  https://api.github.com/repos/bruderstein/PythonScript/releases

                  And… whooo, I got a JSON file containing all statistics about our beloved PythonScript plugin !

                  Here is the very beginning and the very end of this file :

                  [
                    {
                      "url": "https://api.github.com/repos/bruderstein/PythonScript/releases/98573402",
                      "assets_url": "https://api.github.com/repos/bruderstein/PythonScript/releases/98573402/assets",
                      "upload_url": "https://uploads.github.com/repos/bruderstein/PythonScript/releases/98573402/assets{?name,label}",
                      "html_url": "https://github.com/bruderstein/PythonScript/releases/tag/v3.0.16",
                      "id": 98573402,
                      "author": {
                        "login": "bruderstein",
                        "id": 91716,
                        "node_id": "MDQ6VXNlcjkxNzE2",
                        "avatar_url": "https://avatars.githubusercontent.com/u/91716?v=4",
                        "gravatar_id": "",
                        "url": "https://api.github.com/users/bruderstein",
                        "html_url": "https://github.com/bruderstein",
                        "followers_url": "https://api.github.com/users/bruderstein/followers",
                        "following_url": "https://api.github.com/users/bruderstein/following{/other_user}",
                        "gists_url": "https://api.github.com/users/bruderstein/gists{/gist_id}",
                        "starred_url": "https://api.github.com/users/bruderstein/starred{/owner}{/repo}",
                        "subscriptions_url": "https://api.github.com/users/bruderstein/subscriptions",
                        "organizations_url": "https://api.github.com/users/bruderstein/orgs",
                        "repos_url": "https://api.github.com/users/bruderstein/repos",
                        "events_url": "https://api.github.com/users/bruderstein/events{/privacy}",
                        "received_events_url": "https://api.github.com/users/bruderstein/received_events",
                        "type": "User",
                        "site_admin": false
                      },
                      "node_id": "RE_kwDOAAwkgs4F4Bxa",
                      "tag_name": "v3.0.16",
                      "target_commitish": "de5de03200e33568e77d313c603b8dda803c8a93",
                      "name": "v3.0.16",
                      "draft": false,
                      "prerelease": true,
                      "created_at": "2023-04-07T14:08:52Z",
                      "published_at": "2023-04-07T14:37:12Z",
                      "assets": [
                        {
                          "url": "https://api.github.com/repos/bruderstein/PythonScript/releases/assets/102713166",
                          "id": 102713166,
                          "node_id": "RA_kwDOAAwkgs4GH0dO",
                          "name": "PythonScript_3.0.16.0.msi",
                          "label": "",
                          "uploader": {
                            "login": "bruderstein",
                            "id": 91716,
                            "node_id": "MDQ6VXNlcjkxNzE2",
                            "avatar_url": "https://avatars.githubusercontent.com/u/91716?v=4",
                            "gravatar_id": "",
                            "url": "https://api.github.com/users/bruderstein",
                            "html_url": "https://github.com/bruderstein",
                            "followers_url": "https://api.github.com/users/bruderstein/followers",
                            "following_url": "https://api.github.com/users/bruderstein/following{/other_user}",
                            "gists_url": "https://api.github.com/users/bruderstein/gists{/gist_id}",
                            "starred_url": "https://api.github.com/users/bruderstein/starred{/owner}{/repo}",
                            "subscriptions_url": "https://api.github.com/users/bruderstein/subscriptions",
                            "organizations_url": "https://api.github.com/users/bruderstein/orgs",
                            "repos_url": "https://api.github.com/users/bruderstein/repos",
                            "events_url": "https://api.github.com/users/bruderstein/events{/privacy}",
                            "received_events_url": "https://api.github.com/users/bruderstein/received_events",
                            "type": "User",
                            "site_admin": false
                          },
                          "content_type": "application/octet-stream",
                          "state": "uploaded",
                          "size": 17232412,
                          "download_count": 110,
                          "created_at": "2023-04-07T14:43:35Z",
                          "updated_at": "2023-04-07T14:43:37Z",
                          "browser_download_url": "https://github.com/bruderstein/PythonScript/releases/download/v3.0.16/PythonScript_3.0.16.0.msi"
                        },
                  
                  ...
                  ...
                  ...
                        {
                          "url": "https://api.github.com/repos/bruderstein/PythonScript/releases/assets/6845171",
                          "id": 6845171,
                          "node_id": "MDEyOlJlbGVhc2VBc3NldDY4NDUxNzE=",
                          "name": "PythonScript_TclTk_1.0.8.0.zip",
                          "label": null,
                          "uploader": {
                            "login": "chcg",
                            "id": 12630740,
                            "node_id": "MDQ6VXNlcjEyNjMwNzQw",
                            "avatar_url": "https://avatars.githubusercontent.com/u/12630740?v=4",
                            "gravatar_id": "",
                            "url": "https://api.github.com/users/chcg",
                            "html_url": "https://github.com/chcg",
                            "followers_url": "https://api.github.com/users/chcg/followers",
                            "following_url": "https://api.github.com/users/chcg/following{/other_user}",
                            "gists_url": "https://api.github.com/users/chcg/gists{/gist_id}",
                            "starred_url": "https://api.github.com/users/chcg/starred{/owner}{/repo}",
                            "subscriptions_url": "https://api.github.com/users/chcg/subscriptions",
                            "organizations_url": "https://api.github.com/users/chcg/orgs",
                            "repos_url": "https://api.github.com/users/chcg/repos",
                            "events_url": "https://api.github.com/users/chcg/events{/privacy}",
                            "received_events_url": "https://api.github.com/users/chcg/received_events",
                            "type": "User",
                            "site_admin": false
                          },
                          "content_type": "application/x-zip-compressed",
                          "state": "uploaded",
                          "size": 4796381,
                          "download_count": 13,
                          "created_at": "2018-04-14T12:19:39Z",
                          "updated_at": "2018-04-14T12:21:41Z",
                          "browser_download_url": "https://github.com/bruderstein/PythonScript/releases/download/v1.0.8/PythonScript_TclTk_1.0.8.0.zip"
                        }
                      ],
                      "tarball_url": "https://api.github.com/repos/bruderstein/PythonScript/tarball/v1.0.8",
                      "zipball_url": "https://api.github.com/repos/bruderstein/PythonScript/zipball/v1.0.8",
                      "body": "- Fix for odd deadlock issues. GIL is now always given up when calling Notepad++ or Scintilla functions\r\n- Performance optimisation for notifications where there are no callbacks registered"
                    },
                    {
                      "url": "https://api.github.com/repos/bruderstein/PythonScript/releases/10546761",
                      "assets_url": "https://api.github.com/repos/bruderstein/PythonScript/releases/10546761/assets",
                      "upload_url": "https://uploads.github.com/repos/bruderstein/PythonScript/releases/10546761/assets{?name,label}",
                      "html_url": "https://github.com/bruderstein/PythonScript/releases/tag/v1.0.7",
                      "id": 10546761,
                      "author": {
                        "login": "chcg",
                        "id": 12630740,
                        "node_id": "MDQ6VXNlcjEyNjMwNzQw",
                        "avatar_url": "https://avatars.githubusercontent.com/u/12630740?v=4",
                        "gravatar_id": "",
                        "url": "https://api.github.com/users/chcg",
                        "html_url": "https://github.com/chcg",
                        "followers_url": "https://api.github.com/users/chcg/followers",
                        "following_url": "https://api.github.com/users/chcg/following{/other_user}",
                        "gists_url": "https://api.github.com/users/chcg/gists{/gist_id}",
                        "starred_url": "https://api.github.com/users/chcg/starred{/owner}{/repo}",
                        "subscriptions_url": "https://api.github.com/users/chcg/subscriptions",
                        "organizations_url": "https://api.github.com/users/chcg/orgs",
                        "repos_url": "https://api.github.com/users/chcg/repos",
                        "events_url": "https://api.github.com/users/chcg/events{/privacy}",
                        "received_events_url": "https://api.github.com/users/chcg/received_events",
                        "type": "User",
                        "site_admin": false
                      },
                      "node_id": "MDc6UmVsZWFzZTEwNTQ2NzYx",
                      "tag_name": "v1.0.7",
                      "target_commitish": "master",
                      "name": "",
                      "draft": false,
                      "prerelease": false,
                      "created_at": "2014-07-15T22:40:39Z",
                      "published_at": "2018-04-14T12:33:22Z",
                      "assets": [
                  
                      ],
                      "tarball_url": "https://api.github.com/repos/bruderstein/PythonScript/tarball/v1.0.7",
                      "zipball_url": "https://api.github.com/repos/bruderstein/PythonScript/zipball/v1.0.7",
                      "body": "- Fix for replacing with extended Unicode characters with editor.rereplace() (thanks to David Instone-Brewer for reporting)\r\n- Several freeze issues corrected (thanks to skrell and Juergen Busch for reporting)"
                    }
                  ]
                  

                  For example, the 3 first download_count of this file are :

                      download_count       110    PythonScript_3.0.16.0.msi
                      download_count       147    PythonScript_3.0.16.0_x64.msi
                      download_count        45    PythonScript_Full_3.0.16.0.zip
                  

                  And for all the downloads relative to the v2.0.0.0 version, we have :

                      download_count       255    PythonScript_2.0.0.0.msi
                      download_count       602    PythonScript_2.0.0.0_x64.msi
                      download_count        85    PythonScript_ExtraLibs_2.0.0.0.zip
                      download_count       227    PythonScript_ExtraLibs_2.0.0.0_x64.zip
                      download_count       345    PythonScript_Full_2.0.0.0.zip
                      download_count     25353    PythonScript_Full_2.0.0.0_PluginAdmin.zip
                      download_count       749    PythonScript_Full_2.0.0.0_x64.zip
                      download_count    137385    PythonScript_Full_2.0.0.0_x64_PluginAdmin.zip
                      download_count        56    PythonScript_Min_2.0.0.0.zip
                      download_count       131    PythonScript_Min_2.0.0.0_x64.zip
                      download_count        53    PythonScript_TclTk_2.0.0.0.zip
                      download_count       109    PythonScript_TclTk_2.0.0.0_x64.zip
                  

                  But the most interesting point is that it’s a real-time updated JSON file !! For instance, the above data was retrieved at 02.00 pm about. Now, this updated version was retrieved at 03.00 pm about :

                      download_count       255    PythonScript_2.0.0.0.msi
                      download_count       602    PythonScript_2.0.0.0_x64.msi
                      download_count        85    PythonScript_ExtraLibs_2.0.0.0.zip
                      download_count       227    PythonScript_ExtraLibs_2.0.0.0_x64.zip
                      download_count       345    PythonScript_Full_2.0.0.0.zip
                      download_count     25356    PythonScript_Full_2.0.0.0_PluginAdmin.zip
                      download_count       749    PythonScript_Full_2.0.0.0_x64.zip
                      download_count    137395    PythonScript_Full_2.0.0.0_x64_PluginAdmin.zip
                      download_count        56    PythonScript_Min_2.0.0.0.zip
                      download_count       131    PythonScript_Min_2.0.0.0_x64.zip
                      download_count        53    PythonScript_TclTk_2.0.0.0.zip
                      download_count       109    PythonScript_TclTk_2.0.0.0_x64.zip
                  

                  And you can see that :

                  • 3 new downloads of PythonScript_Full_2.0.0.0_PluginAdmin.zip occurred, in the last hour

                  • 10 new downloads of PythonScript_Full_2.0.0.0_x64_PluginAdmin.zip occurred, in the last hour


                  So, @coises, I hope that this post puts you on the right track !

                  Note that I also tried this link :

                  https://api.github.com/repos/donho/notepad-plus-plus/releases

                  But, unfortunately, it returns the following empty JSON file :

                  1 []
                  

                  Best Regards,

                  guy038

                  P.S. :

                  In a DOS prompt window , you could have typed, either, the command :

                  curl -s https://api.github.com/repos/bruderstein/PythonScript/releases > C:\Stats.txt

                  CoisesC 1 Reply Last reply Reply Quote 3
                  • CoisesC
                    Coises @PeterJones
                    last edited by

                    @PeterJones said in Columns++ missing features / road map:

                    this is to avoid flooding github with “polls” of the server that don’t equate to real downloads… gh has some weird rules about what you are and are not allowed to do, and the old method for the updatable plugins list would have apparently violated that, because it would be treating gh as a distribution host rather than a source-code repository – which is why he didn’t make the plugin-list out-of-cycle updatable.

                    Thank you for your response. I am a bit hesitant to involve my personal website, so this is troubling me a bit.

                    By any chance, do you know if there is a reference to this constraint? I’m not seeing it GitHub’s terms of service. What I was thinking is that GitHub has an API; one of the functions which can be called without authentication is to get a list of releases, e.g.:

                    https://api.github.com/repos/Coises/ColumnsPlusPlus/releases

                    comes back with JSON listing the releases.

                    I did find this:
                    https://www.advancedinstaller.com/github-integration-for-updater.html
                    which appears to be doing what I was considering, but in an installer… so perhaps not the same concerns.

                    My first step in implementing this would be just to provide notice on the menu, with a link in the About dialog to the new release on GitHub.

                    Then I could implement a couple other improvements and hope to get some feedback as to whether that operates properly in the wild.

                    Then I would consider whether to have the plugin launch its own update, or whether simply to make a more robust installer to which to link and let the user run the actual update.

                    PeterJonesP 1 Reply Last reply Reply Quote 0
                    • PeterJonesP
                      PeterJones @Coises
                      last edited by

                      @Coises said in Columns++ missing features / road map:

                      do you know if there is a reference to this constraint? I’m not seeing it GitHub’s terms of service.

                      I have no such reference, only vague memories as to the excuses presumably valid reasons given in the v7.6.x plugin migration for not having a dynamic plugin list.

                      What I was thinking is that GitHub has an API; one of the functions which can be called without authentication is to get a list of releases, e.g.:

                      If GitHub exposes something in the API, then as long as you follow the GitHub API’s terms of service, you should theoretically be safe (IANAL & TINLA).

                      1 Reply Last reply Reply Quote 1
                      • CoisesC
                        Coises @guy038
                        last edited by

                        @guy038 Thanks. I knew about the API, but didn’t notice that there is a download_count field for each asset.

                        That does give me some notion how many people are at least continuing to update. It looks like 25 downloads of the latest version binaries and 45 downloads of the quick installer. More than I expected!

                        EkopalypseE 1 Reply Last reply Reply Quote 2
                        • EkopalypseE
                          Ekopalypse @Coises
                          last edited by

                          @Coises

                          A quick python3 script sample

                          from urllib.request import Request, urlopen
                          import time
                          
                          OK = 200
                          repo_url = 'https://api.github.com/repos/Coises/ColumnsPlusPlus/releases'
                          
                          with urlopen(Request(repo_url)) as results:
                              if results.code == OK:
                                  req = Request(repo_url)
                                  req.add_header('accept', 'application/vnd.github.v3.star+json')
                                  results = urlopen(req)
                                  if results.code != OK:
                                      print(f'error opening {repo_url}')
                                  else:
                                      releases = json.load(results)
                                      for release in releases:
                                          release_id = f'{repo_url}/{release["id"]}'
                                          req2 = Request(release_id)
                                          req2.add_header('accept', 'application/vnd.github.v3.star+json')
                                          stats = urlopen(req2)
                                          if stats.code != OK:
                                              print(f'error opening {release_id}')
                                          else:
                                              stat = json.load(stats)
                                              print(stat['tag_name'])
                                              for asset in stat['assets']:
                                                  print(f"  name    : {asset['name']}")
                                                  print(f"  download: {asset['download_count']}")
                          
                          1 Reply Last reply Reply Quote 3
                          • guy038G
                            guy038
                            last edited by guy038

                            Hi, @coises, @peterjones, @rdipardo, @thomas-knoefel, @ekopalypse and All,

                            @coises, some hints to simplify the way to get good statistics about your repository :

                            First, this link below, always displays the last version of your repository :

                            https://api.github.com/repos/coises/columnsplusplus/releases/latest


                            Now, once your retrieved the comolete file, in a Notepad++ new tab :

                            • Open the Mark dialog

                            • Tick the Bookmark line and Purge for each search options

                            • MARK (?-is)"tag_name": "\K.+(?=")

                            • Click on the Mark All button

                            • Click on the Copy Marked Text

                            You should get, after a Ctrl + V action, this text :

                            v0.8-alpha
                            v0.7.5-alpha
                            v0.7.4-alpha
                            v0.7.3-alpha
                            v0.7.2-alpha
                            v0.7.1-alpha
                            v0.7-alpha
                            v0.6.1-alpha
                            v0.6-alpha
                            v0.5.1-alpha
                            v0.5-alpha
                            v0.4.1-alpha
                            v0.4-alpha
                            v0.3-alpha
                            v0.2.2-alpha
                            v0.2.1.7-alpha
                            v0.2.0.6-alpha
                            v0.1.0.5-alpha
                            v0.0.3.4-alpha
                            v0.0.2.3-alpha
                            v0.0.1.2-alpha
                            v0.0.0.1-alpha
                            

                            So, it’s easy to get your number of releases : 22

                            And, for example, to get the particular v0.2.1.7-alpha version, use the following link :

                            https://api.github.com/repos/coises/columnsplusplus/releases/tags/v0.2.1.7-alpha


                            Now, from your complete file, you can also get a particular release from its Release_Id number

                            • Open the Mark dialog

                            • Tick the Bookmark line and Purge for each search options

                            • MARK "id": \K\d+(?=,\R\h+"author":)

                            • Click on the Mark All button

                            • Click on the Copy Marked Text

                            You should get, after a Ctrl + V action, this text :

                            127063824
                            125505991
                            124506235
                            123773760
                            121808400
                            121604526
                            119742961
                            117526732
                            117260588
                            104643692
                            103662564
                            102527285
                            102273235
                            101427295
                            100845810
                            99983124
                            99837353
                            99605259
                            99007126
                            98975802
                            98659223
                            98639493
                            

                            As you can see, you still get 22 releases !

                            And, for example, in order to get the older release, use the following link :

                            https://api.github.com/repos/coises/columnsplusplus/releases/98639493

                            OR this one :

                            https://api.github.com/repos/coises/columnsplusplus/releases/tags/v0.0.0.1-alpha


                            Finally, from the original file, from the link https://api.github.com/repos/coises/columnsplusplus/releases, and copied in a N++ new tab, let’s get a nice layout :

                            • Open the Mark dialog

                            • Tick the Bookmark line and Purge for each search options

                            • MARK (?-i)tag_name|download_count|browser_download_url|tarball_url

                            • Click on the Mark All button

                            • Run the Search > Bookmark > Copy Bookmarked Lines option

                            • Open a new tab

                            • Do a Ctrl + V operation

                            => 166 lines copied

                            • Against this new tab, execute, successively, the different regex S/Rs, below :

                              • SEARCH ^.+(?:tag_name|download_count|browser_download_url|tarball_url).+\R(*SKIP)(*F)|^.*\R

                              • REPLACE Leave EMPTY

                              • SEARCH (?-s)"browser_download_url".+\R\K.+tarball_url.+\R

                              • REPLACE Leave EMPTY

                              • SEARCH (?-s)^.+"(?:download_count|browser_download_url|tarball_url)":\x20"?|",?$

                              • REPLACE Leave EMPTY

                              • SEARCH (?-s)^.+"tag_name":\x20"(.+)

                              • REPLACE \r\n \1

                              • SEARCH (\d+),\R

                              • REPLACE \t\t\t\t\t\1\t\t\t

                              • SEARCH https://.+/download/

                              • REPLACE Leave EMPTY

                            => You should end up with this expected OUTPUT text :

                            
                              v0.8-alpha
                            					12			v0.8-alpha/ColumnsPlusPlus-0.8-x64.zip
                            					13			v0.8-alpha/ColumnsPlusPlus-0.8-x86.zip
                            					45			v0.8-alpha/ColumnsPlusPlus-0.8.exe
                            
                              v0.7.5-alpha
                            					13			v0.7.5-alpha/ColumnsPlusPlus-0.7.5-x64.zip
                            					5			v0.7.5-alpha/ColumnsPlusPlus-0.7.5-x86.zip
                            					23			v0.7.5-alpha/ColumnsPlusPlus-0.7.5.exe
                            
                              v0.7.4-alpha
                            					6			v0.7.4-alpha/ColumnsPlusPlus-0.7.4-x64.zip
                            					6			v0.7.4-alpha/ColumnsPlusPlus-0.7.4-x86.zip
                            					4			v0.7.4-alpha/ColumnsPlusPlus-0.7.4.exe
                            
                              v0.7.3-alpha
                            					19			v0.7.3-alpha/ColumnsPlusPlus-0.7.3-x64.zip
                            					8			v0.7.3-alpha/ColumnsPlusPlus-0.7.3-x86.zip
                            					57			v0.7.3-alpha/ColumnsPlusPlus-0.7.3.exe
                            
                              v0.7.2-alpha
                            					25			v0.7.2-alpha/ColumnsPlusPlus-0.7.2-x64.zip
                            					10			v0.7.2-alpha/ColumnsPlusPlus-0.7.2-x86.zip
                            					22			v0.7.2-alpha/ColumnsPlusPlus-0.7.2.exe
                            					2			v0.7.2-alpha/DIAGNOSTIC-ColumnsPlusPlus-0.7.2.1-x64.zip
                            					1			v0.7.2-alpha/DIAGNOSTIC-ColumnsPlusPlus-0.7.2.1-x86.zip
                            					0			v0.7.2-alpha/DIAGNOSTIC-ColumnsPlusPlus-0.7.2.1.exe
                            					1			v0.7.2-alpha/DIAGNOSTIC-ColumnsPlusPlus-0.7.2.2-x64.zip
                            					0			v0.7.2-alpha/DIAGNOSTIC-ColumnsPlusPlus-0.7.2.2-x86.zip
                            					0			v0.7.2-alpha/DIAGNOSTIC-ColumnsPlusPlus-0.7.2.2.exe
                            
                              v0.7.1-alpha
                            					4			v0.7.1-alpha/ColumnsPlusPlus-0.7.1-x64.zip
                            					6			v0.7.1-alpha/ColumnsPlusPlus-0.7.1-x86.zip
                            					5			v0.7.1-alpha/ColumnsPlusPlus-0.7.1.exe
                            
                              v0.7-alpha
                            					22			v0.7-alpha/ColumnsPlusPlus-0.7-x64.zip
                            					5			v0.7-alpha/ColumnsPlusPlus-0.7-x86.zip
                            					16			v0.7-alpha/ColumnsPlusPlus-0.7.exe
                            
                              v0.6.1-alpha
                            					7			v0.6.1-alpha/ColumnsPlusPlus-0.6.1-x64.zip
                            					5			v0.6.1-alpha/ColumnsPlusPlus-0.6.1-x86.zip
                            					18			v0.6.1-alpha/ColumnsPlusPlus-0.6.1.exe
                            
                              v0.6-alpha
                            					4			v0.6-alpha/ColumnsPlusPlus-0.6-x64.zip
                            					5			v0.6-alpha/ColumnsPlusPlus-0.6-x86.zip
                            					10			v0.6-alpha/ColumnsPlusPlus-0.6.exe
                            
                              v0.5.1-alpha
                            					26			v0.5.1-alpha/ColumnsPlusPlus-0.5.1-x64.zip
                            					15			v0.5.1-alpha/ColumnsPlusPlus-0.5.1-x86.zip
                            					126			v0.5.1-alpha/ColumnsPlusPlus-0.5.1.exe
                            
                              v0.5-alpha
                            					16			v0.5-alpha/ColumnsPlusPlus-0.5-x64.zip
                            					15			v0.5-alpha/ColumnsPlusPlus-0.5-x86.zip
                            					65			v0.5-alpha/ColumnsPlusPlus-0.5.exe
                            
                              v0.4.1-alpha
                            					7			v0.4.1-alpha/ColumnsPlusPlus-0.4.1-x64.zip
                            					4			v0.4.1-alpha/ColumnsPlusPlus-0.4.1-x86.zip
                            					20			v0.4.1-alpha/ColumnsPlusPlus-0.4.1.exe
                            
                              v0.4-alpha
                            					15			v0.4-alpha/ColumnsPlusPlus-0.4-x64.zip
                            					13			v0.4-alpha/ColumnsPlusPlus-0.4-x86.zip
                            					41			v0.4-alpha/ColumnsPlusPlus-0.4.exe
                            
                              v0.3-alpha
                            					8			v0.3-alpha/ColumnsPlusPlus-0.3-x64.zip
                            					6			v0.3-alpha/ColumnsPlusPlus-0.3-x86.zip
                            
                              v0.2.2-alpha
                            					8			v0.2.2-alpha/ColumnsPlusPlus-0.2.2-x64.zip
                            					6			v0.2.2-alpha/ColumnsPlusPlus-0.2.2-x86.zip
                            
                              v0.2.1.7-alpha
                            					11			v0.2.1.7-alpha/ColumnsPlusPlus-0.2.1.7-x64.zip
                            					4			v0.2.1.7-alpha/ColumnsPlusPlus-0.2.1.7-x86.zip
                            
                              v0.2.0.6-alpha
                            					5			v0.2.0.6-alpha/ColumnsPlusPlus-0.2.0.6-x64.zip
                            					5			v0.2.0.6-alpha/ColumnsPlusPlus-0.2.0.6-x86.zip
                            
                              v0.1.0.5-alpha
                            					8			v0.1.0.5-alpha/ColumnsPlusPlus-0.1.0.5-x64.zip
                            					7			v0.1.0.5-alpha/ColumnsPlusPlus-0.1.0.5-x86.zip
                            
                              v0.0.3.4-alpha
                            					4			v0.0.3.4-alpha/ColumnsPlusPlus.x64.zip
                            					6			v0.0.3.4-alpha/ColumnsPlusPlus.x86.zip
                            
                              v0.0.2.3-alpha
                            					5			v0.0.2.3-alpha/ColumnsPlusPlus.x64.zip
                            					3			v0.0.2.3-alpha/ColumnsPlusPlus.x86.zip
                            
                              v0.0.1.2-alpha
                            					9			v0.0.1.2-alpha/ColumnsPlusPlus.x64.zip
                            					5			v0.0.1.2-alpha/ColumnsPlusPlus.x86.zip
                            
                              v0.0.0.1-alpha
                            https://api.github.com/repos/Coises/ColumnsPlusPlus/tarball/v0.0.0.1-alpha
                            

                            Of course, all these regexes S/R may be insserted in a single macro !


                            Now, after looking at this link :

                            https://docs.github.com/fr/rest/releases/releases#get-a-release

                            It seems that, in order to get this kind of file for Notepad++, we should use the following link :

                            https://api.github.com/repos/donho/notepad-plus-plus/notepad-plus-plus/releases

                            However, this link does not work at all. Why ??

                            Best Regards,

                            guy038

                            Oh…, I see that @ekopalypse provided a python script on this topic. I bet that it will certainly be easier to use than my series of regexes :-((

                            CoisesC 1 Reply Last reply Reply Quote 3
                            • CoisesC
                              Coises @guy038
                              last edited by

                              @guy038 said in Columns++ missing features / road map:

                              It seems that, in order to get this kind of file for Notepad++, we should use the following link :

                              https://api.github.com/repos/donho/notepad-plus-plus/notepad-plus-plus/releases

                              However, this link does not work at all. Why ??

                              https://api.github.com/repos/notepad-plus-plus/notepad-plus-plus/releases

                              The repository is owned by an organization (Notepad++), not a user.

                              1 Reply Last reply Reply Quote 1
                              • CoisesC
                                Coises @PeterJones
                                last edited by

                                @PeterJones said in Columns++ missing features / road map:

                                highest priorities would be putting it in Plugins Admin and allowing easy out-of-cycle updates

                                I’m thinking I will either do these together, or (probably) do the update notification first. Tests for showing when there is an update are promising thus far; I haven’t looked at the Plugins Admin process yet.

                                For out-of-cycle updates, do you think it would be reasonable to link to the new release on GitHub from the Help/About dialog, but have it open in the user’s default browser, requiring them to download and run an installer (after closing Notepad++)?

                                Of course, I would still update the Plugins Admin for the next Notepad++ cycle whenever there is a new plugin release — this would just be if someone wants to get an update before the next Notepad++ update, or doesn’t want to run the latest release of Notepad++.

                                I can think of a couple approaches to self-updating, and I could probably get something to work that would be more convenient for users than having to download and run an installer, but I’m a bit nervous that there might be security implications that would get past me: I don’t have any particular expertise in that area. It just feels safer to open the default browser and let the user do an ordinary installation. (Again, this would only be an “extra” beyond ordinary updating when Notepad++ updates.)

                                I suspect the Quick Installer I have now works for most users, but probably causes a lot of security warnings. I won’t be able to eliminate all warnings, because I’m not a business, and hence not entitled to an enhanced code signing certificate — I have no code signing certificate at all now, and I’m not likely to pay to get one. The security warning approach taken by Windows is not friendly to FOSS. That aside, though, the way I cobbled the Quick Installer together probably really looks like potentially malicious software to AV heuristics, so I’ll need to invest some time in that at some point, if I want to continue to rely on an installer for out-of-cycle updates.

                                1 Reply Last reply Reply Quote 2
                                • CoisesC
                                  Coises
                                  last edited by

                                  I´ve published a new release, Columns++ v1.0, which can check GitHub for new releases.

                                  The user can choose (in the Options dialog) to show a notice for all new releases or only for new “stable” releases, or to turn off automatic checking. The notice is displayed by adding “Update Available” to the text of the “Help/About” item at the bottom of the Columns++ menu. The automatic check occurs when Notepad++ loads Columns++ and is limited to once every twelve hours. The default is to show a notice only for new stable releases, which are releases not marked as a Pre-Release on GitHub.

                                  It is also possible to check on demand from the Help/About dialog, which shows links to the newest and latest stable releases on GitHub.

                                  I’ve submitted a pull request to add this to the Plugins Admin list.

                                  There is still only the Quick Installer or manual copying to install a release that isn’t offered by Plugins Admin. It’s not ideal, but it’s simple and probably works for most people.

                                  1 Reply Last reply Reply Quote 3
                                  • First post
                                    Last post
                                  The Community of users of the Notepad++ text editor.
                                  Powered by NodeBB | Contributors