Extension:BlueskyPost
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 yourextensions/
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 >";
- 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]Embed link card with image
[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 (?):
☐ This is a minor edit ☑ Watch this page ☑ Post to Bluesky ← check it
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]- MediaWiki 1.35+ - using PageSaveComplete hook
- PHP 7.2.0+ - call json_encode() with JSON_INVALID_UTF8_IGNORE
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]- BlueskyPost (author site, written in Japanese)
- Extension:PageImages - Need this extension if you want to embed a link card with an image.
- Extension:TweetANew - for Twitter (X)