lib/mix/tasks: Add remaining documentation for mix tasks

This commit is contained in:
Haelwenn (lanodan) Monnier 2018-11-08 15:21:09 +01:00
parent d1a7a9fd24
commit 64c0289893
No known key found for this signature in database
GPG key ID: D5B7A8E43C997DEE
5 changed files with 36 additions and 4 deletions

View file

@ -2,7 +2,13 @@ defmodule Mix.Tasks.GeneratePasswordReset do
use Mix.Task use Mix.Task
alias Pleroma.User alias Pleroma.User
@shortdoc "Generate password reset link for user" @doc """
Generate password reset link for user
Usage: ``mix generate_password_reset <nickname>``
Example: ``mix generate_password_reset lain``
"""
def run([nickname]) do def run([nickname]) do
Mix.Task.run("app.start") Mix.Task.run("app.start")

View file

@ -2,7 +2,13 @@ defmodule Mix.Tasks.ReactivateUser do
use Mix.Task use Mix.Task
alias Pleroma.User alias Pleroma.User
@shortdoc "Reactivate a user" @doc """
Reactivate a user
Usage: ``mix reactivate_user <nickname>``
Example: ``mix reactivate_user lain``
"""
def run([nickname]) do def run([nickname]) do
Mix.Task.run("app.start") Mix.Task.run("app.start")

View file

@ -4,6 +4,13 @@ defmodule Mix.Tasks.RelayFollow do
alias Pleroma.Web.ActivityPub.Relay alias Pleroma.Web.ActivityPub.Relay
@shortdoc "Follows a remote relay" @shortdoc "Follows a remote relay"
@doc """
Follows a remote relay
Usage: ``mix relay_follow <relay_url>``
Example: ``mix relay_follow https://example.org/relay``
"""
def run([target]) do def run([target]) do
Mix.Task.run("app.start") Mix.Task.run("app.start")

View file

@ -3,7 +3,13 @@ defmodule Mix.Tasks.RelayUnfollow do
require Logger require Logger
alias Pleroma.Web.ActivityPub.Relay alias Pleroma.Web.ActivityPub.Relay
@shortdoc "Follows a remote relay" @doc """
Unfollows a remote relay
Usage: ``mix relay_follow <relay_url>``
Example: ``mix relay_follow https://example.org/relay``
"""
def run([target]) do def run([target]) do
Mix.Task.run("app.start") Mix.Task.run("app.start")

View file

@ -3,7 +3,14 @@ defmodule Mix.Tasks.UnsubscribeUser do
alias Pleroma.{User, Repo} alias Pleroma.{User, Repo}
require Logger require Logger
@shortdoc "Unsubscribe all users from a target and then deactivate them" @doc """
Deactivate and Unsubscribe local users from a user
Usage: ``mix unsubscribe_user <nickname>``
Example: ``mix unsubscribe_user lain``
"""
def run([nickname]) do
def run([nickname]) do def run([nickname]) do
Mix.Task.run("app.start") Mix.Task.run("app.start")