Discussion:
[tw5] [TW5] Three small plugins, Login, ServerImages, DownloadBinary
(too old to reply)
Jed Carty
2018-07-13 18:05:55 UTC
Permalink
DownloadBinary adds an action widget that lets you download the binary
version of media stored in a tiddler as a base64 string. That means that if
you import a picture into a wiki than you can use this message to download
the original image file. If it works well I will make a pull request to
either get this in the core or move the plugin into the main plugin
library. If anyone has suggestions or thinks that there is a better way to
implement this than as an action widget let me know.
The code is here: https://github.com/OokTech/TW5-DownloadBinary
Demo: https://www.ooktech.xyz:8443/Public#Download%20Binary%20Demo

ServerImages should not go into the core but could be a very useful plugin.
It takes media files that are being imported and instead of encoding them
as base64 strings and putting that in a tiddler it saves the image file to
the server and creates a _canonical_uri tiddler. At the moment this just
works with Bob but I am looking at how to make it work with the new listen
command Jeremy is working on. I think that the issue currently is I am not
sure how best to tell the node server how to save the file, it currently
POSTs the image to /uploads, if adding that route to the listen command
works than this could work well. There is no demo for this yet because
there is not yet a way to restrict access to specific wikis or
authorisation levels.
Code: https://github.com/OokTech/TW5-ServerImages

Login is a simple login interface that takes a username and password and
POSTs them to a REST-type server and expects an access token in return. It
saves the access token in local storage and as a cookie. I don't know if
this is useful outside of the server I made for Bob but I made it so here
it is.
Code: https://github.com/OokTech/TW5-Login
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/14055a03-a870-4cc6-b4b8-5da11beb8009%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
JD
2018-07-13 18:40:11 UTC
Permalink
Hi Jed,

Thanks so much for DownloadBinary! It's the one from your above list that I
instantly understood (non-programmer here). It'll be handy for my
diagram-filled TW.

On a side note, I am really looking forward to your online multi-user Bob :D
Post by Jed Carty
DownloadBinary adds an action widget that lets you download the binary
version of media stored in a tiddler as a base64 string. That means that if
you import a picture into a wiki than you can use this message to download
the original image file. If it works well I will make a pull request to
either get this in the core or move the plugin into the main plugin
library. If anyone has suggestions or thinks that there is a better way to
implement this than as an action widget let me know.
The code is here: https://github.com/OokTech/TW5-DownloadBinary
Demo: https://www.ooktech.xyz:8443/Public#Download%20Binary%20Demo
ServerImages should not go into the core but could be a very useful
plugin. It takes media files that are being imported and instead of
encoding them as base64 strings and putting that in a tiddler it saves the
image file to the server and creates a _canonical_uri tiddler. At the
moment this just works with Bob but I am looking at how to make it work
with the new listen command Jeremy is working on. I think that the issue
currently is I am not sure how best to tell the node server how to save the
file, it currently POSTs the image to /uploads, if adding that route to the
listen command works than this could work well. There is no demo for this
yet because there is not yet a way to restrict access to specific wikis or
authorisation levels.
Code: https://github.com/OokTech/TW5-ServerImages
Login is a simple login interface that takes a username and password and
POSTs them to a REST-type server and expects an access token in return. It
saves the access token in local storage and as a cookie. I don't know if
this is useful outside of the server I made for Bob but I made it so here
it is.
Code: https://github.com/OokTech/TW5-Login
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/34322a28-22fa-42ec-b4ab-fd2fe343ba54%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
David Gifford
2018-07-14 00:15:52 UTC
Permalink
In the Toolmap, I added the first two to images. I added the last one to
security and backup tools. Let me know if there are other categories for
the first two - would they also go in Importing and exporting between
TiddlyWiki files?

Blessings.
Post by Jed Carty
DownloadBinary adds an action widget that lets you download the binary
version of media stored in a tiddler as a base64 string. That means that if
you import a picture into a wiki than you can use this message to download
the original image file. If it works well I will make a pull request to
either get this in the core or move the plugin into the main plugin
library. If anyone has suggestions or thinks that there is a better way to
implement this than as an action widget let me know.
The code is here: https://github.com/OokTech/TW5-DownloadBinary
Demo: https://www.ooktech.xyz:8443/Public#Download%20Binary%20Demo
ServerImages should not go into the core but could be a very useful
plugin. It takes media files that are being imported and instead of
encoding them as base64 strings and putting that in a tiddler it saves the
image file to the server and creates a _canonical_uri tiddler. At the
moment this just works with Bob but I am looking at how to make it work
with the new listen command Jeremy is working on. I think that the issue
currently is I am not sure how best to tell the node server how to save the
file, it currently POSTs the image to /uploads, if adding that route to the
listen command works than this could work well. There is no demo for this
yet because there is not yet a way to restrict access to specific wikis or
authorisation levels.
Code: https://github.com/OokTech/TW5-ServerImages
Login is a simple login interface that takes a username and password and
POSTs them to a REST-type server and expects an access token in return. It
saves the access token in local storage and as a cookie. I don't know if
this is useful outside of the server I made for Bob but I made it so here
it is.
Code: https://github.com/OokTech/TW5-Login
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/441775df-da5d-4fd3-a212-78e13886bec8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Stobot
2018-07-18 19:23:05 UTC
Permalink
I feel like an idiot, but how can I install the TW5-ServerImages plugin for
BOB Executable? The link takes me to Github and I see lots of files, but no
amount of dragging/dropping is properly importing, it's just making new
tiddlers with URLs... There is a readme that shows what it is, but not how
to install.
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/adf9c6ac-b872-4f81-8fb8-bd54558f7aa2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jed Carty
2018-07-18 20:21:43 UTC
Permalink
If you want to drag and drop it into your wiki you can do it from
here: https://www.ooktech.xyz:8443/Public

I don't know if it will work with the single executable version yet. I
still haven't updated it to use the newest version of Bob. Also make sure
you set up the paths. I am not sure if I have the setup fully documented or
not, make sure you back up your wikis.
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/b34b8d1d-a080-4504-b59f-330580327af5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Stobot
2018-07-19 00:34:15 UTC
Permalink
Thanks Jed, I might be close, but it's not working yet. I'm on executable
latest released version.

1. I dragged in, saved, reloaded the plugin tiddler from
https://www.ooktech.xyz:8443/Public
2. I tried dragging and dropping a file "TestImage.png" from my desktop
into the wiki
1. This created a tiddler named TestImage.png with _canonical_uri of
"./Test/files/TestImage.png" (my wiki is named Test)
2. Because of the file path, I then move the image into my filepath
by creating a "files" folder under Test so that the image url above should
find the image.
3. You mention "set up the paths", so I research that for a bit, and
think what I have to do is edit the Test\settings\settings.json file and
add a string creating the below

{
"filePathRoot": "C:\Users\Stobot\Documents\TiddlyWiki\Wikis\Test\",
"wikis": {},
"ws-server": {
"host": "127.0.0.1"
},
"suppressBrowser": false
}

1. Then I save and reload, and it still doesn't work. It might be the
string I give as the filePathRoot as the example from
"https://github.com/OokTech/TW5-Bob/blob/master/Documentation/Serving%20Files.tid"
has forward slashes...

I'm probably missing something obvious...
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/651488c2-8748-41f5-abe7-c9ab1de00429%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
p***@gmail.com
2018-07-29 16:00:18 UTC
Permalink
Hi there, Jed.

Thanks for all your cool contributions to TW.

I was tinkering with your login widget and unable to get it to work beyond
displaying the login form. I am trying to pass a url into it like
<$login-widget url="my url that returns a token" /> ... Would you mind
giving a quick example of how to use the plugin properly?

Sincere thanks,

Phil
Post by Jed Carty
DownloadBinary adds an action widget that lets you download the binary
version of media stored in a tiddler as a base64 string. That means that if
you import a picture into a wiki than you can use this message to download
the original image file. If it works well I will make a pull request to
either get this in the core or move the plugin into the main plugin
library. If anyone has suggestions or thinks that there is a better way to
implement this than as an action widget let me know.
The code is here: https://github.com/OokTech/TW5-DownloadBinary
Demo: https://www.ooktech.xyz:8443/Public#Download%20Binary%20Demo
ServerImages should not go into the core but could be a very useful
plugin. It takes media files that are being imported and instead of
encoding them as base64 strings and putting that in a tiddler it saves the
image file to the server and creates a _canonical_uri tiddler. At the
moment this just works with Bob but I am looking at how to make it work
with the new listen command Jeremy is working on. I think that the issue
currently is I am not sure how best to tell the node server how to save the
file, it currently POSTs the image to /uploads, if adding that route to the
listen command works than this could work well. There is no demo for this
yet because there is not yet a way to restrict access to specific wikis or
authorisation levels.
Code: https://github.com/OokTech/TW5-ServerImages
Login is a simple login interface that takes a username and password and
POSTs them to a REST-type server and expects an access token in return. It
saves the access token in local storage and as a cookie. I don't know if
this is useful outside of the server I made for Bob but I made it so here
it is.
Code: https://github.com/OokTech/TW5-Login
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/d1771389-d472-4f71-9609-f2b0b30bd771%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jed Carty
2018-07-29 19:53:43 UTC
Permalink
Phil,

The login widget requires an external server. I will probably release the
one I am using for my online wikis when I can but it isn't something that I
am comfortable just giving a 10 line example for because of all of the
security problems that would come with that. Like I said, I don't think it
is useful outside what I made and haven't released yet.
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/bdd9ffef-33b7-4911-a916-3a79f37fd1ad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
p***@gmail.com
2018-08-28 23:46:27 UTC
Permalink
Hi Jed!

Just seeing this, thanks so much for the reply. I understand your concern and actually had a simple auth api set up to return a key... It appears you actually updated git with an example and that was helpful... Still tinkering though.

Appreciate you and your contributions, man!

Phil
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/007eda6b-4282-4a78-9553-14718083fe30%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jed Carty
2018-08-29 08:20:56 UTC
Permalink
Phil,

I updated the login plugin so that it can be used to log into a remote
server to let you use the twederbob plugin with a server that requires a
login. I could add some more configuration options that let you set the
names of the keys in the post body, right now the the keys are 'name' and
'pwd' which I think is the most likely place where a problem would come up
with login servers.

One other thing is that the login widget won't do anything if the login url
isn't on https. Either the page that the widget is on needs to be on https
and the url given is relative (like '/login') or the url the login info is
sent to have to start with https.
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/9e6feaae-badf-43b6-a7be-567ccc591d61%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...