Mix tasks: derive moduledoc from doc files

This commit is contained in:
rinpatch 2019-10-03 13:59:49 +03:00
parent 6baa037903
commit e00403af23
7 changed files with 7 additions and 0 deletions

View file

@ -13,6 +13,7 @@ defmodule Mix.Tasks.Pleroma.Database do
use Mix.Task
@shortdoc "A collection of database related tasks"
@moduledoc File.read!("docs/administration/CLI_tasks/database.md")
def run(["remove_embedded_objects" | args]) do
{options, [], []} =

View file

@ -2,6 +2,7 @@ defmodule Mix.Tasks.Pleroma.Digest do
use Mix.Task
@shortdoc "Manages digest emails"
@moduledoc File.read!("docs/administration/CLI_tasks/digest.md")
def run(["test", nickname | opts]) do
Mix.Pleroma.start_pleroma()

View file

@ -6,6 +6,7 @@ defmodule Mix.Tasks.Pleroma.Emoji do
use Mix.Task
@shortdoc "Manages emoji packs"
@moduledoc File.read!("docs/administration/CLI_tasks/emoji.md")
def run(["ls-packs" | args]) do
Application.ensure_all_started(:hackney)

View file

@ -7,6 +7,7 @@ defmodule Mix.Tasks.Pleroma.Instance do
import Mix.Pleroma
@shortdoc "Manages Pleroma instance"
@moduledoc File.read!("docs/administration/CLI_tasks/instance.md")
def run(["gen" | rest]) do
{options, [], []} =

View file

@ -9,6 +9,7 @@ defmodule Mix.Tasks.Pleroma.Relay do
alias Pleroma.Web.ActivityPub.Relay
@shortdoc "Manages remote relays"
@moduledoc File.read!("docs/administration/CLI_tasks/relay.md")
def run(["follow", target]) do
start_pleroma()

View file

@ -12,6 +12,7 @@ defmodule Mix.Tasks.Pleroma.Uploads do
@log_every 50
@shortdoc "Migrates uploads from local to remote storage"
@moduledoc File.read!("docs/administration/CLI_tasks/uploads.md")
def run(["migrate_local", target_uploader | args]) do
delete? = Enum.member?(args, "--delete")

View file

@ -10,6 +10,7 @@ defmodule Mix.Tasks.Pleroma.User do
alias Pleroma.Web.OAuth
@shortdoc "Manages Pleroma users"
@moduledoc File.read!("docs/administration/CLI_tasks/user.md")
def run(["new", nickname, email | rest]) do
{options, [], []} =