README.md
author rjp <zimpenfish@gmail.com>
Mon, 23 Jan 2023 16:39:02 +0000
changeset 267 5b91a65ba95a
parent 264 8f478162d991
child 271 c8b8b7cc8896
permissions -rw-r--r--
Update to handle non-int64 IDs Pleroma/Akkoma and GotoSocial use opaque IDs rather than `int64`s like Mastodon which means that `madon` can't talk to either of those. This commit updates everything that can be an ID to `madon.ActivityID` which is an alias for `string` - can't create a specific type for it since there's more than a few places where they're concatenated directly to strings for URLs, etc. Which means it could just as easily be a direct `string` type itself but I find that having distinct types can often make the code more readable and understandable. One extra bit is that `statusOpts` has grown a `_hasReplyTo` boolean to indicate whether the `--in-reply-to` flag was given or not because we can't distinguish because "empty because default" or "empty because given and empty". Another way around this would be to set the default to some theoretically impossible or unlikely string but you never know when someone might spin up an instance where, e.g., admin posts have negative integer IDs.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
5abace724584 Initial public release
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
     1
# madonctl
5abace724584 Initial public release
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
     2
5abace724584 Initial public release
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
     3
Golang command line interface for the Mastodon API
5abace724584 Initial public release
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
     4
5abace724584 Initial public release
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
     5
[![license](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](https://raw.githubusercontent.com/McKael/madonctl/master/LICENSE)
5abace724584 Initial public release
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
     6
249
772a4d34c74d Fix typo
ButterflyOfFire <42316180+BoFFire@users.noreply.github.com>
parents: 242
diff changeset
     7
`madonctl` is a [Go](https://golang.org/) CLI tool to use the Mastodon REST API.
0
5abace724584 Initial public release
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
     8
199
2818e6882c1b Small README update
Mikael Berthe <mikael@lilotux.net>
parents: 186
diff changeset
     9
It is built on top of [madon](https://github.com/McKael/madon), my Golang
2818e6882c1b Small README update
Mikael Berthe <mikael@lilotux.net>
parents: 186
diff changeset
    10
implementation of the API.
4
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
    11
0
5abace724584 Initial public release
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    12
## Installation
5abace724584 Initial public release
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    13
199
2818e6882c1b Small README update
Mikael Berthe <mikael@lilotux.net>
parents: 186
diff changeset
    14
### Download
173
1812a794b759 Add a note about the API change to the README file
Mikael Berthe <mikael@lilotux.net>
parents: 156
diff changeset
    15
199
2818e6882c1b Small README update
Mikael Berthe <mikael@lilotux.net>
parents: 186
diff changeset
    16
Check the [Release page](https://github.com/McKael/madonctl/releases) for some
2818e6882c1b Small README update
Mikael Berthe <mikael@lilotux.net>
parents: 186
diff changeset
    17
pre-built binaries.
2818e6882c1b Small README update
Mikael Berthe <mikael@lilotux.net>
parents: 186
diff changeset
    18
2818e6882c1b Small README update
Mikael Berthe <mikael@lilotux.net>
parents: 186
diff changeset
    19
More pre-built binaries might be available from the [Homepage](https://lilotux.net/~mikael/pub/madonctl/)
2818e6882c1b Small README update
Mikael Berthe <mikael@lilotux.net>
parents: 186
diff changeset
    20
(development version and builds for a few other platforms).
173
1812a794b759 Add a note about the API change to the README file
Mikael Berthe <mikael@lilotux.net>
parents: 156
diff changeset
    21
4
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
    22
### From source
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
    23
264
8f478162d991 Update README
Mikael Berthe <mikael@lilotux.net>
parents: 253
diff changeset
    24
madonctl uses Go modules (dependencies have been vendored for convenience).
8f478162d991 Update README
Mikael Berthe <mikael@lilotux.net>
parents: 253
diff changeset
    25
8f478162d991 Update README
Mikael Berthe <mikael@lilotux.net>
parents: 253
diff changeset
    26
You can install `madonctl` with the usual Go command:
239
605a00e9d1ab Switch to Go modules (and bump Go version requirement)
Mikael Berthe <mikael@lilotux.net>
parents: 238
diff changeset
    27
264
8f478162d991 Update README
Mikael Berthe <mikael@lilotux.net>
parents: 253
diff changeset
    28
    go install github.com/McKael/madonctl
0
5abace724584 Initial public release
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    29
264
8f478162d991 Update README
Mikael Berthe <mikael@lilotux.net>
parents: 253
diff changeset
    30
Alternatively:
239
605a00e9d1ab Switch to Go modules (and bump Go version requirement)
Mikael Berthe <mikael@lilotux.net>
parents: 238
diff changeset
    31
240
7c3e7b53cbd3 Enable GO111MODULE in Travis config
Mikael Berthe <mikael@lilotux.net>
parents: 239
diff changeset
    32
    git clone https://github.com/McKael/madonctl
239
605a00e9d1ab Switch to Go modules (and bump Go version requirement)
Mikael Berthe <mikael@lilotux.net>
parents: 238
diff changeset
    33
    cd madonctl
605a00e9d1ab Switch to Go modules (and bump Go version requirement)
Mikael Berthe <mikael@lilotux.net>
parents: 238
diff changeset
    34
    go build    # (or go install)
605a00e9d1ab Switch to Go modules (and bump Go version requirement)
Mikael Berthe <mikael@lilotux.net>
parents: 238
diff changeset
    35
605a00e9d1ab Switch to Go modules (and bump Go version requirement)
Mikael Berthe <mikael@lilotux.net>
parents: 238
diff changeset
    36
and you should be able to use `madonctl`.
605a00e9d1ab Switch to Go modules (and bump Go version requirement)
Mikael Berthe <mikael@lilotux.net>
parents: 238
diff changeset
    37
0
5abace724584 Initial public release
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    38
## Usage
5abace724584 Initial public release
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    39
4
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
    40
### Configuration
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
    41
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
    42
In order to use madonctl, you need to specify the instance name or URL, and
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
    43
usually provide an account login/password (or a token).
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
    44
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
    45
These settings can be passed as command line arguments or environment variables,
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
    46
but the easiest way is to use a configuration file.
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
    47
107
093fc00b333d Update README
Mikael Berthe <mikael@lilotux.net>
parents: 105
diff changeset
    48
Note that you can **generate a configuration file** for your settings with
4
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
    49
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
    50
`madonctl config dump -i mastodon.social -L username@domain -P password`
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
    51
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
    52
(You can redirect the output to a configuration file.)
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
    53
115
8ae0dda7756d Update README
Mikael Berthe <mikael@lilotux.net>
parents: 108
diff changeset
    54
If you don't want to use the password or if you have enabled *Two-factor
137
8fdaf5e1f8fc Add configration.md with settings details
Mikael Berthe <mikael@lilotux.net>
parents: 129
diff changeset
    55
authentication*, you can also use **OAuth2** with the `oauth2` command:
4
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
    56
137
8fdaf5e1f8fc Add configration.md with settings details
Mikael Berthe <mikael@lilotux.net>
parents: 129
diff changeset
    57
`madonctl -i mastodon.social oauth2 > madonctl.yaml`
115
8ae0dda7756d Update README
Mikael Berthe <mikael@lilotux.net>
parents: 108
diff changeset
    58
137
8fdaf5e1f8fc Add configration.md with settings details
Mikael Berthe <mikael@lilotux.net>
parents: 129
diff changeset
    59
For details on the configuration, please check the [configuration](configuration.md) page.
79
bca27c55be9f Add default visibility setting
Mikael Berthe <mikael@lilotux.net>
parents: 75
diff changeset
    60
4
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
    61
### Usage
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
    62
141
abaf660dc3fc Update documentation
Mikael Berthe <mikael@lilotux.net>
parents: 140
diff changeset
    63
The complete list of commands is available in the online help (`madonctl help`,
abaf660dc3fc Update documentation
Mikael Berthe <mikael@lilotux.net>
parents: 140
diff changeset
    64
`madonctl command --help`...) or in the
abaf660dc3fc Update documentation
Mikael Berthe <mikael@lilotux.net>
parents: 140
diff changeset
    65
[manpages](https://lilotux.net/~mikael/pub/madonctl/manual/html/).
4
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
    66
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
    67
### Examples
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
    68
141
abaf660dc3fc Update documentation
Mikael Berthe <mikael@lilotux.net>
parents: 140
diff changeset
    69
This is a non-exhaustive list of commands, showing how madonctl works.
abaf660dc3fc Update documentation
Mikael Berthe <mikael@lilotux.net>
parents: 140
diff changeset
    70
4
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
    71
To post a simple "toot":
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
    72
``` sh
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
    73
% madonctl toot "Hello, World"
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
    74
```
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
    75
108
cc73f7cb0f21 Update README again (style)
Mikael Berthe <mikael@lilotux.net>
parents: 107
diff changeset
    76
You can change the toot visibility, add a Content Warning (a.k.a. spoiler)
cc73f7cb0f21 Update README again (style)
Mikael Berthe <mikael@lilotux.net>
parents: 107
diff changeset
    77
or send a media file:
4
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
    78
``` sh
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
    79
% madonctl toot --visibility direct "@McKael Hello, you"
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
    80
% madonctl toot --visibility private --spoiler CW "The answer was 42"
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
    81
% madonctl post --file image.jpg Selfie # Send a media file
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
    82
```
79
bca27c55be9f Add default visibility setting
Mikael Berthe <mikael@lilotux.net>
parents: 75
diff changeset
    83
Note: The default toot visibility can be set in the configuration file with
bca27c55be9f Add default visibility setting
Mikael Berthe <mikael@lilotux.net>
parents: 75
diff changeset
    84
the `default_visibility` setting or with the environment variable (example
bca27c55be9f Add default visibility setting
Mikael Berthe <mikael@lilotux.net>
parents: 75
diff changeset
    85
`export MADONCTL_DEFAULT_VISIBILITY=unlisted`).
4
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
    86
17
ab1aa9652791 Update documentation
Mikael Berthe <mikael@lilotux.net>
parents: 9
diff changeset
    87
Send (text) file content as new message:
ab1aa9652791 Update documentation
Mikael Berthe <mikael@lilotux.net>
parents: 9
diff changeset
    88
```
ab1aa9652791 Update documentation
Mikael Berthe <mikael@lilotux.net>
parents: 9
diff changeset
    89
% madonctl toot --text-file message.txt
ab1aa9652791 Update documentation
Mikael Berthe <mikael@lilotux.net>
parents: 9
diff changeset
    90
```
ab1aa9652791 Update documentation
Mikael Berthe <mikael@lilotux.net>
parents: 9
diff changeset
    91
72
8c7a2119dc9d Update README
Mikael Berthe <mikael@lilotux.net>
parents: 54
diff changeset
    92
... or read message from standard input:
8c7a2119dc9d Update README
Mikael Berthe <mikael@lilotux.net>
parents: 54
diff changeset
    93
```
8c7a2119dc9d Update README
Mikael Berthe <mikael@lilotux.net>
parents: 54
diff changeset
    94
% echo "Hello from #madonctl" | madonctl toot --stdin
8c7a2119dc9d Update README
Mikael Berthe <mikael@lilotux.net>
parents: 54
diff changeset
    95
```
8c7a2119dc9d Update README
Mikael Berthe <mikael@lilotux.net>
parents: 54
diff changeset
    96
129
11966471aac3 toot: Add flag --add-mentions to add mentions when replying
Mikael Berthe <mikael@lilotux.net>
parents: 115
diff changeset
    97
Reply to a message:
11966471aac3 toot: Add flag --add-mentions to add mentions when replying
Mikael Berthe <mikael@lilotux.net>
parents: 115
diff changeset
    98
``` sh
11966471aac3 toot: Add flag --add-mentions to add mentions when replying
Mikael Berthe <mikael@lilotux.net>
parents: 115
diff changeset
    99
% madonctl toot --in-reply-to 1234 --visibility direct "@user1 @user2 response"
11966471aac3 toot: Add flag --add-mentions to add mentions when replying
Mikael Berthe <mikael@lilotux.net>
parents: 115
diff changeset
   100
% madonctl toot --in-reply-to 1234 --add-mentions "response"
11966471aac3 toot: Add flag --add-mentions to add mentions when replying
Mikael Berthe <mikael@lilotux.net>
parents: 115
diff changeset
   101
```
11966471aac3 toot: Add flag --add-mentions to add mentions when replying
Mikael Berthe <mikael@lilotux.net>
parents: 115
diff changeset
   102
The flag `--add-mentions` automatically adds mentions based on the toot you're
11966471aac3 toot: Add flag --add-mentions to add mentions when replying
Mikael Berthe <mikael@lilotux.net>
parents: 115
diff changeset
   103
replying to.
11966471aac3 toot: Add flag --add-mentions to add mentions when replying
Mikael Berthe <mikael@lilotux.net>
parents: 115
diff changeset
   104
107
093fc00b333d Update README
Mikael Berthe <mikael@lilotux.net>
parents: 105
diff changeset
   105
Some **account-related commands**:
4
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   106
``` sh
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   107
% madonctl accounts blocked                       # List blocked accounts
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   108
% madonctl accounts muted                         # List muted accounts
209
3772cc6b3d0a accounts: Use singular form
Mikael Berthe <mikael@lilotux.net>
parents: 199
diff changeset
   109
3772cc6b3d0a accounts: Use singular form
Mikael Berthe <mikael@lilotux.net>
parents: 199
diff changeset
   110
% madonctl account notifications --list --all    # List really all notifications
3772cc6b3d0a accounts: Use singular form
Mikael Berthe <mikael@lilotux.net>
parents: 199
diff changeset
   111
% madonctl account notifications --list --clear  # List and clear notifications
3772cc6b3d0a accounts: Use singular form
Mikael Berthe <mikael@lilotux.net>
parents: 199
diff changeset
   112
% madonctl account notifications --notification-id 1234 # Display notification
3772cc6b3d0a accounts: Use singular form
Mikael Berthe <mikael@lilotux.net>
parents: 199
diff changeset
   113
% madonctl account notifications --dismiss --notification-id 1234
4
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   114
```
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   115
32
cd657f7ec881 Update README
Mikael Berthe <mikael@lilotux.net>
parents: 31
diff changeset
   116
Note: By default, madonctl will send a single query.  If you want all available
cd657f7ec881 Update README
Mikael Berthe <mikael@lilotux.net>
parents: 31
diff changeset
   117
results you should use the `--all` flag.  If you use a `--limit` value,
cd657f7ec881 Update README
Mikael Berthe <mikael@lilotux.net>
parents: 31
diff changeset
   118
madonctl might send several queries until the number of results reaches this
cd657f7ec881 Update README
Mikael Berthe <mikael@lilotux.net>
parents: 31
diff changeset
   119
value.
cd657f7ec881 Update README
Mikael Berthe <mikael@lilotux.net>
parents: 31
diff changeset
   120
107
093fc00b333d Update README
Mikael Berthe <mikael@lilotux.net>
parents: 105
diff changeset
   121
**Update** your account information:
7
df3e9e068778 Update documentation wrt accounts update
Mikael Berthe <mikael@lilotux.net>
parents: 5
diff changeset
   122
``` sh
209
3772cc6b3d0a accounts: Use singular form
Mikael Berthe <mikael@lilotux.net>
parents: 199
diff changeset
   123
% madonctl account update --display-name "John"  # Update display name
3772cc6b3d0a accounts: Use singular form
Mikael Berthe <mikael@lilotux.net>
parents: 199
diff changeset
   124
% madonctl account update --note "Newcomer"      # Update user note (bio)
3772cc6b3d0a accounts: Use singular form
Mikael Berthe <mikael@lilotux.net>
parents: 199
diff changeset
   125
% madonctl account update --note ""              # Clear note
3772cc6b3d0a accounts: Use singular form
Mikael Berthe <mikael@lilotux.net>
parents: 199
diff changeset
   126
% madonctl account update --avatar me.png        # Update avatar
238
d5d0260ead40 Update documentation (README)
Mikael Berthe <mikael@lilotux.net>
parents: 213
diff changeset
   127
d5d0260ead40 Update documentation (README)
Mikael Berthe <mikael@lilotux.net>
parents: 213
diff changeset
   128
% madonctl account update --bot               # Advertise account as automated
d5d0260ead40 Update documentation (README)
Mikael Berthe <mikael@lilotux.net>
parents: 213
diff changeset
   129
% madonctl account update --default-sensitive # Set medias sensitive by default
d5d0260ead40 Update documentation (README)
Mikael Berthe <mikael@lilotux.net>
parents: 213
diff changeset
   130
% madonctl account update --default-language fra    # Set default toot language
d5d0260ead40 Update documentation (README)
Mikael Berthe <mikael@lilotux.net>
parents: 213
diff changeset
   131
% madonctl account update --default-privacy private # Set default toot privacy
7
df3e9e068778 Update documentation wrt accounts update
Mikael Berthe <mikael@lilotux.net>
parents: 5
diff changeset
   132
```
df3e9e068778 Update documentation wrt accounts update
Mikael Berthe <mikael@lilotux.net>
parents: 5
diff changeset
   133
108
cc73f7cb0f21 Update README again (style)
Mikael Berthe <mikael@lilotux.net>
parents: 107
diff changeset
   134
See your own **posts**:
31
9dcb4491d7a1 Update README
Mikael Berthe <mikael@lilotux.net>
parents: 24
diff changeset
   135
``` sh
209
3772cc6b3d0a accounts: Use singular form
Mikael Berthe <mikael@lilotux.net>
parents: 199
diff changeset
   136
% madonctl account statuses                      # See last posts
3772cc6b3d0a accounts: Use singular form
Mikael Berthe <mikael@lilotux.net>
parents: 199
diff changeset
   137
% madonctl account statuses --all                # See all statuses
31
9dcb4491d7a1 Update README
Mikael Berthe <mikael@lilotux.net>
parents: 24
diff changeset
   138
```
9dcb4491d7a1 Update README
Mikael Berthe <mikael@lilotux.net>
parents: 24
diff changeset
   139
108
cc73f7cb0f21 Update README again (style)
Mikael Berthe <mikael@lilotux.net>
parents: 107
diff changeset
   140
Display accounts you're **following** or your **followers**:
31
9dcb4491d7a1 Update README
Mikael Berthe <mikael@lilotux.net>
parents: 24
diff changeset
   141
``` sh
9dcb4491d7a1 Update README
Mikael Berthe <mikael@lilotux.net>
parents: 24
diff changeset
   142
% madonctl accounts following                     # See last following
9dcb4491d7a1 Update README
Mikael Berthe <mikael@lilotux.net>
parents: 24
diff changeset
   143
% madonctl accounts following --all               # See all followed accounts
9dcb4491d7a1 Update README
Mikael Berthe <mikael@lilotux.net>
parents: 24
diff changeset
   144
% madonctl accounts followers --limit 30          # Last 30 followers
9dcb4491d7a1 Update README
Mikael Berthe <mikael@lilotux.net>
parents: 24
diff changeset
   145
```
9dcb4491d7a1 Update README
Mikael Berthe <mikael@lilotux.net>
parents: 24
diff changeset
   146
107
093fc00b333d Update README
Mikael Berthe <mikael@lilotux.net>
parents: 105
diff changeset
   147
Add/remove a **favourite**, **boost** a status...
4
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   148
``` sh
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   149
% madonctl status --status-id 416671 favourite    # Fave a status
238
d5d0260ead40 Update documentation (README)
Mikael Berthe <mikael@lilotux.net>
parents: 213
diff changeset
   150
% madonctl status --status-id 416671 boost        # Boost (reblog) a status
d5d0260ead40 Update documentation (README)
Mikael Berthe <mikael@lilotux.net>
parents: 213
diff changeset
   151
d5d0260ead40 Update documentation (README)
Mikael Berthe <mikael@lilotux.net>
parents: 213
diff changeset
   152
% madonctl status --status-id 416671 unboost       # Cancel a boost
d5d0260ead40 Update documentation (README)
Mikael Berthe <mikael@lilotux.net>
parents: 213
diff changeset
   153
% madonctl status --status-id 416671 boost --unset # Cancel a boost (deprecated)
4
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   154
```
0
5abace724584 Initial public release
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   155
181
0f3fb2d27ddb Update documentation wrt pin/unpin status
Mikael Berthe <mikael@lilotux.net>
parents: 173
diff changeset
   156
**Pin/unpin** a status...
0f3fb2d27ddb Update documentation wrt pin/unpin status
Mikael Berthe <mikael@lilotux.net>
parents: 173
diff changeset
   157
``` sh
0f3fb2d27ddb Update documentation wrt pin/unpin status
Mikael Berthe <mikael@lilotux.net>
parents: 173
diff changeset
   158
% madonctl status --status-id 533769 pin          # Pin a status
238
d5d0260ead40 Update documentation (README)
Mikael Berthe <mikael@lilotux.net>
parents: 213
diff changeset
   159
% madonctl status --status-id 533769 unpin        # Unpin a status
d5d0260ead40 Update documentation (README)
Mikael Berthe <mikael@lilotux.net>
parents: 213
diff changeset
   160
% madonctl status --status-id 533769 pin --unset  # Unpin a status (deprecated)
d5d0260ead40 Update documentation (README)
Mikael Berthe <mikael@lilotux.net>
parents: 213
diff changeset
   161
```
d5d0260ead40 Update documentation (README)
Mikael Berthe <mikael@lilotux.net>
parents: 213
diff changeset
   162
d5d0260ead40 Update documentation (README)
Mikael Berthe <mikael@lilotux.net>
parents: 213
diff changeset
   163
**Pin/unpin** an account (i.e., account endorsement)...
d5d0260ead40 Update documentation (README)
Mikael Berthe <mikael@lilotux.net>
parents: 213
diff changeset
   164
``` sh
d5d0260ead40 Update documentation (README)
Mikael Berthe <mikael@lilotux.net>
parents: 213
diff changeset
   165
% madonctl status --account-id 1234 pin           # Pin (endorse) an account
d5d0260ead40 Update documentation (README)
Mikael Berthe <mikael@lilotux.net>
parents: 213
diff changeset
   166
% madonctl status --account-id 1234 unpin         # Unpin an account
d5d0260ead40 Update documentation (README)
Mikael Berthe <mikael@lilotux.net>
parents: 213
diff changeset
   167
d5d0260ead40 Update documentation (README)
Mikael Berthe <mikael@lilotux.net>
parents: 213
diff changeset
   168
% madonctl status pin @Gargron@mastodon.social
181
0f3fb2d27ddb Update documentation wrt pin/unpin status
Mikael Berthe <mikael@lilotux.net>
parents: 173
diff changeset
   169
```
0f3fb2d27ddb Update documentation wrt pin/unpin status
Mikael Berthe <mikael@lilotux.net>
parents: 173
diff changeset
   170
5
d70f8e8f3d2e Add examples with accounts and timelines
Mikael Berthe <mikael@lilotux.net>
parents: 4
diff changeset
   171
Search for an account (only accounts known to your instance):
d70f8e8f3d2e Add examples with accounts and timelines
Mikael Berthe <mikael@lilotux.net>
parents: 4
diff changeset
   172
``` sh
d70f8e8f3d2e Add examples with accounts and timelines
Mikael Berthe <mikael@lilotux.net>
parents: 4
diff changeset
   173
% madonctl accounts search gargron
d70f8e8f3d2e Add examples with accounts and timelines
Mikael Berthe <mikael@lilotux.net>
parents: 4
diff changeset
   174
```
d70f8e8f3d2e Add examples with accounts and timelines
Mikael Berthe <mikael@lilotux.net>
parents: 4
diff changeset
   175
107
093fc00b333d Update README
Mikael Berthe <mikael@lilotux.net>
parents: 105
diff changeset
   176
**Follow** an account with known ID:
5
d70f8e8f3d2e Add examples with accounts and timelines
Mikael Berthe <mikael@lilotux.net>
parents: 4
diff changeset
   177
``` sh
209
3772cc6b3d0a accounts: Use singular form
Mikael Berthe <mikael@lilotux.net>
parents: 199
diff changeset
   178
% madonctl account follow --account-id 1234
5
d70f8e8f3d2e Add examples with accounts and timelines
Mikael Berthe <mikael@lilotux.net>
parents: 4
diff changeset
   179
```
d70f8e8f3d2e Add examples with accounts and timelines
Mikael Berthe <mikael@lilotux.net>
parents: 4
diff changeset
   180
4
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   181
Follow a remote account:
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   182
``` sh
209
3772cc6b3d0a accounts: Use singular form
Mikael Berthe <mikael@lilotux.net>
parents: 199
diff changeset
   183
% madonctl account follow --remote Gargron@mastodon.social
4
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   184
```
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   185
213
3569475f86ec Update help & documentation
Mikael Berthe <mikael@lilotux.net>
parents: 212
diff changeset
   186
madonctl 2.3.0+ is able to recognize the kind of argument to specify and to
3569475f86ec Update help & documentation
Mikael Berthe <mikael@lilotux.net>
parents: 212
diff changeset
   187
use the relevant API calls, so the previous commands could be written as:
3569475f86ec Update help & documentation
Mikael Berthe <mikael@lilotux.net>
parents: 212
diff changeset
   188
``` sh
3569475f86ec Update help & documentation
Mikael Berthe <mikael@lilotux.net>
parents: 212
diff changeset
   189
% madonctl account follow 1234
3569475f86ec Update help & documentation
Mikael Berthe <mikael@lilotux.net>
parents: 212
diff changeset
   190
% madonctl account follow Gargron@mastodon.social
3569475f86ec Update help & documentation
Mikael Berthe <mikael@lilotux.net>
parents: 212
diff changeset
   191
% madonctl account follow https://mastodon.social/@Gargron
3569475f86ec Update help & documentation
Mikael Berthe <mikael@lilotux.net>
parents: 212
diff changeset
   192
```
3569475f86ec Update help & documentation
Mikael Berthe <mikael@lilotux.net>
parents: 212
diff changeset
   193
3569475f86ec Update help & documentation
Mikael Berthe <mikael@lilotux.net>
parents: 212
diff changeset
   194
Note: If you know the numeric account ID, you should use it to save extra API
3569475f86ec Update help & documentation
Mikael Berthe <mikael@lilotux.net>
parents: 212
diff changeset
   195
calls.
3569475f86ec Update help & documentation
Mikael Berthe <mikael@lilotux.net>
parents: 212
diff changeset
   196
107
093fc00b333d Update README
Mikael Berthe <mikael@lilotux.net>
parents: 105
diff changeset
   197
**Search** for accounts, statuses or hashtags:
105
07d96d963223 Update README
Mikael Berthe <mikael@lilotux.net>
parents: 102
diff changeset
   198
``` sh
07d96d963223 Update README
Mikael Berthe <mikael@lilotux.net>
parents: 102
diff changeset
   199
% madonctl search gargron
07d96d963223 Update README
Mikael Berthe <mikael@lilotux.net>
parents: 102
diff changeset
   200
% madonctl search mastodon
07d96d963223 Update README
Mikael Berthe <mikael@lilotux.net>
parents: 102
diff changeset
   201
```
07d96d963223 Update README
Mikael Berthe <mikael@lilotux.net>
parents: 102
diff changeset
   202
07d96d963223 Update README
Mikael Berthe <mikael@lilotux.net>
parents: 102
diff changeset
   203
When the account ID is unknown, --user-id can be useful.\
07d96d963223 Update README
Mikael Berthe <mikael@lilotux.net>
parents: 102
diff changeset
   204
You can specify the (instance-specific) account ID number (--account-id) or
07d96d963223 Update README
Mikael Berthe <mikael@lilotux.net>
parents: 102
diff changeset
   205
the user ID (--user-id).  In the later case, madonctl will search for the
07d96d963223 Update README
Mikael Berthe <mikael@lilotux.net>
parents: 102
diff changeset
   206
user so it must match exactly the ID known to your instance (without the
140
92842a4f5f8b Remove notes for old versions in README
Mikael Berthe <mikael@lilotux.net>
parents: 137
diff changeset
   207
@domain suffix if the user is on the same instance).  The --user-id flag can
92842a4f5f8b Remove notes for old versions in README
Mikael Berthe <mikael@lilotux.net>
parents: 137
diff changeset
   208
also contain an HTTP account URL.
105
07d96d963223 Update README
Mikael Berthe <mikael@lilotux.net>
parents: 102
diff changeset
   209
``` sh
209
3772cc6b3d0a accounts: Use singular form
Mikael Berthe <mikael@lilotux.net>
parents: 199
diff changeset
   210
% madonctl account --user-id Gargron@mastodon.social -l5 statuses # Last 5 statuses
3772cc6b3d0a accounts: Use singular form
Mikael Berthe <mikael@lilotux.net>
parents: 199
diff changeset
   211
% madonctl account --user-id https://mastodon.social/@Gargron -l5 statuses # Same
105
07d96d963223 Update README
Mikael Berthe <mikael@lilotux.net>
parents: 102
diff changeset
   212
```
213
3569475f86ec Update help & documentation
Mikael Berthe <mikael@lilotux.net>
parents: 212
diff changeset
   213
3569475f86ec Update help & documentation
Mikael Berthe <mikael@lilotux.net>
parents: 212
diff changeset
   214
With madonctl 2.3.0+, you can use the shorter forms:
3569475f86ec Update help & documentation
Mikael Berthe <mikael@lilotux.net>
parents: 212
diff changeset
   215
``` sh
3569475f86ec Update help & documentation
Mikael Berthe <mikael@lilotux.net>
parents: 212
diff changeset
   216
% madonctl account statuses -l5 Gargron@mastodon.social
3569475f86ec Update help & documentation
Mikael Berthe <mikael@lilotux.net>
parents: 212
diff changeset
   217
% madonctl account statuses -l5 https://mastodon.social/@Gargron
3569475f86ec Update help & documentation
Mikael Berthe <mikael@lilotux.net>
parents: 212
diff changeset
   218
% madonctl account statuses -l5 1   # (account ID)
3569475f86ec Update help & documentation
Mikael Berthe <mikael@lilotux.net>
parents: 212
diff changeset
   219
```
3569475f86ec Update help & documentation
Mikael Berthe <mikael@lilotux.net>
parents: 212
diff changeset
   220
156
bafe489779e5 Add a note about --user-id account format
Mikael Berthe <mikael@lilotux.net>
parents: 153
diff changeset
   221
Please note that the form "Gargron@mastodon.social" will only work if this
bafe489779e5 Add a note about --user-id account format
Mikael Berthe <mikael@lilotux.net>
parents: 153
diff changeset
   222
account is known by the instance.  If it is unknown, the https link should work
bafe489779e5 Add a note about --user-id account format
Mikael Berthe <mikael@lilotux.net>
parents: 153
diff changeset
   223
(and the Mastodon server will learn about the account).
105
07d96d963223 Update README
Mikael Berthe <mikael@lilotux.net>
parents: 102
diff changeset
   224
107
093fc00b333d Update README
Mikael Berthe <mikael@lilotux.net>
parents: 105
diff changeset
   225
Read **timelines**:
5
d70f8e8f3d2e Add examples with accounts and timelines
Mikael Berthe <mikael@lilotux.net>
parents: 4
diff changeset
   226
``` sh
d70f8e8f3d2e Add examples with accounts and timelines
Mikael Berthe <mikael@lilotux.net>
parents: 4
diff changeset
   227
% madonctl timeline                 # Display home timeline
238
d5d0260ead40 Update documentation (README)
Mikael Berthe <mikael@lilotux.net>
parents: 213
diff changeset
   228
% madonctl timeline home            # (same as previous command)
5
d70f8e8f3d2e Add examples with accounts and timelines
Mikael Berthe <mikael@lilotux.net>
parents: 4
diff changeset
   229
% madonctl timeline public          # Display federated timeline
d70f8e8f3d2e Add examples with accounts and timelines
Mikael Berthe <mikael@lilotux.net>
parents: 4
diff changeset
   230
% madonctl timeline public --local  # Display public local timeline
238
d5d0260ead40 Update documentation (README)
Mikael Berthe <mikael@lilotux.net>
parents: 213
diff changeset
   231
% madonctl timeline direct          # Display timeline of direct messages
24
9fcffbaa8cd0 Update README
Mikael Berthe <mikael@lilotux.net>
parents: 21
diff changeset
   232
9fcffbaa8cd0 Update README
Mikael Berthe <mikael@lilotux.net>
parents: 21
diff changeset
   233
% madonctl timeline --limit 3       # Display 3 latest home timeline messages
5
d70f8e8f3d2e Add examples with accounts and timelines
Mikael Berthe <mikael@lilotux.net>
parents: 4
diff changeset
   234
```
d70f8e8f3d2e Add examples with accounts and timelines
Mikael Berthe <mikael@lilotux.net>
parents: 4
diff changeset
   235
107
093fc00b333d Update README
Mikael Berthe <mikael@lilotux.net>
parents: 105
diff changeset
   236
Use the **streaming API** and fetch timelines and notifications:
4
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   237
``` sh
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   238
% madonctl stream                   # Stream home timeline and notifications
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   239
% madonctl stream local             # Stream local timeline
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   240
% madonctl stream public            # Stream federated timeline
238
d5d0260ead40 Update documentation (README)
Mikael Berthe <mikael@lilotux.net>
parents: 213
diff changeset
   241
% madonctl stream direct            # Stream direct messages
4
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   242
```
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   243
107
093fc00b333d Update README
Mikael Berthe <mikael@lilotux.net>
parents: 105
diff changeset
   244
You can also use **hashtag streams**:
75
447ac88b67c6 Update README documentation wrt streams
Mikael Berthe <mikael@lilotux.net>
parents: 72
diff changeset
   245
``` sh
447ac88b67c6 Update README documentation wrt streams
Mikael Berthe <mikael@lilotux.net>
parents: 72
diff changeset
   246
% madonctl stream :mastodon         # Stream for hastag 'mastodon'
447ac88b67c6 Update README documentation wrt streams
Mikael Berthe <mikael@lilotux.net>
parents: 72
diff changeset
   247
% madonctl stream :madonctl,golang  # Stream for several hashtags
447ac88b67c6 Update README documentation wrt streams
Mikael Berthe <mikael@lilotux.net>
parents: 72
diff changeset
   248
```
447ac88b67c6 Update README documentation wrt streams
Mikael Berthe <mikael@lilotux.net>
parents: 72
diff changeset
   249
447ac88b67c6 Update README documentation wrt streams
Mikael Berthe <mikael@lilotux.net>
parents: 72
diff changeset
   250
Please note that madonctl will use one socket per stream, so the number of
447ac88b67c6 Update README documentation wrt streams
Mikael Berthe <mikael@lilotux.net>
parents: 72
diff changeset
   251
concurrent hashtags is currently limited to 4 for "politeness".
447ac88b67c6 Update README documentation wrt streams
Mikael Berthe <mikael@lilotux.net>
parents: 72
diff changeset
   252
115
8ae0dda7756d Update README
Mikael Berthe <mikael@lilotux.net>
parents: 108
diff changeset
   253
It is also possible to send every stream event (notification or status) to
8ae0dda7756d Update README
Mikael Berthe <mikael@lilotux.net>
parents: 108
diff changeset
   254
an **external command**.  You can can even combine it with a customized theme.
8ae0dda7756d Update README
Mikael Berthe <mikael@lilotux.net>
parents: 108
diff changeset
   255
The contents will be sent to the standard input of this command:
8ae0dda7756d Update README
Mikael Berthe <mikael@lilotux.net>
parents: 108
diff changeset
   256
``` sh
8ae0dda7756d Update README
Mikael Berthe <mikael@lilotux.net>
parents: 108
diff changeset
   257
madonctl stream --command gateway.sh --theme gateway
8ae0dda7756d Update README
Mikael Berthe <mikael@lilotux.net>
parents: 108
diff changeset
   258
```
75
447ac88b67c6 Update README documentation wrt streams
Mikael Berthe <mikael@lilotux.net>
parents: 72
diff changeset
   259
108
cc73f7cb0f21 Update README again (style)
Mikael Berthe <mikael@lilotux.net>
parents: 107
diff changeset
   260
(Almost) All commands have a **customizable output**:
4
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   261
``` sh
209
3772cc6b3d0a accounts: Use singular form
Mikael Berthe <mikael@lilotux.net>
parents: 199
diff changeset
   262
% madonctl account show            # Display an account
3772cc6b3d0a accounts: Use singular form
Mikael Berthe <mikael@lilotux.net>
parents: 199
diff changeset
   263
% madonctl account show -o yaml    # Display an account, in yaml
3772cc6b3d0a accounts: Use singular form
Mikael Berthe <mikael@lilotux.net>
parents: 199
diff changeset
   264
% madonctl account show -o json    # Display an account, in json
4
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   265
% madonctl stream local -o json     # Stream local timeline and output to JSON
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   266
```
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   267
107
093fc00b333d Update README
Mikael Berthe <mikael@lilotux.net>
parents: 105
diff changeset
   268
You can also use Go (Golang) **templates**:
4
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   269
``` sh
209
3772cc6b3d0a accounts: Use singular form
Mikael Berthe <mikael@lilotux.net>
parents: 199
diff changeset
   270
% madonctl account --account-id 1 followers --template '{{.acct}}{{"\n"}}'
4
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   271
```
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   272
140
92842a4f5f8b Remove notes for old versions in README
Mikael Berthe <mikael@lilotux.net>
parents: 137
diff changeset
   273
You can write and use [themes](templates) as well:
92
aa7d918e727d Update README
Mikael Berthe <mikael@lilotux.net>
parents: 79
diff changeset
   274
```
aa7d918e727d Update README
Mikael Berthe <mikael@lilotux.net>
parents: 79
diff changeset
   275
madonctl --theme=ansi timeline
aa7d918e727d Update README
Mikael Berthe <mikael@lilotux.net>
parents: 79
diff changeset
   276
```
aa7d918e727d Update README
Mikael Berthe <mikael@lilotux.net>
parents: 79
diff changeset
   277
4
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   278
There are many more commands, you can find them in the online help or the manpage.
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   279
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   280
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   281
### Shell completion
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   282
107
093fc00b333d Update README
Mikael Berthe <mikael@lilotux.net>
parents: 105
diff changeset
   283
If you want **shell completion**, you can generate scripts with the following command: \
4
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   284
`madonctl completion bash` (or zsh)
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   285
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   286
Then, just source the script in your shell.
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   287
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   288
For example, I have this line in my .zshrc:
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   289
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   290
`source <(madonctl completion zsh)`
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   291
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   292
### Commands output
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   293
107
093fc00b333d Update README
Mikael Berthe <mikael@lilotux.net>
parents: 105
diff changeset
   294
The output can be set to **json**, **yaml** or to a **Go template** for all commands.\
4
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   295
If you are familiar with Kubernetes' kubectl, it is very similar.
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   296
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   297
For example, you can display your user token with:\
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   298
`madonctl config whoami --template '{{.access_token}}'`\
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   299
or the application ID with:\
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   300
`madonctl config dump --template '{{.ID}}'`
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   301
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   302
All the users that have favorited a given status:\
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   303
`madonctl status --status-id 101194 favourited-by --template '{{.username}}{{"\n"}}'`
a3b95e2f0b0b Update README - add some documentation
Mikael Berthe <mikael@lilotux.net>
parents: 2
diff changeset
   304
107
093fc00b333d Update README
Mikael Berthe <mikael@lilotux.net>
parents: 105
diff changeset
   305
Sets of templates can be grouped as **themes**.
105
07d96d963223 Update README
Mikael Berthe <mikael@lilotux.net>
parents: 102
diff changeset
   306
24
9fcffbaa8cd0 Update README
Mikael Berthe <mikael@lilotux.net>
parents: 21
diff changeset
   307
For more complex templates, one can use the `--template-file` option.\
105
07d96d963223 Update README
Mikael Berthe <mikael@lilotux.net>
parents: 102
diff changeset
   308
See the [themes & templates](templates) folder.
0
5abace724584 Initial public release
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   309
5abace724584 Initial public release
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   310
## References
5abace724584 Initial public release
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   311
141
abaf660dc3fc Update documentation
Mikael Berthe <mikael@lilotux.net>
parents: 140
diff changeset
   312
- [madonctl manpages](https://lilotux.net/~mikael/pub/madonctl/manual/html/)
0
5abace724584 Initial public release
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   313
- [madon](https://github.com/McKael/madon), the Go library for Mastodon API
5abace724584 Initial public release
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   314
- [Mastodon API documentation](https://github.com/tootsuite/documentation/blob/master/Using-the-API/API.md)
5abace724584 Initial public release
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   315
- [Mastodon repository](https://github.com/tootsuite/mastodon)