Commit Graph

101 Commits

Author SHA1 Message Date
Shokara Kou 6fe3d8dc04 parse date format without timezone 2023-01-05 16:03:19 -05:00
Shokara Kou 85cb78555b add support for dc:date with sed's help 2023-01-04 14:21:53 -05:00
Shokara Kou 68dd2c064d add strlcpy compatibility file for non-openbsd 2022-12-11 20:11:59 -05:00
Shokara Kou 6483e52df1 added a sed file to wrap the inside of <content> in a CDATA 2022-12-11 19:42:05 -05:00
Shokara Kou a0e99d882a save atom links 2022-12-11 19:16:49 -05:00
Shokara Kou c8502e9f03 add preliminary atom support
<content> doesn't work, but can be fixed by wrapping its data in CDATA.
will need to write an awk or sed file for this

links are also in href instead of part of the tag, so that doesn't work either
2022-12-11 19:07:14 -05:00
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 bcc61828ad print in mail format 2022-12-10 21:53:42 -05:00
Shokara Kou 5f0aa201fc convert date format appropriate for emails 2022-12-10 21:44:32 -05:00
Shokara Kou 611f1b4ff7 replace tmp_fp with item.desc 2022-12-10 21:07:14 -05:00
Shokara Kou ce0a480458 handle CDATA in <description> 2022-12-10 21:00:11 -05:00
Shokara Kou 3a6e5ebf7e write <description> to a temporary file instead of using open_memstream(3) 2022-12-10 20:55:02 -05:00
Shokara Kou ccc35d3aeb shorten tag checking/comparing with istag() macro 2022-12-10 20:30:06 -05:00
Shokara Kou 186dd048d3 store title, link, and date in struct 2022-12-10 20:26:38 -05:00
Shokara Kou eb2c59173c remove old files to prepare for rewrite 2022-12-10 20:06:28 -05:00
Shokara Kou 1310665922 prepare to use codemadness's xmlparser instead of yxml
Yet again switching XML parsers. When I tried out xmlparser yesterday,
it was very easy to use so I think it would be easy to switch over to this.
2022-11-17 17:02:46 -05:00
Shokara Kou 2b2af33fec
update manual page 2022-02-12 22:33:35 -05:00
Aoi Koizumi (古泉 あおい) d8069dbe82
Add manual page
Signed-off-by: Aoi Koizumi <>
2022-02-12 21:58:25 -05:00
Shokara Kou 748b4d4aee fix typo in Makefile 2022-01-20 08:08:45 -05:00
Shokara Kou ccf6b130b0 remove TODO list
Not needed anymore (for now at least).
2021-12-25 16:03:24 -05:00
Shokara Kou 9d33df4f1e fix clang warning for including yxml.h 2021-12-13 19:02:23 -05:00
Shokara Kou 1db3810d2d mention licensing for rssdl and yxml 2021-12-13 18:57:51 -05:00
Shokara Kou c46d88391e update README with new usage 2021-12-13 18:54:00 -05:00
Shokara Kou 6dceeb3cf9 go back to old cflags 2021-12-13 18:50:03 -05:00
Shokara Kou 242ec447fa write article summary/description 2021-12-13 18:43:16 -05:00
Shokara Kou 6c909c0876 only extract atom links with rel alternate 2021-12-13 18:07:38 -05:00
Shokara Kou 7a859d2fe1 save items, but now with yxml :D 2021-12-13 17:38:34 -05:00
Shokara Kou 08a9f8147b fix rss parsing 2021-12-13 15:39:51 -05:00
Shokara Kou 64667ff29e parse feed title and item's title, date, and link
RSS feed parsing needs to be fixed.
Atom feed items with multiple links (like one for a favicon) also
get parsed and those need to be skipped.
2021-12-13 12:45:32 -05:00
Shokara Kou 1e4e38d84b add separate CFLAGS for debugging
I found out about what -fsanitize does from lurking in's #c
2021-12-13 11:15:50 -05:00
Shokara Kou abd59407aa read from stdin instead of curl 2021-08-31 23:24:06 -04:00
Shokara Kou d83d056fd7
remove isatom argument from parse_item() 2021-07-06 22:32:24 -04:00
Shokara Kou 215dddb546
update README 2021-07-06 22:31:34 -04:00
Shokara Kou 16a692f2b8
re-enable command line arguments and usage() 2021-07-06 22:16:28 -04:00
Shokara Kou eae377dd21
add atom entry link support 2021-07-06 21:43:14 -04:00
Shokara Kou 64564498c3
add wont fix entry for non-CDATA unescaped HTML 2021-07-06 21:26:27 -04:00
Shokara Kou 63f2b6bcc9
split Makefile into having a for variables
2021-07-06 21:26:14 -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 Kou b1a30873c7
parse raw data from curl directly 2021-07-01 20:50:49 -04:00
Shokara 16973b2a3c
remove hash table-related files
I don't think comparing against a hash table would be a good idea now.
2021-07-01 20:50:41 -04:00
Shokara 6681a17672
rename xml_string functions 2021-06-28 16:35:10 -04:00
Shokara ad4c59c47e
relicense back under the ISC license 2021-06-07 12:42:21 -04:00
Shokara 9e6c8c25a0
start moving parser from mxml to yxml
mxml had a problem (bug?) which ignored a tag's CDATA if that tag
started with whitespace. This caused problems with the items of some
feeds like Dig Deeper's atom feed where items had empty

Initially, I also tried moving to expat which is a popular xml parser
that is also installed as part of most systems, probably as a
dependency of another program, but it seemed a bit difficult to
include. Meanwhile, yxml is another stream-based xml parser that is
simpler and only includes the bare minimum of what I need, so I'm using
it instead.

libxml2 wasn't considered because I think it's gomblex and very bloated,
even if it was easy to use.
2021-05-20 12:07:32 -04:00
Shokara 209f5f566f
update TODO 2021-05-14 09:06:35 -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 17be38e5f9
use perfect hash table made by gperf in sax_cb 2021-03-29 10:36:21 -04:00