readme fixes
This commit is contained in:
parent
74e03fd6f9
commit
4523d6817f
5 changed files with 879 additions and 8 deletions
|
@ -989,7 +989,7 @@ https://stackoverflow.com/questions/1074212/how-can-i-see-the-raw-sql-queries-dj
|
||||||
|
|
||||||
<details><summary><i>Click to expand...</i></summary>
|
<details><summary><i>Click to expand...</i></summary>
|
||||||
|
|
||||||
```bash|
|
```bash
|
||||||
# docker-compose.yml:
|
# docker-compose.yml:
|
||||||
services:
|
services:
|
||||||
archivebox:
|
archivebox:
|
||||||
|
|
|
@ -517,8 +517,8 @@ def log_shell_welcome_msg():
|
||||||
from .cli import list_subcommands
|
from .cli import list_subcommands
|
||||||
|
|
||||||
print('{green}# ArchiveBox Imports{reset}'.format(**ANSI))
|
print('{green}# ArchiveBox Imports{reset}'.format(**ANSI))
|
||||||
print('{green}from core.models import Snapshot, User{reset}'.format(**ANSI))
|
print('{green}from archivebox.core.models import Snapshot, ArchiveResult, Tag, User{reset}'.format(**ANSI))
|
||||||
print('{green}from archivebox import *\n {}{reset}'.format("\n ".join(list_subcommands().keys()), **ANSI))
|
print('{green}from archivebox.cli import *\n {}{reset}'.format("\n ".join(list_subcommands().keys()), **ANSI))
|
||||||
print()
|
print()
|
||||||
print('[i] Welcome to the ArchiveBox Shell!')
|
print('[i] Welcome to the ArchiveBox Shell!')
|
||||||
print(' https://github.com/ArchiveBox/ArchiveBox/wiki/Usage#Shell-Usage')
|
print(' https://github.com/ArchiveBox/ArchiveBox/wiki/Usage#Shell-Usage')
|
||||||
|
|
|
@ -185,17 +185,19 @@ def dedupe_cron_jobs(cron: CronTab) -> CronTab:
|
||||||
|
|
||||||
|
|
||||||
class suppress_output(object):
|
class suppress_output(object):
|
||||||
'''
|
"""
|
||||||
A context manager for doing a "deep suppression" of stdout and stderr in
|
A context manager for doing a "deep suppression" of stdout and stderr in
|
||||||
Python, i.e. will suppress all print, even if the print originates in a
|
Python, i.e. will suppress all print, even if the print originates in a
|
||||||
compiled C/Fortran sub-function.
|
compiled C/Fortran sub-function.
|
||||||
This will not suppress raised exceptions, since exceptions are printed
|
|
||||||
|
This will not suppress raised exceptions, since exceptions are printed
|
||||||
to stderr just before a script exits, and after the context manager has
|
to stderr just before a script exits, and after the context manager has
|
||||||
exited (at least, I think that is why it lets exceptions through).
|
exited (at least, I think that is why it lets exceptions through).
|
||||||
|
|
||||||
with suppress_stdout_stderr():
|
with suppress_stdout_stderr():
|
||||||
rogue_function()
|
rogue_function()
|
||||||
'''
|
"""
|
||||||
|
|
||||||
def __init__(self, stdout=True, stderr=True):
|
def __init__(self, stdout=True, stderr=True):
|
||||||
# Open a pair of null files
|
# Open a pair of null files
|
||||||
# Save the actual stdout (1) and stderr (2) file descriptors.
|
# Save the actual stdout (1) and stderr (2) file descriptors.
|
||||||
|
|
2
archivebox/vendor/django-taggit
vendored
2
archivebox/vendor/django-taggit
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit 9aaac8ffffc9ac2030c503955e7d35ccc24ab26e
|
Subproject commit 3847b3cb32cd80448a1ef4c319951a2a4a6a971c
|
Loading…
Reference in a new issue