Age | Commit message (Collapse) | Author |
|
... 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>
|