Skip to content

Commit f2078d8

Browse files
tec: Improve the look of CLI usage command
1 parent 32837b1 commit f2078d8

File tree

1 file changed

+39
-32
lines changed

1 file changed

+39
-32
lines changed

src/cli/System.php

Lines changed: 39 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -15,38 +15,45 @@ class System
1515
{
1616
public function usage()
1717
{
18-
$usage = 'Usage: php ./cli --request REQUEST [-pKEY=VALUE]...' . "\n\n";
19-
$usage .= 'REQUEST can be one of the following:' . "\n";
20-
$usage .= ' / Show this help' . "\n";
21-
$usage .= ' /database/status Return the status of the DB connection' . "\n";
22-
$usage .= ' /feeds List the feeds' . "\n";
23-
$usage .= ' /feeds/add Add a feed' . "\n";
24-
$usage .= ' -purl=URL where URL is the link to the feed' . "\n";
25-
$usage .= ' /feeds/sync Synchronize a feed' . "\n";
26-
$usage .= ' -pid=ID where ID is the id of the feed' . "\n";
27-
$usage .= ' [-pnocache=BOOL] Indicates if the cache should be ignored (default is false)' . "\n";
28-
$usage .= ' /jobs List the jobs' . "\n";
29-
$usage .= ' /jobs/clear Delete all the jobs' . "\n";
30-
$usage .= ' /jobs/run Execute one waiting job' . "\n";
31-
$usage .= ' /jobs/watch Wait and execute jobs' . "\n";
32-
$usage .= ' /links/refresh Refresh the oldest links (only illustration images)' . "\n";
33-
$usage .= ' [-pnumber=NUMBER] where NUMBER is the number of links to refresh (default is 10)' . "\n";
34-
$usage .= ' /system/rollback Reverse the last migration' . "\n";
35-
$usage .= ' [-psteps=NUMBER] where NUMBER is the number of rollbacks to apply (default is 1)' . "\n";
36-
$usage .= ' /system/secret Generate a secure key to be used as APP_SECRET_KEY' . "\n";
37-
$usage .= ' /system/setup Initialize or update the system' . "\n";
38-
$usage .= ' /topics List the topics' . "\n";
39-
$usage .= ' /topics/create Create a topic' . "\n";
40-
$usage .= ' -plabel=TEXT where TEXT is a 21-chars max string' . "\n";
41-
$usage .= ' /topics/delete Delete a topic' . "\n";
42-
$usage .= ' -pid=ID where ID is the id of the topic to delete' . "\n";
43-
$usage .= ' /users List all the users' . "\n";
44-
$usage .= ' /users/clean Clean not validated users created NUMBER months ago' . "\n";
45-
$usage .= ' [-psince=NUMBER] where NUMBER is the number of months, greater than 0 (default is 1)' . "\n";
46-
$usage .= ' /users/create Create a user' . "\n";
47-
$usage .= ' -pemail=EMAIL' . "\n";
48-
$usage .= ' -ppassword=PASSWORD' . "\n";
49-
$usage .= ' -pusername=USERNAME where USERNAME is a 50-chars max string';
18+
$usage = "Usage: php ./cli --request REQUEST [-pKEY=VALUE]...\n\n";
19+
$usage .= "REQUEST can be one of the following:\n";
20+
$usage .= " / Show this help\n";
21+
$usage .= "\n";
22+
$usage .= " /database/status Return the status of the DB connection\n";
23+
$usage .= "\n";
24+
$usage .= " /feeds List the feeds\n";
25+
$usage .= " /feeds/add Add a feed\n";
26+
$usage .= " -purl=URL where URL is the link to the feed\n";
27+
$usage .= " /feeds/sync Synchronize a feed\n";
28+
$usage .= " -pid=ID where ID is the id of the feed\n";
29+
$usage .= " [-pnocache=BOOL] Indicates if the cache should be ignored (default is false)\n";
30+
$usage .= "\n";
31+
$usage .= " /jobs List the jobs\n";
32+
$usage .= " /jobs/clear Delete all the jobs\n";
33+
$usage .= " /jobs/run Execute one waiting job\n";
34+
$usage .= " /jobs/watch Wait and execute jobs\n";
35+
$usage .= "\n";
36+
$usage .= " /links/refresh Refresh the oldest links (only illustration images)\n";
37+
$usage .= " [-pnumber=NUMBER] where NUMBER is the number of links to refresh (default is 10)\n";
38+
$usage .= "\n";
39+
$usage .= " /system/rollback Reverse the last migration\n";
40+
$usage .= " [-psteps=NUMBER] where NUMBER is the number of rollbacks to apply (default is 1)\n";
41+
$usage .= " /system/secret Generate a secure key to be used as APP_SECRET_KEY\n";
42+
$usage .= " /system/setup Initialize or update the system\n";
43+
$usage .= "\n";
44+
$usage .= " /topics List the topics\n";
45+
$usage .= " /topics/create Create a topic\n";
46+
$usage .= " -plabel=TEXT where TEXT is a 21-chars max string\n";
47+
$usage .= " /topics/delete Delete a topic\n";
48+
$usage .= " -pid=ID where ID is the id of the topic to delete\n";
49+
$usage .= "\n";
50+
$usage .= " /users List all the users\n";
51+
$usage .= " /users/clean Clean not validated users created NUMBER months ago\n";
52+
$usage .= " [-psince=NUMBER] where NUMBER is the number of months, greater than 0 (default is 1)\n";
53+
$usage .= " /users/create Create a user\n";
54+
$usage .= " -pemail=EMAIL\n";
55+
$usage .= " -ppassword=PASSWORD\n";
56+
$usage .= " -pusername=USERNAME where USERNAME is a 50-chars max string";
5057

5158
return Response::text(200, $usage);
5259
}

0 commit comments

Comments
 (0)