-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add WARC support #16
Comments
Hi and thanks for the awesome library! I was wondering if you were aware of this initiative: It has a CLI, so I guess it could be used as a backend for org-board. |
Hi there, thank you for the link! I've not heard of SingleFile but it seems like a good fit for this package. I will look into adding support for it. |
Just throwing this out there. I manage to get org-board to work with another program called Monolith that, similar to Singlefile, saves a webpage in one html file. You can probably adapt this for the cli of Singlefile too. Basically I override the org-board's (defun my/org-board-monolith-call (path directory args site)
"Like `org-board-wget-call' but call monolith instead."
(make-directory (file-name-as-directory directory))
(let* ((filename (url-filename (url-generic-parse-url (car site))))
(domain (file-name-nondirectory (url-domain (url-generic-parse-url (car site)))))
(name (if (string-empty-p filename)
domain
(if (string-match "/$" filename)
(file-name-base (directory-file-name filename))
filename)))
(output-directory-option
(expand-file-name
(concat (file-name-sans-extension (file-name-nondirectory name)) ".html")
(file-name-as-directory directory)))
(output-buffer-name "org-board-monolith-call")
(process-arg-list (append (list "org-board-monolith-process"
output-buffer-name
path)
org-board-wget-switches
(list "-o")
(list output-directory-option)
args
site))
(monolith-process (apply 'start-process process-arg-list)))
(if org-board-wget-show-buffer
(with-output-to-temp-buffer output-buffer-name
(set-process-sentinel
monolith-process
'org-board-wget-process-sentinel-function))
(set-process-sentinel
monolith-process
'org-board-wget-process-sentinel-function))
monolith-process))
(advice-add 'org-board-wget-call :override #'my/org-board-monolith-call) Then I put these in my init.el (setq org-board-wget-program (executable-find "monolith"))
(setq org-board-wget-switches '("-IevjF")) The switches will be passed to monolith |
@c1-g That works beautifully! Thanks. |
GNU wget supports the creation of WARC archives, since 2012. See announcement at https://lists.gnu.org/archive/html/info-gnu/2012-08/msg00002.html Given that org-board uses wget, can we get WARC support cheaply by using org-board's WGET_OPTIONS property? I've just started using org-board (and org-attachments generally). WARC and WGET_OPTIONS is something I'm keen to try soon. I'm skeptical about various other archive packages like SingleFile (which has already been forked...). I suppose it depends what you are looking for in a file format:
|
See https://lwn.net/Articles/766374/
The text was updated successfully, but these errors were encountered: