diff options
author | V.Krishn <vkrishn4@gmail.com> | 2021-11-27 04:25:20 +0530 |
---|---|---|
committer | V.Krishn <vkrishn4@gmail.com> | 2021-11-27 04:25:20 +0530 |
commit | 1bec958fc1a1e8ec5f0a5635779786025a313dd7 (patch) | |
tree | b8752fafa5a98f76122166ae86b7a38ff707fff1 | |
parent | 1f5adc20d92e1bbd457263d4150e080981167246 (diff) | |
download | nbreader-1bec958fc1a1e8ec5f0a5635779786025a313dd7.tar.bz2 |
add lines starting with # as comments in url file
-rw-r--r-- | config/url/sample | 1 | ||||
-rw-r--r-- | config/urls.sample | 1 | ||||
-rw-r--r-- | scripts/config.sh | 7 |
3 files changed, 6 insertions, 3 deletions
diff --git a/config/url/sample b/config/url/sample index 6472e4b..248be3c 100644 --- a/config/url/sample +++ b/config/url/sample @@ -1,2 +1,3 @@ http://news.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml "/news/bbc.co.uk" +# comment line http://www.php.net/feed.atom "/dev/php" diff --git a/config/urls.sample b/config/urls.sample index 08a3f57..3ebbee8 100644 --- a/config/urls.sample +++ b/config/urls.sample @@ -1,2 +1,3 @@ http://feeds.bbci.co.uk/news/world/south_asia/rss.xml?edition=int "/news/bbc.co.uk" +# comment line http://www.osnews.com/files/recent.rdf "/technology" diff --git a/scripts/config.sh b/scripts/config.sh index 10967bf..cc04a3f 100644 --- a/scripts/config.sh +++ b/scripts/config.sh @@ -87,7 +87,8 @@ create_url_csv() { rm -f "$URLLOCALDIR/$filename"; fi while read line; do - if [ "$line" != "" ]; then + local commentl="$(echo $line | grep -o '^#')"; + if [ "$line" != "" -a "$commentl" != "#" ]; then URLSUM=$(echo $line | awk '{print $1}' | sha1sum -t); URLSUM=${URLSUM:0:40}; TAG=$(echo $line | awk '{print $2}'); @@ -135,8 +136,8 @@ config_init_icon_status() { } config() { - create_url_csv - create_url_db + create_url_csv + create_url_db create_empty_dbs config_init_icon_status } |