Jump to content

Extension:BlueskyPost

From mediawiki.org
MediaWiki extensions manual
BlueskyPost
Release status: beta
Implementation Notify, Data extraction
Description Posts to Bluesky when a page is created or edited.
Author(s) @kimagurenote.net (Corytalk)
Latest version 0.2.0
MediaWiki 1.35+
PHP 7.2.0+
Database changes No
License BSD 3-clause "Modified" License
Download https://kimagurenote.net/kn/BlueskyPost#Download
https://kimagurenote.net/kn/BlueskyPost#History
Example #Usage

The BlueskyPost extension provides a way to post a summary to Bluesky via the AT Protocol API when a page is created or updated.

Installation

[edit]

At first, you will need a Bluesky account and make an app password.

  • Download zip file from author's website, unzip it and place the file(s) in a directory called BlueskyPost in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php file:
    /* Extension:BlueskyPost */
    wfLoadExtension( 'BlueskyPost' );
    $wgBlueskyPostIdentifier = "youraccount.bsky.social";
    $wgBlueskyPostPassword = "< set app password here >";
    
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

App password as NOT account password. You MUST create an app password for this extension.

Additional configuration

[edit]
[edit]

This extension has supported to embed website cards since v0.2.0.

If you want to embed cards with images, install Extension:PageImages also.

wfLoadExtension( 'PageImages' );

If Extension:PageImages not installed or the target page has no valid images, this extension embed link cards without images.

Checkbox default value

[edit]

If you want to set default checkbox value, set $wgBlueskyPostChecked true or false on LocalSettings.php as follows.

$wgBlueskyPostChecked = true;

Timeout

[edit]

This extension will timed out 10 seconds by default to call AT Protocol API.

If you want to set other times, you can set $wgBlueskyPostTimeout on LocalSettings.php as follows.

$wgBlueskyPostTimeout = 12.5;

Language

[edit]

If you want to set default languages of posts, set variables on LocalSettings.php as follows.

$wgBlueskyPostLangs = [ "en-GB", "en-US" ];

Suppress checkbox

[edit]

If you want to suppress to use this extension on create (new) or edit (exist) pages, set variables on LocalSettings.php as follows.

If you want to suppress this extension on new (create) pages, set below.

$wgBlueskyPostSuppressNew = true;

Or if you want to suppress this extension on edit (exist) pages, set below.

$wgBlueskyPostSuppressEdit = true;

Change text to post

[edit]

If you want to change post messages, edit following pages on your site.

  • MediaWiki:blueskypost-post-edit - to edit exist articles
  • MediaWiki:blueskypost-post-new - to create new articles
  • $1 - page title
  • $2 - URL
  • $3 - summary

Usage

[edit]

Edit a page as usual with summary and submit with check "Post to Bluesky".

Then make a post of summary, title and URL to Bluesky automatically by this extension.

Note: This extension is not work on minor edit.

Summary (?):

Write a summary here to post Bluesky (page title and URL added automatically)

This is a minor edit   Watch this page   Post to Bluesky  ← check it

By saving changes, you agree to the Terms of Use, and you irrevocably agree to release your contribution under the CC BY-SA 4.0 License and the GFDL. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Publish changes  Show preview  Show changes   Cancel

Notes

[edit]

This extension works in NS_MAIN or $wgContentNamespaces only.

This extension show no errors. It terminate quietly if meet some error.

Bluesky abolished invite code at Feb 6, 2024. Now you will not need an invite code for anyone to create new account.

Dependency

[edit]

Beta status

[edit]

This extension support only text. Not support to attach images yet. support to embed a link card with an image since v0.2.0.

This extension work fine so far but the AT Protocol has been developing now. It may become outdated if new features are added to atproto and the Bluesky application schemas.

See also

[edit]

AT Protocol API

[edit]