parent
84f3c589de
commit
0982212464
|
@ -52,11 +52,11 @@ lasthash=
|
||||||
while read hash commit ts id subject; do
|
while read hash commit ts id subject; do
|
||||||
# ignore commits that begin with ':'
|
# ignore commits that begin with ':'
|
||||||
[[ "$subject" == :* ]] && {
|
[[ "$subject" == :* ]] && {
|
||||||
echo "[HTML] Ignoring $commit: $subject" >&2
|
echo "Ignoring $commit: $subject" >&2
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "[HTML] Found $commit: $subject" >&2
|
echo "Found $commit: $subject" >&2
|
||||||
|
|
||||||
dateout="$( ./tsdate "$ts" %Y-%m-%d )"
|
dateout="$( ./tsdate "$ts" %Y-%m-%d )"
|
||||||
dategroup="${dateout%-*}"
|
dategroup="${dateout%-*}"
|
||||||
|
|
30
repo2html
30
repo2html
|
@ -20,6 +20,26 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
# #
|
# #
|
||||||
|
|
||||||
|
_stderrout()
|
||||||
|
{
|
||||||
|
prefix="$1"
|
||||||
|
sed 's/^/['"$prefix"'] /g' >&2
|
||||||
|
}
|
||||||
|
|
||||||
|
_rssout()
|
||||||
|
{
|
||||||
|
_stderrout 'RSS'
|
||||||
|
}
|
||||||
|
_htmlout()
|
||||||
|
{
|
||||||
|
_stderrout 'HTML'
|
||||||
|
}
|
||||||
|
_reout()
|
||||||
|
{
|
||||||
|
_htmlout 2> >( _stderrout 'Reprocessing' )
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# repository detection
|
# repository detection
|
||||||
repotype=
|
repotype=
|
||||||
if repodir="$( git rev-parse --git-dir 2>/dev/null )"; then
|
if repodir="$( git rev-parse --git-dir 2>/dev/null )"; then
|
||||||
|
@ -94,17 +114,19 @@ export cref_errlog="$cref_errlog_first"
|
||||||
# reference and further processing)
|
# reference and further processing)
|
||||||
listcache=.list
|
listcache=.list
|
||||||
"$repotype"/list | tee \
|
"$repotype"/list | tee \
|
||||||
>( ./rss "$repotype" "$url_root" "$rss_count" > "$path_out/rss.xml" ) \
|
>( ./rss "$repotype" "$url_root" "$rss_count" \
|
||||||
|
> "$path_out/rss.xml" \
|
||||||
|
2> >( _rssout )
|
||||||
|
) \
|
||||||
"$listcache" \
|
"$listcache" \
|
||||||
| ./processor "$repotype" "$path_out"
|
| ./processor "$repotype" "$path_out" 2> >( _htmlout )
|
||||||
|
|
||||||
# re-process cref errors (but only once; any errors at this point will be
|
# re-process cref errors (but only once; any errors at this point will be
|
||||||
# considered to be problem refs)
|
# considered to be problem refs)
|
||||||
export cref_errlog=.cref-bad
|
export cref_errlog=.cref-bad
|
||||||
>"$cref_errlog"
|
>"$cref_errlog"
|
||||||
grep -f"$cref_errlog_first" "$listcache" \
|
grep -f"$cref_errlog_first" "$listcache" \
|
||||||
| ./processor "$repotype" "$path_out" \
|
| ./processor "$repotype" "$path_out" 2> >( _reout )
|
||||||
2> >( sed 's/^/[Reprocessing] /g' >&2 )
|
|
||||||
|
|
||||||
# if any invalid crefs remain, then they're bad
|
# if any invalid crefs remain, then they're bad
|
||||||
[ ! -s "$cref_errlog" ] || {
|
[ ! -s "$cref_errlog" ] || {
|
||||||
|
|
6
rss
6
rss
|
@ -44,11 +44,11 @@ EOH
|
||||||
while read hash commit ts id subject; do
|
while read hash commit ts id subject; do
|
||||||
# ignore commits that begin with ':'
|
# ignore commits that begin with ':'
|
||||||
[[ "$subject" == :* ]] && {
|
[[ "$subject" == :* ]] && {
|
||||||
echo "[RSS] Ignoring $commit: $subject" >&2
|
echo "Ignoring $commit: $subject" >&2
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "[RSS] Found $commit: $subject" >&2
|
echo "Found $commit: $subject" >&2
|
||||||
|
|
||||||
# TODO: avoid HTML entities where browsers may decide not to render them (e.g.
|
# TODO: avoid HTML entities where browsers may decide not to render them (e.g.
|
||||||
# the title)
|
# the title)
|
||||||
|
@ -73,7 +73,7 @@ EOE
|
||||||
# the check, meaning that if the count is 0, then we will output every commit
|
# the check, meaning that if the count is 0, then we will output every commit
|
||||||
((i++))
|
((i++))
|
||||||
[ "$i" -eq "$count" ] && {
|
[ "$i" -eq "$count" ] && {
|
||||||
echo "[RSS] Limit of $count reached." >&2
|
echo "Limit of $count reached." >&2
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue