1
0
Fork 0
elfeed-export/README.org

106 lines
4.3 KiB
Org Mode
Raw Normal View History

2024-08-03 20:11:33 +00:00
#+title: elfeed-export
#+author: Bram Schoenmakers
#+export_file_name: elfeed-export.info
#+property: header-args:elisp :results none :exports code
* Introduction
/elfeed-export/ exports your feed entries from the [[https://github.com/skeeto/elfeed][elfeed RSS reader for Emacs]].
The following export formats are currently supported:
2024-08-03 20:19:53 +00:00
| Format | Command |
|-------------------------+----------------------------|
| JSON | ~elfeed-export-to-json-file~ |
| Emacs Lisp Data (*.eld) | ~elfeed-export-to-lisp-file~ |
2024-08-03 20:11:33 +00:00
Please note there is *no import functionality*. The goal is to have a (more or less) readable copy of your database. For a real backup, make a backup of ~/.elfeed instead.
2024-08-03 20:11:33 +00:00
* Installation
/elfeed-export/ is not on MELPA, therefore clone the directory first:
: git clone https://codeberg.org/bram85/elfeed-export.git
Then configure the package as follows:
#+begin_src elisp
(use-package elfeed-export
:ensure nil
:load-path "/path/to/elfeed-export")
#+end_src
* Configuration
The following table shows the customizable settings for /elfeed-export/:
#+begin_src emacs-lisp :exports results :results table :colnames '("Custom variable" "Description")
(let ((rows))
(mapatoms
(lambda (symbol)
(when (and (string-match "\\_<elfeed-export"
(symbol-name symbol))
(custom-variable-p symbol))
(push `(,symbol
,(car
(split-string
(or (get (indirect-variable symbol)
'variable-documentation)
(get symbol 'variable-documentation)
"")
"\n")))
rows))))
(sort rows (lambda (item1 item2)
(string< (car item1) (car item2)))))
#+end_src
#+RESULTS:
| Custom variable | Description |
|----------------------------+----------------------------------------------------------------------|
| elfeed-export-exclude-tags | Do not export entries that have any of these tags. |
| elfeed-export-fields | Which fields to export per entry and a function to obtain the value. |
| elfeed-export-include-tags | Export entries that have any of these tags. |
| elfeed-export-predicates | Entries that match all of these predicates are exported. |
2024-08-04 07:06:02 +00:00
** Customize export fields
Which fields are exported can be configured with the ~elfeed-export-fields~ variable. You may want to remove certain fields from the default, or add new fields. The variable is an alist, each element has a symbol in the car for the column name, and a function in the cdr to retrieve a value.
2024-08-04 07:10:09 +00:00
Some elfeed extensions supplement the elfeed index with their data, such as [[https://github.com/sp1ff/elfeed-score][elfeed-score]]. To add a field to the export which shows the score per entry, add the following in your configuration file:
2024-08-04 07:06:02 +00:00
#+begin_src elisp
(add-to-list 'elfeed-export-fields
'(score . elfeed-score-scoring-get-score-from-entry)
t)
#+end_src
2024-08-04 07:10:09 +00:00
Likewise, if you use [[https://github.com/rnadler/elfeed-curate][elfeed-curate]], you can export annotations as follows:
2024-08-04 07:06:02 +00:00
#+begin_src elisp
(add-to-list 'elfeed-export-fields
'(annotation . elfeed-curate-get-entry-annotation)
t)
#+end_src
** Customize entry filters
The variable ~elfeed-export-predicates~ is a list of predicates applied to each entry. An entry that matches all predicates makes it into the export. Each predicate takes one argument: the entry object.
2024-08-04 07:06:02 +00:00
By default, there is a tag-based predicate, which is configured by the variables ~elfeed-export-include-tags~ and ~elfeed-export-exclude-tags~. They're a list of symbols that represent a tag. E.g., to export unread items only, use:
#+begin_src elisp
(add-to-list 'elfeed-export-include-tags 'unread)
#+end_src
By default, items tagged as =noexport= are omitted.
2024-08-03 20:11:33 +00:00
** COMMENT Attribution :noexport:
The code to generate the table of configuration items was inspired by an idea of [[https://xenodium.com/generating-elisp-org-docs/][Álvaro Ramírez]] (a.k.a. xenodium).
* Meta :noexport:
Local variables:
eval: (add-hook 'after-save-hook #'org-texinfo-export-to-info 0 t)
End: