[tw] Re: [TW5] Is it possible to write a plugin that integrates with Pinboard's API?

2016-08-19 Thread PMario
On Thursday, August 18, 2016 at 7:47:10 PM UTC+2, Danielo Rodríguez wrote:
>
>
> El jueves, 18 de agosto de 2016, 11:07:40 (UTC+2), PMario escribió:
>>
>>
>> So if you use ifttt you notify everyone, what you do. 
>>
>
> Exactly why? Can't you just do it in a private-way?
>

As soon, as you use a 3rd party service that is server based, you notify 
them, by accessing their service. ... That's the same reason, why all the 
"social buttons eg: twitter, google, facebook, ..." are a privacy problem 
and add blockers block them. As soon as you load the page, and the button 
is shown, it's code sends a message to their owners, that you visited the 
site, where the button is included. 

-m

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/3b43e6cd-efd6-4fd1-9a0e-a81c9923db26%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [TW5] Is it possible to write a plugin that integrates with Pinboard's API?

2016-08-18 Thread Daniel Metcalfe
Thank you for pointing out the filesystem adaptor Danielo, I've had a look 
at it and can see that in the TiddlyWiki core code it checks for modules of 
type 'syncadaptor' and uses the exported methods there, so the JS in 
filesystem is executed server side from within the core.

I can see also that code in my JS macro is executed once at startup in a 
node context without failures, but then when calling the as a macro from 
the browser the same JS code fails due to node-specific things like 
'require' (as well as CORS restrictions on the request to Pinboard).

I'm unsure as to how I should write my plugin so that my JS code can be 
executed in a node context rather than a browser context. I'm looking at 
the other module types  
wondering if perhaps one of those will allow my plugin modules to be 
triggered from the open TiddlyWiki in the browser but still executed server 
side where they are not subject to CORS.

Thank you for your help so far,
Dan


On Thursday, 18 August 2016 18:49:25 UTC+1, Danielo Rodríguez wrote:
>
>
>
> El jueves, 18 de agosto de 2016, 19:40:54 (UTC+2), Daniel Metcalfe 
> escribió:
>>
>> Thanks Danielo, 
>>
> You're welcome
>  
>
>>
>> My main concern is if there is a way to do it using TiddlyWiki plugin 
>> mechanism though? From the examples I've seen things you can add via 
>> plugins just run within the browser once you've loaded a TiddlyWiki.
>>
>
> That is not exactly true. If you plan to run your TW in node, part of your 
> plugin can run just on the browser and part of your plugin can run just on 
> node. That way you can create some client-server architecture within your 
> plugin. The only restriction for the people wanting to use it is that they 
> would have to run your plugin in a node TW.
>  
>
>>
>> I'd like it to be easily shareable like you suggested, if I have to 
>> modify TiddlyWiki core code then it is not very shareable, people will have 
>> to deploy my fork of the repo.
>>
>
> As I said, TW has the ability to run code on the browser, the server or 
> both. The filesystem adaptor is an example of it. 
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/1db4abcf-9764-4d79-9db8-b1c1c90c8470%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [TW5] Is it possible to write a plugin that integrates with Pinboard's API?

2016-08-18 Thread Danielo Rodríguez


El jueves, 18 de agosto de 2016, 19:40:54 (UTC+2), Daniel Metcalfe escribió:
>
> Thanks Danielo, 
>
You're welcome
 

>
> My main concern is if there is a way to do it using TiddlyWiki plugin 
> mechanism though? From the examples I've seen things you can add via 
> plugins just run within the browser once you've loaded a TiddlyWiki.
>

That is not exactly true. If you plan to run your TW in node, part of your 
plugin can run just on the browser and part of your plugin can run just on 
node. That way you can create some client-server architecture within your 
plugin. The only restriction for the people wanting to use it is that they 
would have to run your plugin in a node TW.
 

>
> I'd like it to be easily shareable like you suggested, if I have to modify 
> TiddlyWiki core code then it is not very shareable, people will have to 
> deploy my fork of the repo.
>

As I said, TW has the ability to run code on the browser, the server or 
both. The filesystem adaptor is an example of it. 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/c218b73f-5727-448d-8a44-a886015cee81%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [TW5] Is it possible to write a plugin that integrates with Pinboard's API?

2016-08-18 Thread Danielo Rodríguez


El jueves, 18 de agosto de 2016, 11:07:40 (UTC+2), PMario escribió:
>
>
>>
> So if you use ifttt you notify everyone, what you do. 
>

Exactly why? Can't you just do it in a private-way?

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/600ef832-6350-41d2-af53-e6b70ce4caa7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [TW5] Is it possible to write a plugin that integrates with Pinboard's API?

2016-08-18 Thread Daniel Metcalfe
Thanks Danielo, that's provided me some extra clarity on what I thought I 
might have to do. I could run TiddlyWiki as a node server and change some 
of the core code.

My main concern is if there is a way to do it using TiddlyWiki plugin 
mechanism though? If I can then it is easily shareable, if I have to modify 
TiddlyWiki core code then it is not very shareable, people will have to 
deploy my fork of the repo.

On Thursday, 18 August 2016 09:39:00 UTC+1, Danielo Rodríguez wrote:
>
> All you need is a backend that is not restricted to CORS (any server code 
> should work) and an endpoint that allows your wikis to fetch data allowing 
> CORS to your domains.
>
> So, in summary (and as example) you could need
>
>
>1. Node.js app that gets the information you need and saves it into a 
>database.
>2. The same node.js app can expose an endpoint with CORS enabled
>
>
> If that is a problem to you (don't want or can't get a node app running) 
> you can try with IFTT maker channel:
> https://ifttt.com/maker
>
> In fact, this may be the preferred options because IFTT also has a 
> pinboard channel:
>
> https://ifttt.com/pinboard
>
> If you get something cool and working, don't hesitate to share it!
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/d9b91d46-badf-4316-971a-233fd403b868%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [TW5] Is it possible to write a plugin that integrates with Pinboard's API?

2016-08-18 Thread PMario
In its first sentence at pinnboard.in the site states: 

quote 

> Pinboard is a fast, no-nonsense bookmarking site for people who value 
> privacy and speed.
>

So if you use ifttt you notify everyone, what you do. So for me that's not 
really the preferred option, if I care about privacy. ... There is a second 
problem with the https settings for the site. I did notify their support. 

have fun!
mario

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/88917e72-504f-428f-b37c-3983ceefbf0e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [TW5] Is it possible to write a plugin that integrates with Pinboard's API?

2016-08-18 Thread Danielo Rodríguez
All you need is a backend that is not restricted to CORS (any server code 
should work) and an endpoint that allows your wikis to fetch data allowing 
CORS to your domains.

So, in summary (and as example) you could need


   1. Node.js app that gets the information you need and saves it into a 
   database.
   2. The same node.js app can expose an endpoint with CORS enabled
   

If that is a problem to you (don't want or can't get a node app running) 
you can try with IFTT maker channel:
https://ifttt.com/maker

In fact, this may be the preferred options because IFTT also has a pinboard 
channel:

https://ifttt.com/pinboard

If you get something cool and working, don't hesitate to share it!

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/a825bada-2c61-4bb2-80bf-380d8deda565%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [TW5] Is it possible to write a plugin that integrates with Pinboard's API?

2016-08-18 Thread Daniel Metcalfe
If I remember correctly I tried it using both a local file and the same 
wiki hosted on TiddlySpot. I believe the CORS restrictions apply equally to 
both local files and hosted files, because either way the domain is 
different to pinboard.in.

I understand that what I've tried doesn't work for good reasons so I'm just 
wondering if there are any workaround or alternative approaches I might 
try. Basically I just like to know if it's even possible!

Cheers,
Dan

On Wednesday, 17 August 2016 20:27:39 UTC+1, PMario wrote:
>
> Hi Daniel,
>
> If you try to write from a local file based Tiddlywiki to an online API 
> you'll have no luck. Browser vendors consider this behaviour insecure and 
> block it. 
>
> JSONP .. search for "jsonp security 
> "
>  
> and you probably don't want to use it. 
>
> If you did access the piboard api from a local file it may explain the  
> CORS , 
> errors too. 
>
> Can you describe your setup a bit closer?
>
> -mario
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/49794c02-0198-4b4e-a7c0-39767fa59d41%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [TW5] Is it possible to write a plugin that integrates with Pinboard's API?

2016-08-17 Thread PMario
Hi Daniel,

If you try to write from a local file based Tiddlywiki to an online API 
you'll have no luck. Browser vendors consider this behaviour insecure and 
block it. 

JSONP .. search for "jsonp security 
"
 
and you probably don't want to use it. 

If you did access the piboard api from a local file it may explain the  CORS 
, errors too. 

Can you describe your setup a bit closer?

-mario

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/8b18a02a-a37d-45ef-90a3-235ff02df28e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.