aboutsummaryrefslogtreecommitdiff
path: root/README.org
blob: db74d3f87bc836de58771b7c21b713e536c91974 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#+title: f2md

A utility to fetch new items from feeds and write them to maildir.
This program is similar to [[https://pypi.org/project/feed2maildir/][feed2maildir]].

* Install

#+begin_src sh
git clone https://g.ypei.me/f2md.git
cd f2md
cabal install
#+end_src

and make sure =~/.cabal/bin= is included in =$PATH=.

* Usage

Prepare a config file =~/.f2md.json=:

#+begin_src json
[
  {
    "dbPath": "~/.f2mdb.json",
    "maildir": "~/Mail/best",
    "feeds": [
        "https://static.fsf.org/fsforg/rss/news.xml",
        "https://www.gnu.org/rss/whatsnew.rss"
    ]
  },
  {
    "dbPath": "~/.f2mdb.json",
    "maildir": "~/Mail/audio",
    "feeds": [
        "https://haskellweekly.news/podcast.rss"
    ]
  }
]
#+end_src

Then run 

#+begin_src sh
f2md
#+end_src

and all new news should be placed in =~/Mail/f2md=.

You can also use =--config= or =-c= to specify a config file:

#+begin_src sh
f2md --config ~/.config/f2md/config
#+end_src

* Contact and copyright
- For any issues email <mailto:id@ypei.org>.
- Copyright (C) 2022 Yuchen Pei.
- Licensed under AGPLv3+.