All Projects → rzr → mastodon-lite

rzr / mastodon-lite

Licence: Apache-2.0 License
Lightweight client for mastodon micro blogging service.

Programming Languages

javascript
184084 projects - #8 most used programming language
Makefile
30231 projects
Dockerfile
14818 projects
shell
77523 projects

Projects that are alternatives of or similar to mastodon-lite

Nautilus
Turn your website into an ActivityPub profile
Stars: ✭ 55 (+358.33%)
Mutual labels:  mastodon, activitypub
The Federation.info
Statistics hub for the Fediverse
Stars: ✭ 101 (+741.67%)
Mutual labels:  mastodon, activitypub
Rustodon
A Mastodon-compatible, ActivityPub-speaking server in Rust
Stars: ✭ 434 (+3516.67%)
Mutual labels:  mastodon, activitypub
gomphotherium
Gomphotherium (/ˌɡɒmfəˈθɪəriəm/; "welded beast"), a command line Mastodon client.
Stars: ✭ 22 (+83.33%)
Mutual labels:  mastodon, activitypub
soundstorm
The Federated Social Audio Platform
Stars: ✭ 26 (+116.67%)
Mutual labels:  mastodon, activitypub
Social
🎉 Social can be used for work, or to connect to the fediverse!
Stars: ✭ 302 (+2416.67%)
Mutual labels:  mastodon, activitypub
Microstatus
Lightweight Mastodon- and GNU social-compatible ActivityPub and OStatus server implementation
Stars: ✭ 96 (+700%)
Mutual labels:  mastodon, activitypub
Mastodon
Your self-hosted, globally interconnected microblogging community
Stars: ✭ 26,120 (+217566.67%)
Mutual labels:  mastodon, activitypub
activity-pub
API Platform ActivityPub Support
Stars: ✭ 63 (+425%)
Mutual labels:  mastodon, activitypub
Guidetomastodon
An increasingly less-brief guide to Mastodon
Stars: ✭ 129 (+975%)
Mutual labels:  mastodon, activitypub
gotosocial
Golang fediverse server.
Stars: ✭ 400 (+3233.33%)
Mutual labels:  mastodon, activitypub
mastodo
A fork of the GNU Social/AP-compatible microblogging server
Stars: ✭ 29 (+141.67%)
Mutual labels:  mastodon, activitypub
merveilles-town
Fork of Mastodon repository with modifications to make Merveilles a town of our own.
Stars: ✭ 23 (+91.67%)
Mutual labels:  mastodon, activitypub
Aardwolf
Powering connected social communities with open software.
Stars: ✭ 379 (+3058.33%)
Mutual labels:  mastodon, activitypub
Wordpress Activitypub
ActivityPub for WordPress
Stars: ✭ 118 (+883.33%)
Mutual labels:  mastodon, activitypub
ligh7hau5
A Matrix (https://matrix.org/docs/spec/) to Fediverse / ActivityPub client / bridge. Also, some media proxying.
Stars: ✭ 26 (+116.67%)
Mutual labels:  mastodon, activitypub
mastodon
Your self-hosted, globally interconnected microblogging community
Stars: ✭ 29,949 (+249475%)
Mutual labels:  mastodon, activitypub
Instagram2Fedi
Python script for crossposting from Instagram to Mastodon or Pixelfed
Stars: ✭ 45 (+275%)
Mutual labels:  mastodon
humhub-oauth
Social OAuths built for the Social Platform HumHub
Stars: ✭ 16 (+33.33%)
Mutual labels:  mastodon
DroiDon
UNDER DEVELOPMENT: DroiDon is android app for Mastodon https://github.com/tootsuite/mastodon
Stars: ✭ 30 (+150%)
Mutual labels:  mastodon

MASTODON-LITE

GitHub forks License NPM FOSSA Status dependencies Status Build Status

NPM

INTRODUCTION

Lightweight client for mastodon micro blogging service.

This implementation is focusing on reducing dependencies, for supporting IoT.js runtime, (as well as node).

So far only 'https' module is used (and 'fs' for the example app)

DEMO

An Integration example is the ActivityPub adapter for WebThings's Gateway

mozilla-iot-activitypub-adapter-apconf2020-rzr

More details are explained in addon directory:

Feedback also welcome on this Wiki page:

USAGE

USING NODEJS

Running from sources tree is straightforward, but each step will be detailed.

PREREQUISITE

Then user need to create an account on decentralized, Mastodon social network (or setup your own instance)

While we're here, l et's go to settings to create an application and generate it's secret token, that will be used later:

Once logged go to "Settings" / "Development" / "New Application" ie:

Then just set application name to "mastodon-lite" or any name of your choice, other fields can be skipped.

Then your "mastodon-lite" application should appear on:

Click on it and note down the "access token" (64char hexa string or base64 string)

CONFIGURE

On first run, if not already present, configuration file will generated in ~/.mastodon-lite.js.

git clone https://github.com/rzr/mastodon-lite ; cd mastodon-lite
npm start
# error: TODO: edit configuration file ~/.mastodon-lite.json
cat ~/.mastodon-lite.json

Then update credentials in generated config file with "Your access token" in earlier step, if running on different instance, host and port should be changed accordingly,

FETCH CONTENTS

By default timeline will be displayed:

npm start

Response is a JSON stream of all posts:

[
{
  "id": "99568354696365896",
  "created_at": "2018-02-22T09:42:01.636Z",
   (...)
  "uri": "https://mastodon.social/users/rzr/statuses/99568354696365896",
  "content": "<p><a href=\"https://www.npmjs.com/package/mastodon-lite#\" rel=\"nofollow noopener\" target=\"_blank\"><span class=\"invisible\">https://www.</span><span class=\"ellipsis\">npmjs.com/package/mastodon-lit</span><span class=\"invisible\">e#</span></a> <a href=\"https://mastodon.social/tags/mastodonlite\" class=\"mention hashtag\" rel=\"tag\">#<span>MastodonLite</span></a> : A lightweight <a href=\"https://mastodon.social/tags/mastodon\" class=\"mention hashtag\" rel=\"tag\">#<span>Mastodon</span></a> client to support <a href=\"https://mastodon.social/tags/constrainteddevices\" class=\"mention hashtag\" rel=\"tag\">#<span>ConstraintedDevices</span></a> using <a href=\"https://mastodon.social/tags/iotjs\" class=\"mention hashtag\" rel=\"tag\">#<span>IotJs</span></a></p>",
  "url": "https://mastodon.social/@rzr/99568354696365896",
   (...)
(...)
]

Different enpoints can be used, for instance to retrieve private messages:

npm run start get 'timelines/direct'

POSTING

To post a message, just add a quoted message as parameter:

npm start 'https://www.npmjs.com/package/mastodon-lite# #MastodonLite : A lightweight #Mastodon client to support #ConstraintedDevices using #IotJs cc: @[email protected] '

Message (toot) should be displayed on your profile's page (eg: https://mastodon.social/@tizenhelper/99568473401250711 ) and client will get server's answer in this form:

{
  "id": "99568473401250711",
  "created_at": "2018-02-22T10:12:12.931Z",
  "in_reply_to_id": null,
  "in_reply_to_account_id": null,
  "sensitive": false,
  "spoiler_text": "",
  "visibility": "public",
  "language": "en",
  "uri": "https://mastodon.social/users/tizenhelper/statuses/99568473401250711",
  "content": "<p><a href=\"https://www.npmjs.com/package/mastodon-lite#\" rel=\"nofollow noopener\" target=\"_blank\"><span class=\"invisible\">https://www.</span><span class=\"ellipsis\">npmjs.com/package/mastodon-lit</span><span class=\"invisible\">e#</span></a> <a href=\"https://mastodon.social/tags/mastodonlite\" class=\"mention hashtag\" rel=\"tag\">#<span>MastodonLite</span></a> : A lightweight <a href=\"https://mastodon.social/tags/mastodon\" class=\"mention hashtag\" rel=\"tag\">#<span>Mastodon</span></a> client to support <a href=\"https://mastodon.social/tags/constrainteddevices\" class=\"mention hashtag\" rel=\"tag\">#<span>ConstraintedDevices</span></a> using <a href=\"https://mastodon.social/tags/iotjs\" class=\"mention hashtag\" rel=\"tag\">#<span>IotJs</span></a> cc: <span class=\"h-card\"><a href=\"https://quitter.is/tizenhelper\" class=\"u-url mention\">@<span>tizenhelper</span></a></span></p>",
  "url": "https://mastodon.social/@tizenhelper/99568473401250711",
  "reblogs_count": 0,
  "favourites_count": 0,
  "favourited": false,
  "reblogged": false,
  "muted": false,
  "pinned": false,
  "reblog": null,
  "application": {
    "name": "mastodon-lite",
    "website": "https://www.npmjs.com/package/mastodon-lite"
  },
  "account": {
    "id": "287178",
    "username": "tizenhelper",
    "acct": "tizenhelper",
    "display_name": "",
    "locked": false,
    "created_at": "2018-02-22T09:55:04.226Z",
    "note": "<p></p>",
    "url": "https://mastodon.social/@tizenhelper",
    "avatar": "https://mastodon.social/avatars/original/missing.png",
    "avatar_static": "https://mastodon.social/avatars/original/missing.png",
    "header": "https://mastodon.social/headers/original/missing.png",
    "header_static": "https://mastodon.social/headers/original/missing.png",
    "followers_count": 0,
    "following_count": 2,
    "statuses_count": 1
  },
  "media_attachments": [],
  "mentions": [
    {
      "id": "287020",
      "username": "tizenhelper",
      "url": "https://quitter.is/tizenhelper",
      "acct": "[email protected]"
    }
  ],
  "tags": [
    {
      "name": "mastodonlite",
      "url": "https://mastodon.social/tags/mastodonlite"
    },
    {
      "name": "mastodon",
      "url": "https://mastodon.social/tags/mastodon"
    },
    {
      "name": "constrainteddevices",
      "url": "https://mastodon.social/tags/constrainteddevices"
    },
    {
      "name": "iotjs",
      "url": "https://mastodon.social/tags/iotjs"
    }
  ],
  "emojis": []
}

INTEGRATE

Module is in NPM repo, so it can be added using npm tool:

ls package.json || npm init
npm install mastodon-lite
NODE_PATH=node_modules node node_modules/mastodon-lite/example

USING IOTJS

It's very similar to nodejs,

git clone https://github.com/rzr/mastodon-lite ; cd mastodon-lite
make start
iotjs example

Note, if you don't want to use git, code can be imported using node's npm package manager tool. just update PATH variable.

ls package.json || npm init
npm install mastodon-lite
IOTJS_EXTRA_MODULE_PATH=./node_modules/ iotjs node_modules/mastodon-lite/example

Alternatively gitmodule can be used to track master branch.

USING TIZENRT ON ARTIK05X

Rebuild demo from this makefile:

USING WEBTHINGS GATEWAY

DEMO

web-of-things-agriculture-20180712rzr.webm

This "Smart Orchid" demonstrate how to link IoT to social web, using WebOfThings and ActivityPub, with WebThings project, check this wiki page from webthing-iotjs project:

For code check example/webthing in this mastodon-lite project.

RESOURCES

LICENSE

FOSSA Status

Presentation

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].