Releases: pinokiocomputer/pinokio
0.0.22
MIT License
0.0.21
URL Scheme
pinokio://<path>
is equivalent to http://localhost/pinokio/<path>
Download URL
pinokio://download?uri=https://github.com/cocktailpeanut/llamacpp.pinokio.git
Any Pinokio path
pinokio://?uri=https://github.com/cocktailpeanut/llamacpp.pinokio.git/install
Opens http://localhost:4200/pinokio?uri=https://github.com/cocktailpeanut/llamacpp.pinokio.git/install
In Pinokio file system, this is https://github.com/cocktailpeanut/llamacpp.pinokio.git/install
0.0.20
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:
0.0.19
update pinokiod
0.0.18
init