Age | Commit message (Collapse) | Author |
|
Be more strict and only allow regular files. It makes no sense to use device
files or fifos with sfeed_update and it can cause issues, because sfeed_update
expects to read the config file for each (child) invocation also.
|
|
Same as the commit 9754fe74f7b5c0600cc41eef8c6f5c8305a74a18 for sfeed_update
Tested on NetBSD 5.1: evaluating directories as config files could allow
garbage, so disallow it.
Devices / fifo, etc are still allowed.
|
|
In zsh the variables $path and $status are special.
https://zsh.sourceforge.io/Doc/Release/Parameters.html#index-path
https://zsh.sourceforge.io/Doc/Release/Parameters.html#index-status
(No promises I will keep up with this insanity in the future though)
|
|
Technically for sfeed_atom this violates the RFC standard. There must be an
author in the feed or for an item. However sfeed is not the author, it is a
generator. All readers will read these feeds anyway.
https://www.rfc-editor.org/rfc/rfc4287#section-4.1.1
"atom:feed elements MUST contain one or more atom:author elements, unless all of
the atom:feed element's child atom:entry elements contain at least one
atom:author element." *shrug*
|
|
... and some small rewording.
|
|
separator
echo is unportable in this way and names containing characters like an option
(-n) or backslash or escape codes (\e, \n, etc) could be messy.
For awk set LC_ALL=C for simple collation.
This makes sfeed_opml_export slower in some shells that don't have printf
builtin though. For example with about 150 feeds in a config file it is a bit
slower on OpenBSD ksh.
time ./sfeed_opml_export | wc -l
152
0m00.29s real 0m00.05s user 0m00.20s system
time sfeed_opml_export | wc -l
152
0m00.02s real 0m00.00s user 0m00.03s system
|
|
In theory feed names can contain newlines, TABS, control-characters or start
with echo options like -n. This is not recommended and not checked.
URLs cannot have these characters: they should be percent-encoded.
echo is typically a shell built-in and fast, so this trade-off is done.
|
|
|
|
- Do not show stderr of readlink.
- Show the reference to the example sfeedrc (like sfeed_update).
- Make the error message a bit shorter.
- Fix showing the path if it does not exist, for example:
$ sfeed_opml_export "a"
readlink: a: No such file or directory
Configuration file "" does not exist or is not readable.
Now shows:
$ sfeed_opml_export "a"
Configuration file "a" cannot be read.
See sfeedrc.example for an example.
|
|
|
|
- set type="rss", this is mandatory for OPML2 (although we use OPML v1).
This fixes importing OPML with Mozilla Thunderbird.
other:
- Do not set the optional htmlUrl. This was (ab)used for the baseurl.
- awk: set FS using the awk -F option (no need for OFS here).
- awk: remove forced C locale.
|
|
|
|
Tested using 1000 feeds, took about 20s, now 0.02s.
The overhead of sed and printf was too high.
Now pipe an intermediate TAB format to awk and print it in one stage.
|
|
|
|
Found by testing newsboat and compatibility with other clients.
|
|
make sure to escape them.
|
|
|
|
|
|
|
|
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
|
|
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
|
|
before writing footer of opml. Since feeds can be specified in the
config to be processed in parralel.
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
|
|
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
|