Print to the (rich) console, rather than directly

This commit is contained in:
MinchinWeb 2021-07-09 09:55:48 -06:00
commit 1cd7dd6a28

View file

@ -163,7 +163,7 @@ 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,
@ -426,7 +426,7 @@ 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)
@ -446,7 +446,7 @@ 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()