mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-04-25 17:16:00 +03:00
[GH-ISSUE #626] Bugfix: --overwrite flag ignores disabled outputs #3408
Labels
No labels
expected: maybe someday
expected: next release
expected: release after next
expected: unlikely unless contributed
good first ticket
help wanted
pull-request
scope: all users
scope: windows users
size: easy
size: hard
size: medium
size: medium
status: backlog
status: blocked
status: done
status: idea-phase
status: needs followup
status: wip
status: wontfix
touches: API/CLI/Spec
touches: configuration
touches: data/schema/architecture
touches: dependencies/packaging
touches: docs
touches: js
touches: views/replayers/html/css
why: correctness
why: functionality
why: performance
why: security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ArchiveBox#3408
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @thedanbob on GitHub (Jan 20, 2021).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/626
Describe the bug
archivebox add --overwrite <url>saves to every output method, including ones the user has disabled.Steps to reproduce
SAVE_<output>option to Falsearchivebox add http://example.comskips that outputarchivebox add --overwrite http://example.comdoesn't skip that outputI believe the problem is here:
github.com/ArchiveBox/ArchiveBox@befac97f52/archivebox/extractors/init.py#L105It should be something like
@pirate commented on GitHub (Jan 20, 2021):
Unfortunately the solution isn't trivial because the
should_runfunctions only return True/False and don't distinguish between "skipping extractor because it's disabled" vs "skipping extractor because existing output is present".We'll probably have to re-architect the
should_runfunctions into two separate functionsis_enabled()andoutput_exists().Also have to make sure both
env SAVE_MEDIA=True archivebox add --overwrite ...andarchivebox add --overwrite --extract=mediaboth work as expected.@thedanbob commented on GitHub (Jan 21, 2021):
What about passing
overwriteinto theshould_save_functions:github.com/thedanbob/ArchiveBox@5420903102@pirate commented on GitHub (Jan 22, 2021):
Merged and fixed, thanks @thedanbob!