github pinokiocomputer/pinokio 0.0.20

latest releases: 2.15.1, 2.14.3, 2.2.0...
14 months ago

1. Get rid of the brew dependency

Can install brew manually later when you need them.

The brew auto install was useful when shell was not as powerful early on in the Pinokio development, but now the shell API can install and run anything, including brew, so it's better to just install it on the fly if it's ever needed.

2. A window with callback actions

1. open uri with callback "close" action

  • requires
    • uri: the pinokio uri to open
    • html: the html to display in the last notification after the new window finishes execution
    • action: "close" (the action to run when the user clicks the above notification) => in this case closes the window
/pinokio?uri=<uri>&html=install finished! click to close the window&action=close

open the <uri>, runs the script, and at the end, pops up a notification that says "install finished! click to close the window", and when clicked, closes the window

Example script:

{
  "run": [{
    "method": "input",
    "params": {
      "title": "Download PDF",
      "description":"<a href='/pinokio?uri=https://github.com/cocktailpeanut/tutorial.pinokio.git/fs/download_file.json&action=close&html=successfully downloaded! click to close the window' target='_blank'>Download and come back</a>, and then click Done"
    }
  }, {
    "method": "browser.open",
    "params": {
      "uri": "/pinokio?uri=https://github.com/cocktailpeanut/tutorial.pinokio.git/fs/bitcoin.pdf?raw=true",
      "target": "_blank"
    }
  }]
}

2. open uri with a callback uri

  • requires:
    • uri: the pinokio uri to open
    • html: the html to display in the last notification after the new window finishes execution
    • href: the uri to open when above notification is clicked
    • target: whether to open in a new window or same window. can be "_blank", "_self", etc.
    • features: features attribute for window.open(uri, target, features)
/pinokio?uri=<uri>&html=install finished! click to close the window&href=<href>&target=_blank"

open the <uri>, runs the script, and at the end, pops up a notification that says "install finished! click to visit <callback_uri>", and when clicked opens a new window and loads the <href> in the browser

Example script:

{
  "run": [{
    "method": "browser.open",
    "params": {
      "uri": "/pinokio?uri=https://github.com/cocktailpeanut/tutorial.pinokio.git/fs/download_file.json&href=https://google.com&target=_blank&html=successfully downloaded! click to open google",
      "target": "_blank"
    }
  }, {
    "method": "browser.open",
    "params": {
      "uri": "/pinokio?uri=https://github.com/cocktailpeanut/tutorial.pinokio/fs/bitcoin.pdf?raw=true",
      "target": "_blank"
    }
  }]
}

Triggering the download page:

Don't miss a new pinokio release

NewReleases is sending notifications on new releases.