aboutsummaryrefslogtreecommitdiffstats
path: root/nikola/plugins/command/status.py
diff options
context:
space:
mode:
authorLibravatarAgustin Henze <tin@sluc.org.ar>2015-08-26 07:57:23 -0300
committerLibravatarAgustin Henze <tin@sluc.org.ar>2015-08-26 07:57:23 -0300
commit70ceb871117ca811d63cb02671dc0fefc2700883 (patch)
tree846133ea39797d2cd1101cff2ac0818167353490 /nikola/plugins/command/status.py
parent8559119e2f45b7f6508282962c0430423bfab051 (diff)
parent787b97a4cb24330b36f11297c6d3a7a473a907d0 (diff)
Merge tag 'upstream/7.6.4'
Upstream version 7.6.4
Diffstat (limited to 'nikola/plugins/command/status.py')
-rw-r--r--nikola/plugins/command/status.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/nikola/plugins/command/status.py b/nikola/plugins/command/status.py
index b8a6a60..55e7f95 100644
--- a/nikola/plugins/command/status.py
+++ b/nikola/plugins/command/status.py
@@ -24,6 +24,8 @@
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+"""Display site status."""
+
from __future__ import print_function
import io
import os
@@ -33,8 +35,10 @@ from dateutil.tz import gettz, tzlocal
from nikola.plugin_categories import Command
-class CommandDeploy(Command):
- """ Site status. """
+class CommandStatus(Command):
+
+ """Display site status."""
+
name = "status"
doc_purpose = "display site status"
@@ -69,7 +73,7 @@ class CommandDeploy(Command):
]
def _execute(self, options, args):
-
+ """Display site status."""
self.site.scan_posts()
timestamp_path = os.path.join(self.site.config["CACHE_FOLDER"], "lastdeploy")
@@ -128,6 +132,7 @@ class CommandDeploy(Command):
print("{0} posts in total, {1} scheduled, and {2} drafts.".format(posts_count, len(posts_scheduled), len(posts_drafts)))
def human_time(self, dt):
+ """Translate time into a human-friendly representation."""
days = dt.days
hours = dt.seconds / 60 // 60
minutes = dt.seconds / 60 - (hours * 60)