Commit Graph

29 Commits (master)

Author SHA1 Message Date
Shokara Kou cfbd4d78ee save items in a Maildir/
rssdl is back in a usable state! (for rss only)
2022-12-10 22:34:54 -05:00
Shokara Kou eb2c59173c remove old files to prepare for rewrite 2022-12-10 20:06:28 -05:00
Shokara Kou 242ec447fa write article summary/description 2021-12-13 18:43:16 -05:00
Shokara Kou 7a859d2fe1 save items, but now with yxml :D 2021-12-13 17:38:34 -05:00
Shokara Kou abd59407aa read from stdin instead of curl 2021-08-31 23:24:06 -04:00
Shokara Kou 30898d6a69
use open_memstream(3) instead of reinventing the wheel 2021-07-06 20:38:19 -04:00
Shokara Kou a43fdff052
temp commit 2021-07-01 20:50:49 -04:00
Shokara 0619f055a9
assume all feed items are in html instead of plaintext 2021-05-13 16:01:56 -04:00
Shokara 8ff388c8a7
cleanup curl properly
Also initialize the time structure in save.c
Now there's basically no errors in valgrind besides the still reachable
errors caused by curl's crypto library! :D
2021-05-11 20:41:59 -04:00
Shokara cb01a6aa2e
save datetime in RFC 5322 format
Some (most or all?) atom feeds don't appear to have their date in the
updated tag in the regular mail format, so clients used to not parse
them correctly.

Also the time structure is now being allocated automatically instead of
manually because it isn't very big.
2021-05-11 20:17:03 -04:00
Shokara ab52d828a7
set default compiler/standard to C99
Unfortunately snprintf is not in C89. snprintf's size argument is also
no longer hardcoded.
2021-05-11 18:48:34 -04:00
Shokara 8ab4232188
change strcpy to strncpy when getting item root 2021-03-27 14:13:22 -04:00
Shokara 182a2dae65
add preliminary atom feed support
Currently, summary and maybe content tags with CDATA don't get saved,
but everything else appears to work (for now at least).
2021-03-26 13:44:07 -04:00
Shokara 4cc9797618
accept other date formats from feed
Some RSS feeds don't exactly follow the date format in RFC 822 so this
is to accomodate for the two other date formats I found so far (and
hopefully not anymore).
2021-03-25 16:47:48 -04:00
Shokara d99a3565c3
get feed's title directly without helper function 2021-03-10 23:50:59 -05:00
Shokara 3bbf7e61f5
make code (mostly) ANSI C compatible
Also fixes a memory leak from opendir().
2021-03-10 22:55:02 -05:00
Shokara bd62d37631
remove old directory (non-maildir) saving
Saving RSS feeds as a Maildir was the original purpose of rssdl. Having
to have two copies of a function with ony slight differences was still
annoying to merge for now. Might re-add later.
2021-03-10 12:30:34 -05:00
Shokara c1e5dea0a2
change email format 2021-03-07 00:25:19 -05:00
Shokara 0819743f3b
check if the fetched files existed in Maildir 2021-03-05 14:41:31 -05:00
Shokara f037e26691
replace mbox with maildir + some refactoring 2021-03-05 14:41:27 -05:00
Shokara 63bf2e394d
add mbox file output courtesy of acz's fork
Original commit can be found here[0].

[0]: https://gt.kalli.st/acz/rssdl-mutt/commit/3273df7da7
2021-02-16 16:07:45 -05:00
Shokara b85eb1efd2
directly compare title and link instead of strfcmp 2021-02-16 13:13:00 -05:00
Shokara 89654a05d9
some refactoring 2021-02-16 13:10:22 -05:00
Shokara 611446f1e3
use strfcmp() instead of fletcher16 checksum
If I had to calculate a checksum by going over a file and getting the
digest and later comparing the digests of a file and string, I might as
well just directly compare the file and string.
2021-02-14 23:15:07 -05:00
Shokara d92f72b2f3
replace rhash crc32 hash with own fletcher16 hash
This also removes the rhash dependency.
2021-02-14 12:44:52 -05:00
Shokara 2a0b8ca1cf
get seconds since unix epoch via mktime 2021-02-13 19:03:50 -05:00
Shokara 86b2dd87fc
skip existing same file by comparing crc32 hashes 2021-02-12 18:45:25 -05:00
Shokara 67846ce783
fix bug where item may get overwritten
Increases number at the end of filename when a file already exists.
2020-11-28 23:01:53 -05:00
Shokara 4b0d42b8a3
save RSS feed items into a directory from argv[2]
Currently overwrites items that were sent on the same time as another.
2020-11-28 18:56:59 -05:00