Rename option
This commit is contained in:
parent
e500bc4ad4
commit
c5c010bce0
@ -196,7 +196,7 @@ The following options are for the `archive` command specifically.
|
||||
- `json` (default)
|
||||
- `xml`
|
||||
- `yaml`
|
||||
- `--full-context`
|
||||
- `--comment-context`
|
||||
- This option will, instead of downloading an individual comment, download the submission that comment is a part of
|
||||
- May result in a longer run time as it retrieves much more data
|
||||
|
||||
|
@ -50,7 +50,7 @@ _downloader_options = [
|
||||
|
||||
_archiver_options = [
|
||||
click.option('--all-comments', is_flag=True, default=None),
|
||||
click.option('--full-context', is_flag=True, default=None),
|
||||
click.option('--comment-context', is_flag=True, default=None),
|
||||
click.option('-f', '--format', type=click.Choice(('xml', 'json', 'yaml')), default=None),
|
||||
]
|
||||
|
||||
|
@ -61,7 +61,7 @@ class Archiver(RedditConnector):
|
||||
raise ArchiverError(f'Factory failed to classify item of type {type(praw_item).__name__}')
|
||||
|
||||
def write_entry(self, praw_item: (praw.models.Submission, praw.models.Comment)):
|
||||
if self.args.full_context and isinstance(praw_item, praw.models.Comment):
|
||||
if self.args.comment_context and isinstance(praw_item, praw.models.Comment):
|
||||
logger.debug(f'Converting comment {praw_item.id} to submission {praw_item.submission.id}')
|
||||
praw_item = praw_item.submission
|
||||
archive_entry = self._pull_lever_entry_factory(praw_item)
|
||||
|
@ -43,7 +43,7 @@ class Configuration(Namespace):
|
||||
# Archiver-specific options
|
||||
self.all_comments = False
|
||||
self.format = 'json'
|
||||
self.full_context: bool = False
|
||||
self.comment_context: bool = False
|
||||
|
||||
def process_click_arguments(self, context: click.Context):
|
||||
for arg_key in context.params.keys():
|
||||
|
Loading…
Reference in New Issue
Block a user