[GH-ISSUE #1225] Feature Request: Support passing more SINGLEFILE_ARGS #3772

Closed
opened 2026-03-15 00:24:18 +03:00 by kerem · 3 comments
Owner

Originally created by @sasasqt on GitHub (Sep 1, 2023).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/1225

Type

  • General question or discussion
  • Propose a brand new feature
  • Request modification of existing behavior or design

What is the problem that your feature request solves

Describe the ideal specific solution you'd want, and whether it fits into any broader scope of changes

singlefile's option is highly configurable, i propose to expose the singlefile_args=/path/to/singlefile.json similar to youtubedl_args, so people can export their settings from the PC and upload it to the server.
the json file needs to be parsed and feed into the singlefile cli as args:
github.com/gildas-lormeau/single-file-cli@9841ef47c7/single-file-cli-api.js (L95)

What hacks or alternative solutions have you tried to solve the problem?

How badly do you want this new feature?

  • It's an urgent deal-breaker, I can't live without it
  • It's important to add it in the near-mid term future
  • It would be nice to have eventually

  • I'm willing to contribute dev time / money to fix this issue
  • I like ArchiveBox so far / would recommend it to a friend
  • I've had a lot of difficulty getting ArchiveBox set up
Originally created by @sasasqt on GitHub (Sep 1, 2023). Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/1225 <!-- Please fill out the following information, feel free to delete sections if they're not applicable or if long issue templates annoy you :) --> ## Type - [ ] General question or discussion - [x] Propose a brand new feature - [ ] Request modification of existing behavior or design ## What is the problem that your feature request solves <!-- e.g. I need to be able to archive spanish and french subtitle files from a particular <example.com> movie site that's going down soon. --> ## Describe the ideal specific solution you'd want, and whether it fits into any broader scope of changes <!-- e.g. I specifically need a new archive method to look for multilingual subtitle files related to pages. The bigger picture solution is the ability for custom user scripts to be run in a puppeteer context during archiving. --> singlefile's option is highly configurable, i propose to expose the _singlefile_args=/path/to/singlefile.json_ similar to _youtubedl_args_, so people can export their settings from the PC and upload it to the server. the json file needs to be parsed and feed into the singlefile cli as args: https://github.com/gildas-lormeau/single-file-cli/blob/9841ef47c721c8f24f51e205fef0b7dd2fe5506e/single-file-cli-api.js#L95 ## What hacks or alternative solutions have you tried to solve the problem? <!-- A clear and concise description of any alternative solutions, workarounds, or other software you've considered using to fix the problem. --> ## How badly do you want this new feature? - [ ] It's an urgent deal-breaker, I can't live without it - [x] It's important to add it in the near-mid term future - [x] It would be nice to have eventually --- - [ ] I'm willing to contribute [dev time](https://github.com/ArchiveBox/ArchiveBox#archivebox-development) / [money](https://github.com/sponsors/pirate) to fix this issue - [ ] I like ArchiveBox so far / would recommend it to a friend - [ ] I've had a lot of difficulty getting ArchiveBox set up
Author
Owner

@sasasqt commented on GitHub (Sep 1, 2023):

singlefile exported option be like:

{
  "profiles": {
    "__Default_Settings__": {
      "acceptHeaders": {
        "audio": "audio/webm,audio/ogg,audio/wav,audio/*;q=0.9,application/ogg;q=0.7,video/*;q=0.6,*/*;q=0.5",
        "document": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
        "font": "application/font-woff2;q=1.0,application/font-woff;q=0.9,*/*;q=0.8",
        "image": "image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8",
        "script": "*/*",
        "stylesheet": "text/css,*/*;q=0.1",
        "video": "video/webm,video/ogg,video/*;q=0.9,application/ogg;q=0.7,audio/*;q=0.6,*/*;q=0.5"
      },
      "addProof": false,
      "allowedBookmarkFolders": [
        ""
      ],
      "applySystemTheme": true,
      "autoClose": false,
      "autoOpenEditor": false,
      "autoSaveDelay": 1,
      "autoSaveDiscard": false,
      "autoSaveExternalSave": false,
      "autoSaveLoad": false,
      "autoSaveLoadOrUnload": true,
      "autoSaveRemove": false,
      "autoSaveRepeat": false,
      "autoSaveRepeatDelay": 10,
      "autoSaveUnload": false,
      "backgroundSave": true,
      "blockAudios": true,
      "blockFonts": false,
      "blockImages": false,
      "blockMixedContent": false,
      "blockScripts": false,
      "blockStylesheets": false,
      "blockVideos": false,
      "browserActionMenuEnabled": true,
      "compressCSS": false,
      "compressHTML": true,
      "confirmFilename": false,
      "confirmInfobarContent": false,
      "contextMenuEnabled": true,
      "defaultEditorMode": "normal",
      "displayInfobar": true,
      "displayInfobarInEditor": false,
      "displayStats": false,
      "filenameConflictAction": "uniquify",
      "filenameMaxLength": "192",
      "filenameMaxLengthUnit": "bytes",
      "filenameReplacedCharacters": [
        "~",
        "+",
        "\\\\",
        "?",
        "%",
        "*",
        ":",
        "|",
        "\"",
        "<",
        ">",
        "\u0000-\u001f",
        ""
      ],
      "filenameReplacementCharacter": "_",
      "filenameTemplate": "{page-title} ({date-locale} {time-locale}).html",
      "forceWebAuthFlow": false,
      "githubBranch": "main",
      "githubRepository": "SingleFile-Archives",
      "githubToken": "",
      "githubUser": "",
      "groupDuplicateImages": true,
      "ignoredBookmarkFolders": [
        ""
      ],
      "includeBOM": false,
      "includeInfobar": false,
      "infobarTemplate": "",
      "insertMetaCSP": true,
      "insertMetaNoIndex": false,
      "insertSingleFileComment": true,
      "loadDeferredImages": true,
      "loadDeferredImagesBeforeFrames": false,
      "loadDeferredImagesBlockCookies": false,
      "loadDeferredImagesBlockStorage": false,
      "loadDeferredImagesDispatchScrollEvent": false,
      "loadDeferredImagesKeepZoomLevel": false,
      "loadDeferredImagesMaxIdleTime": 1500,
      "logsEnabled": true,
      "maxResourceSize": 10,
      "maxResourceSizeEnabled": false,
      "maxSizeDuplicateImages": 524288,
      "moveStylesInHead": false,
      "networkTimeout": 0,
      "openEditor": false,
      "openSavedPage": false,
      "passReferrerOnError": false,
      "progressBarEnabled": true,
      "removeAlternativeFonts": true,
      "removeAlternativeImages": true,
      "removeAlternativeMedias": true,
      "removeFrames": false,
      "removeHiddenElements": true,
      "removeSavedDate": false,
      "removeUnusedFonts": true,
      "removeUnusedStyles": true,
      "replaceBookmarkURL": true,
      "replaceEmojisInFilename": false,
      "resolveFragmentIdentifierURLs": false,
      "saveCreatedBookmarks": false,
      "saveFavicon": true,
      "saveOriginalURLs": false,
      "saveRawPage": false,
      "saveToClipboard": false,
      "saveToGDrive": false,
      "saveToGitHub": false,
      "saveWithCompanion": false,
      "saveWithWebDAV": false,
      "shadowEnabled": true,
      "tabMenuEnabled": true,
      "userScriptEnabled": false,
      "warnUnsavedPage": true,
      "webDAVPassword": "",
      "webDAVURL": "",
      "webDAVUser": "",
      "woleetKey": ""
    }
  },
  "rules": [
    {
      "autoSaveProfile": "__Disabled_Settings__",
      "profile": "__Default_Settings__",
      "url": "file:"
    }
  ],
  "maxParallelWorkers": 16,
  "processInForeground": false
}
<!-- gh-comment-id:1702350732 --> @sasasqt commented on GitHub (Sep 1, 2023): singlefile exported option be like: ``` { "profiles": { "__Default_Settings__": { "acceptHeaders": { "audio": "audio/webm,audio/ogg,audio/wav,audio/*;q=0.9,application/ogg;q=0.7,video/*;q=0.6,*/*;q=0.5", "document": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "font": "application/font-woff2;q=1.0,application/font-woff;q=0.9,*/*;q=0.8", "image": "image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8", "script": "*/*", "stylesheet": "text/css,*/*;q=0.1", "video": "video/webm,video/ogg,video/*;q=0.9,application/ogg;q=0.7,audio/*;q=0.6,*/*;q=0.5" }, "addProof": false, "allowedBookmarkFolders": [ "" ], "applySystemTheme": true, "autoClose": false, "autoOpenEditor": false, "autoSaveDelay": 1, "autoSaveDiscard": false, "autoSaveExternalSave": false, "autoSaveLoad": false, "autoSaveLoadOrUnload": true, "autoSaveRemove": false, "autoSaveRepeat": false, "autoSaveRepeatDelay": 10, "autoSaveUnload": false, "backgroundSave": true, "blockAudios": true, "blockFonts": false, "blockImages": false, "blockMixedContent": false, "blockScripts": false, "blockStylesheets": false, "blockVideos": false, "browserActionMenuEnabled": true, "compressCSS": false, "compressHTML": true, "confirmFilename": false, "confirmInfobarContent": false, "contextMenuEnabled": true, "defaultEditorMode": "normal", "displayInfobar": true, "displayInfobarInEditor": false, "displayStats": false, "filenameConflictAction": "uniquify", "filenameMaxLength": "192", "filenameMaxLengthUnit": "bytes", "filenameReplacedCharacters": [ "~", "+", "\\\\", "?", "%", "*", ":", "|", "\"", "<", ">", "\u0000-\u001f", "" ], "filenameReplacementCharacter": "_", "filenameTemplate": "{page-title} ({date-locale} {time-locale}).html", "forceWebAuthFlow": false, "githubBranch": "main", "githubRepository": "SingleFile-Archives", "githubToken": "", "githubUser": "", "groupDuplicateImages": true, "ignoredBookmarkFolders": [ "" ], "includeBOM": false, "includeInfobar": false, "infobarTemplate": "", "insertMetaCSP": true, "insertMetaNoIndex": false, "insertSingleFileComment": true, "loadDeferredImages": true, "loadDeferredImagesBeforeFrames": false, "loadDeferredImagesBlockCookies": false, "loadDeferredImagesBlockStorage": false, "loadDeferredImagesDispatchScrollEvent": false, "loadDeferredImagesKeepZoomLevel": false, "loadDeferredImagesMaxIdleTime": 1500, "logsEnabled": true, "maxResourceSize": 10, "maxResourceSizeEnabled": false, "maxSizeDuplicateImages": 524288, "moveStylesInHead": false, "networkTimeout": 0, "openEditor": false, "openSavedPage": false, "passReferrerOnError": false, "progressBarEnabled": true, "removeAlternativeFonts": true, "removeAlternativeImages": true, "removeAlternativeMedias": true, "removeFrames": false, "removeHiddenElements": true, "removeSavedDate": false, "removeUnusedFonts": true, "removeUnusedStyles": true, "replaceBookmarkURL": true, "replaceEmojisInFilename": false, "resolveFragmentIdentifierURLs": false, "saveCreatedBookmarks": false, "saveFavicon": true, "saveOriginalURLs": false, "saveRawPage": false, "saveToClipboard": false, "saveToGDrive": false, "saveToGitHub": false, "saveWithCompanion": false, "saveWithWebDAV": false, "shadowEnabled": true, "tabMenuEnabled": true, "userScriptEnabled": false, "warnUnsavedPage": true, "webDAVPassword": "", "webDAVURL": "", "webDAVUser": "", "woleetKey": "" } }, "rules": [ { "autoSaveProfile": "__Disabled_Settings__", "profile": "__Default_Settings__", "url": "file:" } ], "maxParallelWorkers": 16, "processInForeground": false } ```
Author
Owner

@pirate commented on GitHub (Sep 4, 2023):

I like the idea of being able to pass more args through to singlefile, but I think I'd stick to lists of CLI args (even if they're really long quoted json strings), because it's one less filesystem location have to support & document.

<!-- gh-comment-id:1704586213 --> @pirate commented on GitHub (Sep 4, 2023): I like the idea of being able to pass more args through to singlefile, but I think I'd stick to lists of CLI args (even if they're really long quoted json strings), because it's one less filesystem location have to support & document.
Author
Owner

@pirate commented on GitHub (Jan 19, 2024):

This is released in v0.7.2!

<!-- gh-comment-id:1899752498 --> @pirate commented on GitHub (Jan 19, 2024): This is released in v0.7.2!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ArchiveBox#3772
No description provided.