. Skip to main content

Daniel Nix

can now post photos from your Known. Git pull now.

Daniel Nix

@skddc Sch...ade... mastodon plugin should put ... + a link to your post at the end if you pass the 497(link) characters.

Daniel Nix

Good news: my KnownMastodon plugin works. Right now only for Status. Let me tidy it up and I'll push it to https://github.com/danito/KnownMastodon

Daniel Nix

I hope we will have a KnownMastodon plugin this night...

Daniel Nix

do we have a working syndication plugin?

Daniel Nix

Seems you fixed the like plugin in a way (likeception). Let us know how.

Daniel Nix

Seems you fixed the like plugin in a way (likeception). Let s know how.

Daniel Nix

Daniel Nix

Using the Known API

2 min read

I was looking for a way to import my twitter favourites. First I was thinking about writing a plugin that checks the twitter api for new likes, but no one ain't no time for that.

So reading about IFTTT again, I wanted to give a try as the maker channel seems to fit as it let's you make web request to a publicly accessible URL. No luck with the Known API, it needs some custom http headers.

So I wrote a quick and dirty request forwarder : KnownApiForward. It takes the request from ifttt and passes it to the known api.

Thanks to Marcus Povey who gave me some good tips on how to start with writing an api for Known, could quickly put some code together.

The Known documentation is still a bit poor and one has to get the pieces together if you're not familiar with it.

What you need is :

your endpoint (your_known/action/edit in my case for a status https://nxd4n.nixekinder.be/status/edit)

your api key (account settings -> tools).

Calculate the token :

$token = base64_encode(hash_hmac('sha256',$known['action'] ,$known['known_api_key'] , true));


 Headers for the curl call :

$known['headers'] =   array('Accept: application/json',
                                     'X-KNOWN-USERNAME: ' . $known['username'],
                                     'X-KNOWN-SIGNATURE: ' .$known['token'],
                                     'Content-Type: application/json', 
                                     'Content-Length: ' . strlen($known['status']));

 And the curl options :


curl_setopt($ch, CURLOPT_COOKIEJAR, "/tmp/cookiefile");
curl_setopt($ch, CURLOPT_URL,"YOUR_KNOWN_SITE_URL".$known['action']);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $known['status']);
curl_setopt($ch, CURLOPT_HTTPHEADER, $known['headers']); 

In IFTT, create a recipe with the Maker Channel. Provide the script's url and put a json formatted text in the body field :

iftt maker settings

Daniel Nix

My New @withKnown Plugin : Ratings http://nixis.me/7k (based on an idea from @diplix)

Daniel Nix

New Known Plugin : Ratings

1 min read

I just have uploaded my new plugin for my Known site : https://github.com/danito/idnoRating/.

It adds up to 5 stars to any article by simply adding a hashtag ratingstarsX where X is a number from 0 to 5.

It's based (and the code is mostly copied) on the work of Felix Schwenzel (@diplix) who recently has added this to his posts.

There's another plugin which adds reviews and ratings to Known, but this plugin creates an entity for its own, and is more designed for product reviews.

The hashtag ratingstars will be hidden so you wont see it on any post.

Daniel Nix

.@withknown new plugin : Import Your http://moves-app.com summary http://nixis.me/2d (Thanks to @diplix). See: http://nixis.me/2e

Daniel Nix

just testing

1 min read

testing if my plugin works