README.md
changeset 115 8ae0dda7756d
parent 108 cc73f7cb0f21
child 129 11966471aac3
equal deleted inserted replaced
114:590c9dd7328e 115:8ae0dda7756d
    44 
    44 
    45 `madonctl config dump -i mastodon.social -L username@domain -P password`
    45 `madonctl config dump -i mastodon.social -L username@domain -P password`
    46 
    46 
    47 (You can redirect the output to a configuration file.)
    47 (You can redirect the output to a configuration file.)
    48 
    48 
    49 If you only provide the Mastodon instance, it will generate a configuration file with an application ID/secret for this instance and you will have to add the user credentials.
    49 If you only provide the Mastodon instance, it will generate a configuration
    50 
    50 file with an application ID/secret for this instance and you will have to add
    51 Note that every variable from the configration file can also be set with an environment variable (e.g. `export MADONCTL_INSTANCE='https://mamot.fr'`).
    51 the user credentials.
       
    52 
       
    53 Note that every variable from the configration file can also be set with an
       
    54 environment variable (e.g. `export MADONCTL_INSTANCE='https://mamot.fr'`).
       
    55 
       
    56 If you don't want to use the password or if you have enabled *Two-factor
       
    57 authentication*, you can use **OAuth2** with the `oauth2` command, either
       
    58 interactively or non-interactively:
       
    59 
       
    60 `madonctl -i mastodon.social oauth2`
       
    61 
       
    62 The output is similar to the previous `config dump` command, so you can create
       
    63 your configuration file like this as well:
       
    64 
       
    65 `madonctl -i mastodon.social oauth2 > config_file.yaml`
       
    66 
       
    67 Note: If don't want to use the tool interactively, check to `get-url` and `code`
       
    68 subcommands:
       
    69 ``` sh
       
    70 madonctl -i mastodon.social oauth2 get-url
       
    71 # (Paste the link into your browser...)
       
    72 madonctl -i mastodon.social code $CODE > config_file.yaml
       
    73 ```
    52 
    74 
    53 ### Usage
    75 ### Usage
    54 
    76 
    55 The complete list of commands is available in the online help (`madonctl help`, `madonctl command --help`...)
    77 The complete list of commands is available in the online help (`madonctl help`, `madonctl command --help`...)
    56 or in the [manpages](https://lilotux.net/~mikael/pub/madonctl/manual/html/).\
    78 or in the [manpages](https://lilotux.net/~mikael/pub/madonctl/manual/html/).\
   181 ```
   203 ```
   182 
   204 
   183 Please note that madonctl will use one socket per stream, so the number of
   205 Please note that madonctl will use one socket per stream, so the number of
   184 concurrent hashtags is currently limited to 4 for "politeness".
   206 concurrent hashtags is currently limited to 4 for "politeness".
   185 
   207 
       
   208 It is also possible to send every stream event (notification or status) to
       
   209 an **external command**.  You can can even combine it with a customized theme.
       
   210 The contents will be sent to the standard input of this command:
       
   211 ``` sh
       
   212 madonctl stream --command gateway.sh --theme gateway
       
   213 ```
   186 
   214 
   187 (Almost) All commands have a **customizable output**:
   215 (Almost) All commands have a **customizable output**:
   188 ``` sh
   216 ``` sh
   189 % madonctl accounts show            # Display an account
   217 % madonctl accounts show            # Display an account
   190 % madonctl accounts show -o yaml    # Display an account, in yaml
   218 % madonctl accounts show -o yaml    # Display an account, in yaml