madonctl

CLI client for the Mastodon social network API

MIT License

Stars
191
Committers
6

Bot releases are hidden (Show)

madonctl - madonctl 2.3.1 Latest Release

Published by McKael over 6 years ago

This release is based on Madon v2.3.0 and should support the complete Mastodon 2.3.x API.

This is a quick list of the main changes:

  • Updates and fixes to sync with Mastodon API changes
    In particular, add Mastodon lists support
  • New commands:
    • lists
    • emojis
  • Misc. updates to templates/themes
  • Add support for list-based streams & timelines
  • Add --notification-types flag to filter streams & notifications
  • Add --exclude-types to accounts notifications --list
  • Add option --keep N to keep the N last items
  • Add flag to reply with same visibility as original message
  • Add --locked flag to account update subcommand
  • Ability to Pin/Unpin a post
  • madonctl accounts mute: Add '--notifications' flag
  • Add flag --following to restrict account search
  • Remove extended statistics using the instances.mastodon.xyz API
  • Add instance peers and instance activity
  • Add option --only-media to madonctl timelines (Mastodon 2.3.0+)
  • Add --description and --focus flags for media attachments
  • Add madonctl media --update option
  • account follow: Add --show-reblogs flag
  • A few misc. fixes
  • The account command behaviour has been simplified:
    there's no need to explicitly specify --account-id, --acount-uid or
    --remote (for account follow).

Here are a few command line examples:

% madonctl account follow [email protected]
% madonctl account follow https://mastodon.social/@Gargron

% madonctl account follow 666
% madonctl account statuses 399

% madonctl lists create --title Friends
% madonctl lists show
% madonctl lists show --list-id 23

Please use the online help or check the manpages for more details.

madonctl - madonctl 2.0.0-dev1

Published by McKael over 6 years ago

This is a snapshot of madonctl 2.0.0 development version.

This version is compatible with Mastodon 2.0.0 API but NOT with Mastodon < 2.

madonctl - madonctl 1.2.0

Published by McKael over 7 years ago

Changes included in this release:

  • Improve HTML to text conversion
  • New stream user flag --notifications-only
  • New domain-blocks command to list and update blocked domains (Mastodon 1.4)
  • Add status subcommands mute-conversation, unmute-conversation (Mastodon 1.4)
  • New theme ansi-dark
  • New settings: default_output, default_theme
  • Small templates update
  • Documentation updates (especially regarding the configuration)
  • Use Madon library 1.6.0

Examples with the new commands:

% madonctl domain-blocks --block example.com
% madonctl domain-blocks --show
- Domain Name: example.com
% madonctl domain-blocks --unblock example.com

% madonctl status -s 7123456 mute-conversation
% madonctl status -s 7123456 show --template '{{ .muted }}'    # (should display "true")
% madonctl status -s 7123456 unmute-conversation
madonctl - madonctl 1.1.0

Published by McKael over 7 years ago

Changes in madonctl 1.1.0:

  • New flag --add-mentions to automatically add mentions when replying to a toot
  • Major improvements on templates:
    • Much better text wrapping (line-based)
    • Improved HTML conversion
    • New template function: tolocal (converts dates to local timezone)
    • Improved ansi theme / sample templates
  • Display username of a toot author in "plain" (default) output
  • Add/update statistics example scripts
  • Documentation updates

Thanks for the feedback and suggestions on previous releases.

madonctl - madonctl 1.0.0

Published by McKael over 7 years ago

Note: The version bump simply means that most of the features I wanted are in...

This release adds support for OAuth2 (and 2-factor authentication) with a new oauth2 command.
This command can be used interactively or non-interactively (if you want to use it from a wrapper), and its output can be customized with the usual options.

Examples:

% madonctl oauth2                   # Interactive OAuth2 login
% madonctl oauth2 > config.yaml     # Same, creating config file

% madonctl oauth2 get-url           # Only get link to auth server
% madonctl oauth2 code OAUTH2_CODE  # Login with server OAuth2 code
% madonctl oauth2 code OAUTH2_CODE > config.yaml   # Same, creating config file

This version also adds a --command flag to the stream command. You can specify an external command that will be run for each event received on a stream.
The event will be sent to the standard input of the command; the output modifiers (json/yaml/template/theme) will be applied.

Examples:

% madonctl stream --command radio.sh :pouetradio,tootradio # Listen to hashtags
% madonctl stream --theme=gateway --command gateway.zsh    # User timeline and notifications
% madonctl stream -o json --command json.zsh local         # Local timeline
% madonctl stream --command cmd --theme=ansi --color=off   # Using ansi theme w/o colors

Please note that currently madonctl will wait synchronously for the external command to complete (this behaviour might be changed in the future).

This version uses the madon library, version 1.5.0. Don't forget to upgrade it if you build madonctl from source.

madonctl - madonctl 0.6.1

Published by McKael over 7 years ago

  • Fix panic when a connection is closed in multi-tag streaming
  • Allow HTTP URLs in --user-id

Example:

% madonctl accounts --user-id https://mastodon.social/@Gargron show
madonctl - madonctl 0.6.0

Published by McKael over 7 years ago

  • New flag --stdin to send a message from standard input
  • Support for several simultaneous hashtag streams
  • Default toot visibility setting
  • New template_directory setting
  • Theme support (a "theme" is a collection of templates)
    Sample "ansi" color theme for Linux/BSD terms (with ANSI escape codes)
  • New template functions
  • Bugfixes
  • Documentation updates

Note: Using themes requires the 'template_directory' setting to be set.

Examples:

 % madonctl --theme=ansi timeline          # Display timeline with ansi theme
 % madonctl search gargron --theme=ansi    # Use ansi theme to display search results

 % echo "Hello from #madonctl" | madonctl toot --stdin  # Read toot content from stdin

 % madonctl stream ":mastodon,golang" --theme ansi  # Listen to multiple hashtag streams
madonctl - madonctl 0.5.2

Published by McKael over 7 years ago

  • Fix status context (#4, thanks to Daniel Sandman)
  • Display an error and quit if the specified configuration file does not exist (thanks to Alexis Vachette)
madonctl - madonctl 0.5.1

Published by McKael over 7 years ago

  • Rebuild with Madon v1.4.2 (fixes some tag attributes and improves error messages)
  • Display URLs of status media attachments
  • Add/update template examples
madonctl - madonctl 0.5.0

Published by McKael over 7 years ago

  • Add server statistics (using gomif to query the instances.mastodon.xyz API)
  • Add color command for templates (ANSI escape codes) and --color command line flag
    Use color function in template examples
  • Add shell completion for --output, --visibility and --color
  • Add a function "fromunix" to the templates to convert UNIX time stamps to dates
  • Set non-zero exit code when the API call fails
  • Update to Madon library 1.4.0
  • Update documentation and add sample scripts to the repository (examples directory)

Examples of instance statistics:

% madonctl instance --stats
- Instance: mamot.fr
  Users: 5889
  Statuses: 129630
  Open Registrations: true
  Up: true
  Date: 2017-04-30 23:57:45 +0200 CEST
% madonctl instance --stats --server mastodon.social \
     --template '{{printf "%v users\n" .users}}'
51547 users

You can check the examples/instance_statistics.sh script for a usage with a time range.

madonctl - madonctl 0.4.0

Published by McKael over 7 years ago

Changes in madonctl 0.4.0:

  • Update madon library to version 1.2.0 (support for multiple queries with headers Link attribute)
  • When limit is used, madonctl will display as many results until the limit value is reached (so it might send several requests to the server if the limit is high)
  • A new flag --all can be used to fetch all items from the server (for statuses, followers, favorites, etc.)
  • accounts followers|following|statuses doesn't require an account ID anymore; if it is missing the ID of the connected user is used
  • madonctl version has customizable output format (json/yaml/template) so version can be easily checked in a script

As an example, it is now possible to list all followers with

% madonctl accounts followers --all

and with a color template:

% madonctl accounts followers --all --template-file templates/ansi-account.tmpl

Example of version output in YAML:

% madonctl version -o yaml
application_name: madonctl
madon_version: 1.2.0
version: 0.4.0
madonctl - madonctl 0.3.1 - minor bugfix release

Published by McKael over 7 years ago

Rebuild with Madon v1.1.1 (fixes a few cases with the --limit, --since-id, --max-id arguments not being used with some API calls).

The library version is now displayed with madonctl version.

If you build from source, make sure you update the library as well (you wan use go get -u https://github.com/McKael/madonctl to update the dependencies).

madonctl - madonctl 0.3.0

Published by McKael over 7 years ago

  • Add option --text-file to the toot command to send messages from text files
  • Add options --limit (-l), --since-id and --max-id
  • For accounts, add option --user-id to look up a user ID instead of using the account ID number
  • Add accounts notifications --dismiss option to remove a single notification (Mastodon 1.3+)
  • Add function fromhtml for Golang templates to convert fields from HTML to plain text
  • A few small bugs have been fixed
  • A couple Golang template examples have been added to the repository
madonctl - madonctl 0.2.0 released

Published by McKael over 7 years ago

This new release adds support for account updates.

The current Mastodon API (1.2.2) is now fully implemented.

madonctl - madonctl 0.1.0 -- initial public release

Published by McKael over 7 years ago

First release of madonctl, a Mastodon command-line interface.

All of Mastodon API is supported except updating the current user account information.

Package Rankings
Top 7.99% on Alpine-edge
Top 4.63% on Proxy.golang.org
Badges
Extracted from project README
license