summaryrefslogtreecommitdiff
path: root/sfeed_opml_export
AgeCommit message (Collapse)Author
2023-12-28sfeed_opml_export: disallow using a directory as a config fileHiltjo Posthuma
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.
2023-12-09improve compatibility with zsh as a non-interactive shellHiltjo Posthuma
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)
2023-04-10remove sfeed "branding" in outputsHiltjo Posthuma
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*
2023-02-17sfeed_update, sfeed_opml_export, README: reference the example sfeedrc man pageHiltjo Posthuma
... and some small rewording.
2022-03-25change echo to printf and for sfeed_opml_export use a control-character ↵Hiltjo Posthuma
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
2022-02-19sfeed_opml_export: improve commentHiltjo Posthuma
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.
2021-08-06sfeed_opml_export: fix typo: opml -> OPMLHiltjo Posthuma
2021-05-29sfeed_opml_export: sync loadconfig() function fixes from sfeed_updateHiltjo Posthuma
- 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.
2021-01-24sfeed_opml_export: fix typos in commentHiltjo Posthuma
2019-11-24OPML export improvementsHiltjo Posthuma
- 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.
2019-05-15sfeed_opml_export: code-style for whitespace with variablesHiltjo Posthuma
2019-05-10sfeed_opml_export: optimizeHiltjo Posthuma
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.
2018-12-01sfeed_opml_export: escape `&'Leonardo Taccari
2018-04-07sfeed_opml_export: encode more entities for attribute valuesHiltjo Posthuma
Found by testing newsboat and compatibility with other clients.
2017-12-10sfeed_opml_import/sfeed_opml_export: allow " and \ in fieldsHiltjo Posthuma
make sure to escape them.
2017-12-09sfeed_opml_export: remove a level of indentationHiltjo Posthuma
2015-08-05sfeed_update, opml_export: slightly safer comparisonHiltjo Posthuma
2015-07-31improve documentationHiltjo Posthuma
2012-08-03sfeed_opml_export: output items on a single lineHiltjo Posthuma
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2012-08-03cleanup: remove trailing whitespaceHiltjo Posthuma
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2012-08-03sfeed_opml_export: wait for all items to be output...Hiltjo Posthuma
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>
2012-08-03Add sfeed_opml_export scriptHiltjo Posthuma
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>