From c544f510d26377684aefe8a27b484ee22bbd4f69 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Fri, 3 Mar 2017 11:55:58 +0100 Subject: CLI: install language https://github.com/FreshRSS/FreshRSS/issues/1445#issuecomment-283908468 --- cli/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cli/README.md') diff --git a/cli/README.md b/cli/README.md index 5662e2d83..cbab699dc 100644 --- a/cli/README.md +++ b/cli/README.md @@ -32,10 +32,11 @@ Options in parenthesis are optional. ```sh cd /usr/share/FreshRSS -./cli/do-install.php --default_user admin ( --auth_type form --environment production --base_url https://rss.example.net/ --title FreshRSS --allow_anonymous --api_enabled --db-type mysql --db-host localhost:3306 --db-user freshrss --db-password dbPassword123 --db-base freshrss --db-prefix freshrss ) +./cli/do-install.php --default_user admin ( --auth_type form --environment production --base_url https://rss.example.net/ --language en --title FreshRSS --allow_anonymous --api_enabled --db-type mysql --db-host localhost:3306 --db-user freshrss --db-password dbPassword123 --db-base freshrss --db-prefix freshrss ) # --auth_type can be: 'form' (default), 'http_auth' (using the Web server access control), 'none' (dangerous) # --db-type can be: 'sqlite' (default), 'mysql' (MySQL or MariaDB), 'pgsql' (PostgreSQL) # --environment can be: 'production' (default), 'development' (for additional log messages) +# --language can be: 'en' (default), 'fr', or one of the [supported languages](../app/i18n/) # --db-prefix is an optional prefix in front of the names of the tables. We suggest using 'freshrss_' # This command does not create the default user. Do that with ./cli/create-user.php -- cgit v1.2.3 From ada94465e62d5809303afffc636fdae87aff2738 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Fri, 3 Mar 2017 23:01:33 +0100 Subject: CLI: More infos in user-info https://github.com/FreshRSS/FreshRSS/issues/1449#issuecomment-283927614 --- cli/README.md | 3 ++- cli/user-info.php | 16 +++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) (limited to 'cli/README.md') diff --git a/cli/README.md b/cli/README.md index cbab699dc..5434d1964 100644 --- a/cli/README.md +++ b/cli/README.md @@ -63,7 +63,8 @@ cd /usr/share/FreshRSS ./cli/user-info.php -h --user username # -h is to use a human-readable format # --user can be a username, or '*' to loop on all users -# Returns a * if the user is admin, the name of the user, the date/time of last action, and the size occupied +# Returns a * if the user is admin, the name of the user, the date/time of last action, the size occupied, +# and the number of: feeds, read articles, unread articles, and favourites ``` diff --git a/cli/user-info.php b/cli/user-info.php index dd38e6c7f..aa3e239b8 100755 --- a/cli/user-info.php +++ b/cli/user-info.php @@ -14,22 +14,36 @@ $users = $options['user'] === '*' ? listUsers() : array($options['user']); foreach ($users as $username) { $username = cliInitUser($username); + echo $username === FreshRSS_Context::$system_conf->default_user ? '*' : ' ', "\t"; + $catDAO = new FreshRSS_CategoryDAO(); + $feedDAO = FreshRSS_Factory::createFeedDao($username); $entryDAO = FreshRSS_Factory::createEntryDao($username); - echo $username === FreshRSS_Context::$system_conf->default_user ? '*' : ' ', "\t"; + $nbEntries = $entryDAO->countUnreadRead(); + $nbFavorites = $entryDAO->countUnreadReadFavorites(); if (isset($options['h'])) { //Human format echo $username, "\t", date('c', FreshRSS_UserDAO::mtime($username)), "\t", format_bytes($entryDAO->size()), "\t", + $catDAO->count(), " categories\t", + count($feedDAO->listFeedsIds()), " feeds\t", + $nbEntries['read'], " reads\t", + $nbEntries['unread'], " unreads\t", + $nbFavorites['all'], " favourites\t", "\n"; } else { echo $username, "\t", FreshRSS_UserDAO::mtime($username), "\t", $entryDAO->size(), "\t", + $catDAO->count(), "\t", + count($feedDAO->listFeedsIds()), "\t", + $nbEntries['read'], "\t", + $nbEntries['unread'], "\t", + $nbFavorites['all'], "\t", "\n"; } } -- cgit v1.2.3