@stackeffect@twtxt.stackeffect.de On the branch track-lasttwts
, I’ve started implementing that “don’t recreate deleted mail files” thingy. So when you delete/move/archive twts, they should no longer reappear when you run jenny -f
. Feel free to give this branch a try. 👌 (Bugs may lurk, it’s very fresh.)
@movq@www.uninformativ.de
I’ll test it tomorrow. Thank’s for starting this feature!
@movq@www.uninformativ.de Not that easy to test when pods honor if-modified-since
;-)
I’ve almost only timestamps -5364619200.0…
Diff looks good to me!
@movq@www.uninformativ.de Ha, but when you control lastmods
, lastseen
and lasttwts
it’s easy to test.
Works like a charm!
@movq@www.uninformativ.de I just observed unexpected old twts coming back.
It looks like lasttwts
is reset to -5364619200.0 every time no new content wasfetched for example if if-modified-since
did not produce new twts?
@movq@www.uninformativ.de What do you think about this?
diff –git a/jenny b/jenny
index b47c78e..20cf659 100755
— a/jenny
+++ b/jenny
@@ -278,7 +278,8 @@ def prefill_for(email, reply_to_this, self_mentions):
def process_feed(config, nick, url, content, lasttwt):
nick_address, nick_desc = decide_nick(content, nick)
url_for_hash = decide_url_for_hash(content, url)
new_lasttwt = parse(‘1800-01-01T12:00:00+00:00’).timestamp()
# new_lasttwt = parse(‘1800-01-01T12:00:00+00:00’).timestamp()
new_lasttwt = None
for line in twt_lines_from_content(content):
res = twt_line_to_mail(
@@ -296,7 +297,7 @@ def process_feed(config, nick, url, content, lasttwt):
twt_stamp = twt_date.timestamp() if lasttwt is not None and lasttwt >= twt_stamp: continue
if twt_stamp > new_lasttwt:
if not new_lasttwt or twt_stamp > new_lasttwt:
new_lasttwt = twt_stamp mailname_new = join(config['maildir_target'], 'new', twt_hash)