mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Print to the (rich) console, rather than directly
This commit is contained in:
parent
bc21922cf2
commit
1cd7dd6a28
1 changed files with 13 additions and 13 deletions
|
|
@ -163,15 +163,15 @@ class Pelican:
|
||||||
'draft page',
|
'draft page',
|
||||||
'draft pages')
|
'draft pages')
|
||||||
|
|
||||||
print('Done: Processed {}, {}, {}, {}, {} and {} in {:.2f} seconds.'
|
console.print('Done: Processed {}, {}, {}, {}, {} and {} in {:.2f} seconds.'
|
||||||
.format(
|
.format(
|
||||||
pluralized_articles,
|
pluralized_articles,
|
||||||
pluralized_drafts,
|
pluralized_drafts,
|
||||||
pluralized_hidden_articles,
|
pluralized_hidden_articles,
|
||||||
pluralized_pages,
|
pluralized_pages,
|
||||||
pluralized_hidden_pages,
|
pluralized_hidden_pages,
|
||||||
pluralized_draft_pages,
|
pluralized_draft_pages,
|
||||||
time.time() - start_time))
|
time.time() - start_time))
|
||||||
|
|
||||||
def _get_generator_classes(self):
|
def _get_generator_classes(self):
|
||||||
discovered_generators = [
|
discovered_generators = [
|
||||||
|
|
@ -426,8 +426,8 @@ def get_instance(args):
|
||||||
|
|
||||||
|
|
||||||
def autoreload(args, excqueue=None):
|
def autoreload(args, excqueue=None):
|
||||||
print(' --- AutoReload Mode: Monitoring `content`, `theme` and'
|
console.print(' --- AutoReload Mode: Monitoring `content`, `theme` and'
|
||||||
' `settings` for changes. ---')
|
' `settings` for changes. ---')
|
||||||
pelican, settings = get_instance(args)
|
pelican, settings = get_instance(args)
|
||||||
watcher = FileSystemWatcher(args.settings, Readers, settings)
|
watcher = FileSystemWatcher(args.settings, Readers, settings)
|
||||||
sleep = False
|
sleep = False
|
||||||
|
|
@ -446,8 +446,8 @@ def autoreload(args, excqueue=None):
|
||||||
watcher.update_watchers(settings)
|
watcher.update_watchers(settings)
|
||||||
|
|
||||||
if any(modified.values()):
|
if any(modified.values()):
|
||||||
print('\n-> Modified: {}. re-generating...'.format(
|
console.print('\n-> Modified: {}. re-generating...'.format(
|
||||||
', '.join(k for k, v in modified.items() if v)))
|
', '.join(k for k, v in modified.items() if v)))
|
||||||
pelican.run()
|
pelican.run()
|
||||||
|
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue