knadh / tg-archive

A tool for exporting Telegram group chats into static websites like mailing list archives.
MIT License
834 stars 124 forks source link

timeless build #68

Open milahu opened 2 years ago

milahu commented 2 years ago

add option for "timeless build" = on build, dont update these times:

site/index.xml <lastBuildDate>Wed, 08 Jun 2022 08:57:59 +0000</lastBuildDate>

site/index.atom <updated>2022-06-08T08:57:59.732044+00:00</updated>

these updates produce "diff noise" when the build is stored in git

workaround: remove the tags from site/index.xml and site/index.atom

sed -i -E 's|<lastBuildDate>[^<]+</lastBuildDate>||g' site/index.xml
sed -i -E 's|<updated>[^<]+</updated>||g' site/index.atom
l29ah commented 1 year ago

Also, the use of updated in tg-archive seems to violate the atom RFC:

4.2.15.  The "atom:updated" Element

   The "atom:updated" element is a Date construct indicating the most
   recent instant in time when an entry or feed was modified in a way
   the publisher considers significant.

while tg-archive just puts the current time in, it seems.