mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-04-26 01:26:00 +03:00
[GH-ISSUE #1190] Feature Request: Add ability to choose config options e.g. YOUTUBEDL_ARGS for a specific add command #2248
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#2248
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 @melyux on GitHub (Jul 22, 2023).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/1190
Type
What is the problem that your feature request solves
Some feeds, I may only care about archiving with the smallest media sizes. Other ones, I'd want to archive at maximum quality. Currently there's no way to choose different options for different things I add. This is especially important for scheduled pulls, where I can't go in and change the setting before each import and then change it back
Describe the ideal specific solution you'd want, and whether it fits into any broader scope of changes
A new flag for the
addcommand (--config) that would take a JSON list. These options would be set before this job and then set back to the old ones after the job.(Would only be a problem if multiple jobs are running at the same time... not sure if that's a possible scenario.)
What hacks or alternative solutions have you tried to solve the problem?
For manual adding, I can set and unset the config options manually before and after the job, respectively, but with scheduled jobs this is not possible as far as I know (and even if it were, I'd have to by hand keep track of the default options and any options I set in the ENV when unsetting).
How badly do you want this new feature?
@melyux commented on GitHub (Jul 22, 2023):
I was able to get this working, even in the scheduler crontab! Like this:
So you just put your configuration variables right after the
&&and right before the/usr/local/bin/archiveboxin the command. Another example:Can confirm that the env variables set in one line don't affect the other lines; they only apply to the single
addcommand on the line.This should probably be documented somewhere, but it works great. Would be nice to have an option for this on the web UI too.
@pirate commented on GitHub (Jul 27, 2023):
This is equivalent to doing
env SOME_VAR="some temp value" archivebox ...which is documented in a few places, including the wiki Configuration and CLI Usage pages.