]> Sergey Matveev's repositories - feeder.git/blobdiff - cmd/parse.sh
Per-feed max number of entries
[feeder.git] / cmd / parse.sh
index 9ba9d7c0c3ddb90a7c768191800a7768333d8043..3af3258892c8bb09d2b430aa727b3d66c5a29c3a 100755 (executable)
@@ -5,6 +5,7 @@ cd "$1"
 [ -s parse.hash ] && hash_our=`cat parse.hash` || :
 [ -s download.hash ] && hash_their=`cat download.hash` || :
 [ "$hash_our" != "$hash_their" ] || exit 0
-zstd -d < feed.zst | $cmds/feed2mdir/feed2mdir . > title.tmp
+[ -s max ] && max=`cat max` || max=${FEEDER_MAX_ITEMS:-100}
+zstd -d < feed.zst | $cmds/feed2mdir/feed2mdir -max-entries $max . > title.tmp
 mv title.tmp title
 echo $hash_their > parse.hash