Compare commits

..

2 commits

5 changed files with 192 additions and 154 deletions

View file

@ -33,47 +33,47 @@
'configure.ac'
],
{
'_AM_AUTOCONF_VERSION' => 1,
'_AM_SET_OPTION' => 1,
'AM_PROG_INSTALL_SH' => 1,
'AM_DEP_TRACK' => 1,
'_AM_SET_OPTIONS' => 1,
'AM_SUBST_NOTMAKE' => 1,
'_AM_DEPENDENCIES' => 1,
'AM_PROG_INSTALL_STRIP' => 1,
'AM_SILENT_RULES' => 1,
'AM_MISSING_HAS_RUN' => 1,
'_m4_warn' => 1,
'AC_CONFIG_MACRO_DIR_TRACE' => 1,
'_AC_AM_CONFIG_HEADER_HOOK' => 1,
'AC_DEFUN_ONCE' => 1,
'AM_AUX_DIR_EXPAND' => 1,
'_AM_PROG_TAR' => 1,
'AM_MISSING_PROG' => 1,
'AC_DEFUN' => 1,
'AM_PROG_CC_C_O' => 1,
'AM_AUTOMAKE_VERSION' => 1,
'm4_pattern_forbid' => 1,
'_AM_CONFIG_MACRO_DIRS' => 1,
'AM_CONDITIONAL' => 1,
'AM_SANITY_CHECK' => 1,
'include' => 1,
'_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
'm4_pattern_allow' => 1,
'_AM_PROG_CC_C_O' => 1,
'm4_include' => 1,
'AM_SET_LEADING_DOT' => 1,
'AM_INIT_AUTOMAKE' => 1,
'AC_CONFIG_MACRO_DIR' => 1,
'AM_RUN_LOG' => 1,
'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1,
'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
'_AM_MANGLE_OPTION' => 1,
'AM_SET_DEPDIR' => 1,
'AU_DEFUN' => 1,
'AM_MAKE_INCLUDE' => 1,
'AM_AUTOMAKE_VERSION' => 1,
'_AM_IF_OPTION' => 1,
'_AM_SUBST_NOTMAKE' => 1
'_AM_PROG_TAR' => 1,
'_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
'm4_include' => 1,
'AM_INIT_AUTOMAKE' => 1,
'AC_DEFUN_ONCE' => 1,
'_AC_AM_CONFIG_HEADER_HOOK' => 1,
'AM_MISSING_HAS_RUN' => 1,
'm4_pattern_allow' => 1,
'm4_pattern_forbid' => 1,
'_AM_DEPENDENCIES' => 1,
'_AM_SET_OPTIONS' => 1,
'AC_DEFUN' => 1,
'_m4_warn' => 1,
'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
'include' => 1,
'AM_SILENT_RULES' => 1,
'_AM_PROG_CC_C_O' => 1,
'_AM_MANGLE_OPTION' => 1,
'_AM_AUTOCONF_VERSION' => 1,
'AM_RUN_LOG' => 1,
'AM_MAKE_INCLUDE' => 1,
'_AM_SET_OPTION' => 1,
'AM_DEP_TRACK' => 1,
'AM_SUBST_NOTMAKE' => 1,
'AM_SET_LEADING_DOT' => 1,
'AM_PROG_CC_C_O' => 1,
'_AM_SUBST_NOTMAKE' => 1,
'AM_AUX_DIR_EXPAND' => 1,
'AC_CONFIG_MACRO_DIR' => 1,
'AM_SET_DEPDIR' => 1,
'AM_PROG_INSTALL_STRIP' => 1,
'AU_DEFUN' => 1,
'AM_PROG_INSTALL_SH' => 1,
'AM_MISSING_PROG' => 1,
'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1,
'_AM_CONFIG_MACRO_DIRS' => 1,
'AM_CONDITIONAL' => 1
}
], 'Autom4te::Request' ),
bless( [
@ -88,69 +88,69 @@
'configure.ac'
],
{
'_AM_MAKEFILE_INCLUDE' => 1,
'LT_INIT' => 1,
'AM_INIT_AUTOMAKE' => 1,
'AM_PATH_GUILE' => 1,
'AC_CANONICAL_HOST' => 1,
'AM_PROG_MKDIR_P' => 1,
'IT_PROG_INTLTOOL' => 1,
'AC_CONFIG_AUX_DIR' => 1,
'AC_FC_FREEFORM' => 1,
'AC_INIT' => 1,
'AM_EXTRA_RECURSIVE_TARGETS' => 1,
'AM_XGETTEXT_OPTION' => 1,
'AM_MAINTAINER_MODE' => 1,
'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
'AC_CANONICAL_BUILD' => 1,
'AC_CANONICAL_TARGET' => 1,
'AC_CANONICAL_SYSTEM' => 1,
'include' => 1,
'm4_pattern_allow' => 1,
'AM_PROG_AR' => 1,
'AC_CONFIG_SUBDIRS' => 1,
'AM_PROG_MOC' => 1,
'_m4_warn' => 1,
'GTK_DOC_CHECK' => 1,
'AC_CONFIG_LINKS' => 1,
'AM_PROG_CXX_C_O' => 1,
'AM_POT_TOOLS' => 1,
'AM_PROG_CC_C_O' => 1,
'LT_SUPPORTED_TAG' => 1,
'AC_PROG_LIBTOOL' => 1,
'AC_SUBST' => 1,
'AM_MAKEFILE_INCLUDE' => 1,
'LT_CONFIG_LTDL_DIR' => 1,
'_LT_AC_TAGCONFIG' => 1,
'AC_FC_PP_SRCEXT' => 1,
'_AM_COND_ELSE' => 1,
'AM_SILENT_RULES' => 1,
'AC_REQUIRE_AUX_FILE' => 1,
'AM_ENABLE_MULTILIB' => 1,
'AC_LIBSOURCE' => 1,
'_AM_SUBST_NOTMAKE' => 1,
'AM_PROG_LIBTOOL' => 1,
'AM_CONDITIONAL' => 1,
'AC_FC_SRCEXT' => 1,
'AC_CONFIG_LIBOBJ_DIR' => 1,
'AC_CONFIG_HEADERS' => 1,
'AH_OUTPUT' => 1,
'm4_include' => 1,
'AC_FC_PP_DEFINE' => 1,
'AC_DEFINE_TRACE_LITERAL' => 1,
'AC_CONFIG_MACRO_DIR_TRACE' => 1,
'AC_SUBST_TRACE' => 1,
'AM_AUTOMAKE_VERSION' => 1,
'AM_PROG_F77_C_O' => 1,
'AC_CONFIG_FILES' => 1,
'AM_PROG_FC_C_O' => 1,
'm4_pattern_forbid' => 1,
'_AM_COND_ENDIF' => 1,
'sinclude' => 1,
'_AM_COND_IF' => 1,
'AM_NLS' => 1,
'AM_GNU_GETTEXT' => 1,
'm4_sinclude' => 1
'AC_FC_PP_SRCEXT' => 1,
'AM_PROG_LIBTOOL' => 1,
'AM_PROG_FC_C_O' => 1,
'AM_PROG_MOC' => 1,
'AH_OUTPUT' => 1,
'AM_PATH_GUILE' => 1,
'AC_FC_FREEFORM' => 1,
'LT_SUPPORTED_TAG' => 1,
'GTK_DOC_CHECK' => 1,
'AC_SUBST' => 1,
'LT_INIT' => 1,
'_AM_COND_ELSE' => 1,
'AC_FC_SRCEXT' => 1,
'm4_sinclude' => 1,
'AM_SILENT_RULES' => 1,
'AM_MAKEFILE_INCLUDE' => 1,
'AM_PROG_AR' => 1,
'_AM_COND_ENDIF' => 1,
'AC_SUBST_TRACE' => 1,
'AM_PROG_CXX_C_O' => 1,
'AC_DEFINE_TRACE_LITERAL' => 1,
'AM_ENABLE_MULTILIB' => 1,
'AC_CONFIG_LIBOBJ_DIR' => 1,
'_AM_MAKEFILE_INCLUDE' => 1,
'AC_CONFIG_MACRO_DIR_TRACE' => 1,
'AM_PROG_F77_C_O' => 1,
'AM_AUTOMAKE_VERSION' => 1,
'AC_CONFIG_HEADERS' => 1,
'_m4_warn' => 1,
'LT_CONFIG_LTDL_DIR' => 1,
'_AM_COND_IF' => 1,
'IT_PROG_INTLTOOL' => 1,
'AM_XGETTEXT_OPTION' => 1,
'AM_NLS' => 1,
'AC_CONFIG_AUX_DIR' => 1,
'AC_CANONICAL_TARGET' => 1,
'AC_CANONICAL_HOST' => 1,
'AM_CONDITIONAL' => 1,
'AC_INIT' => 1,
'AC_CANONICAL_BUILD' => 1,
'AM_PROG_CC_C_O' => 1,
'AC_PROG_LIBTOOL' => 1,
'AC_CONFIG_FILES' => 1,
'sinclude' => 1,
'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
'include' => 1,
'AM_EXTRA_RECURSIVE_TARGETS' => 1,
'AC_CONFIG_LINKS' => 1,
'AM_MAINTAINER_MODE' => 1,
'AM_PROG_MKDIR_P' => 1,
'm4_include' => 1,
'AM_INIT_AUTOMAKE' => 1,
'AC_CANONICAL_SYSTEM' => 1,
'm4_pattern_forbid' => 1,
'AC_FC_PP_DEFINE' => 1,
'm4_pattern_allow' => 1,
'AC_REQUIRE_AUX_FILE' => 1
}
], 'Autom4te::Request' ),
bless( [
@ -166,69 +166,69 @@
'configure.ac'
],
{
'AM_GNU_GETTEXT' => 1,
'AM_NLS' => 1,
'm4_sinclude' => 1,
'_AM_COND_IF' => 1,
'_AM_COND_ENDIF' => 1,
'sinclude' => 1,
'AM_PROG_F77_C_O' => 1,
'AM_AUTOMAKE_VERSION' => 1,
'm4_pattern_forbid' => 1,
'AC_CONFIG_FILES' => 1,
'AM_PROG_FC_C_O' => 1,
'AC_SUBST_TRACE' => 1,
'AC_CONFIG_MACRO_DIR_TRACE' => 1,
'AC_DEFINE_TRACE_LITERAL' => 1,
'AC_FC_PP_DEFINE' => 1,
'AH_OUTPUT' => 1,
'm4_include' => 1,
'AC_CONFIG_LIBOBJ_DIR' => 1,
'AC_CONFIG_HEADERS' => 1,
'AC_FC_SRCEXT' => 1,
'AM_CONDITIONAL' => 1,
'AM_PROG_LIBTOOL' => 1,
'_AM_SUBST_NOTMAKE' => 1,
'AC_LIBSOURCE' => 1,
'AM_ENABLE_MULTILIB' => 1,
'AM_SILENT_RULES' => 1,
'AC_REQUIRE_AUX_FILE' => 1,
'AC_FC_PP_SRCEXT' => 1,
'_AM_COND_ELSE' => 1,
'_LT_AC_TAGCONFIG' => 1,
'AM_MAKEFILE_INCLUDE' => 1,
'AC_SUBST' => 1,
'AC_PROG_LIBTOOL' => 1,
'LT_CONFIG_LTDL_DIR' => 1,
'AM_PROG_CC_C_O' => 1,
'AM_POT_TOOLS' => 1,
'LT_SUPPORTED_TAG' => 1,
'AM_PROG_CXX_C_O' => 1,
'AM_PROG_MOC' => 1,
'_m4_warn' => 1,
'AC_CONFIG_LINKS' => 1,
'GTK_DOC_CHECK' => 1,
'AC_CONFIG_SUBDIRS' => 1,
'AM_PROG_AR' => 1,
'include' => 1,
'm4_pattern_allow' => 1,
'AC_CANONICAL_SYSTEM' => 1,
'AC_CANONICAL_HOST' => 1,
'AC_CANONICAL_TARGET' => 1,
'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
'AM_MAINTAINER_MODE' => 1,
'AM_XGETTEXT_OPTION' => 1,
'AM_EXTRA_RECURSIVE_TARGETS' => 1,
'AC_CANONICAL_BUILD' => 1,
'IT_PROG_INTLTOOL' => 1,
'AM_PROG_MKDIR_P' => 1,
'AC_INIT' => 1,
'AC_FC_FREEFORM' => 1,
'AC_CONFIG_AUX_DIR' => 1,
'AM_XGETTEXT_OPTION' => 1,
'AM_NLS' => 1,
'IT_PROG_INTLTOOL' => 1,
'_AM_COND_IF' => 1,
'sinclude' => 1,
'AC_CONFIG_FILES' => 1,
'AC_PROG_LIBTOOL' => 1,
'AM_PROG_CC_C_O' => 1,
'AC_CANONICAL_BUILD' => 1,
'AC_INIT' => 1,
'AC_CONFIG_LINKS' => 1,
'AM_EXTRA_RECURSIVE_TARGETS' => 1,
'include' => 1,
'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
'AC_REQUIRE_AUX_FILE' => 1,
'm4_pattern_allow' => 1,
'AC_FC_PP_DEFINE' => 1,
'm4_pattern_forbid' => 1,
'AC_CANONICAL_SYSTEM' => 1,
'm4_include' => 1,
'AM_INIT_AUTOMAKE' => 1,
'AM_PATH_GUILE' => 1,
'AM_MAINTAINER_MODE' => 1,
'AM_PROG_MKDIR_P' => 1,
'AH_OUTPUT' => 1,
'AM_PROG_MOC' => 1,
'AM_PROG_FC_C_O' => 1,
'AM_PROG_LIBTOOL' => 1,
'AC_FC_PP_SRCEXT' => 1,
'AM_GNU_GETTEXT' => 1,
'_AM_SUBST_NOTMAKE' => 1,
'_LT_AC_TAGCONFIG' => 1,
'AC_CONFIG_SUBDIRS' => 1,
'AM_POT_TOOLS' => 1,
'AC_LIBSOURCE' => 1,
'AC_FC_SRCEXT' => 1,
'_AM_COND_ELSE' => 1,
'AC_SUBST' => 1,
'LT_INIT' => 1,
'GTK_DOC_CHECK' => 1,
'LT_SUPPORTED_TAG' => 1,
'AC_FC_FREEFORM' => 1,
'AM_PATH_GUILE' => 1,
'AC_DEFINE_TRACE_LITERAL' => 1,
'AM_ENABLE_MULTILIB' => 1,
'AM_PROG_CXX_C_O' => 1,
'AC_SUBST_TRACE' => 1,
'_AM_COND_ENDIF' => 1,
'AM_PROG_AR' => 1,
'AM_MAKEFILE_INCLUDE' => 1,
'AM_SILENT_RULES' => 1,
'm4_sinclude' => 1,
'LT_CONFIG_LTDL_DIR' => 1,
'_m4_warn' => 1,
'AC_CONFIG_HEADERS' => 1,
'AM_AUTOMAKE_VERSION' => 1,
'AM_PROG_F77_C_O' => 1,
'AC_CONFIG_MACRO_DIR_TRACE' => 1,
'_AM_MAKEFILE_INCLUDE' => 1,
'AC_CANONICAL_HOST' => 1
'AC_CONFIG_LIBOBJ_DIR' => 1
}
], 'Autom4te::Request' )
);

View file

@ -1,4 +1,4 @@
xslfeedconfdir = $(sysconfdir)/xslfeed
dist_bin_SCRIPTS = combine-md-files generate-website-from-md get-feeds update-xslfeed
dist_bin_SCRIPTS = combine-md-files generate-website-from-md get-feeds update-xslfeed mark-new-feed-entries
dist_xslfeedconf_DATA = opml2list.xml rss2md.xml style.css

View file

@ -227,7 +227,7 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
xslfeedconfdir = $(sysconfdir)/xslfeed
dist_bin_SCRIPTS = combine-md-files generate-website-from-md get-feeds update-xslfeed
dist_bin_SCRIPTS = combine-md-files generate-website-from-md get-feeds update-xslfeed mark-new-feed-entries
dist_xslfeedconf_DATA = opml2list.xml rss2md.xml style.css
all: all-am

29
src/mark-new-feed-entries Normal file
View file

@ -0,0 +1,29 @@
#!/bin/sh
file=$1
curr=`date -d "yesterday 00:00" +%s`
lines=()
news=0
while read line
do
stamp=`echo $line | sed -e 's/^ *- *\(.\{25\}\).*$/\1/' -e 's/^#.*/1970-01-01/'`
time=`date -d "$stamp" +%s`
if [ "$time" -gt "$curr" ]
then
news=$(($news + 1))
lines+=("$(echo $line | sed -e 's/^\( *\)- *\(.*\)$/\1- \*\2\*/')")
else
lines+=("$line")
fi
done < $file
if [ "$news" -gt "0" ]
then
lines[0]=`echo "$lines[0]" | sed -e "s/^#\(#*\) *\(.*\)$/#\1 \*\2 ($news)\*/"`
fi
for line in "${lines[@]}"
do
echo $line
done

View file

@ -1,5 +1,14 @@
#!/bin/sh
get-feeds
for file in $HOME/xslfeed/feeds/*
do
other_file="$file.prev"
cp $file $other_file
mark-new-feed-entries $other_file > $file
rm $other_file
done
combine-md-files Feeds $HOME/xslfeed/feeds/* > $HOME/xslfeed/feeds.md
generate-website-from-md $HOME/xslfeed/feeds.md /etc/xslfeed/style.css