mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-04-25 17:16:00 +03:00
[GH-ISSUE #544] Question / Bug : What's the intended use of --index-only on the update command ? #1854
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#1854
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 @jdcaballerov on GitHub (Nov 21, 2020).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/544
The update command code path starts in
archivebox_update.pycalling theupdatefunction as follows:No capture of the return value. If
--index-onlyis passed theupdatefunction inarchivbox.main.pyis executed as follows:Then nothing is happening with the output of this codepath. What's the current or intended use?
@pirate commented on GitHub (Nov 21, 2020):
It's supposed to only write the json and HTML index files for the links without running any extractors.
@cdvv7788 commented on GitHub (Nov 21, 2020):
@pirate this flag is for updating the index-only, not for generating the legacy indexes. I need to review if something happened with it during the migration.
@pirate commented on GitHub (Nov 22, 2020):
Correct, by index files I meant it should only update the
data/archive/<timestamp/index.{json,html}files (which we are still using and plan to keep), not the old main index indata/index.{json,html}. The--index-onlyflag is useful to update those files because sometimes when we change the format or HTML/CSS styling of the link details pages in an update it doesn't update those files automatically.archivebox update --index-onlyis a way to manually update those detail indexes to the latest styling / format.@cdvv7788 commented on GitHub (Dec 5, 2020):
@pirate
github.com/ArchiveBox/ArchiveBox@1b8abc0961/archivebox/main.py (L451-)#L488 I think that the mentioned behavior is not what was originally intended. This process was aborting the execution of theupdatefunction if--index-onlywas present after writing to the main index, not to the detail in every archive.I will refactor this to behave as you described.