Open utterances-bot opened 4 years ago
I recently started a programming blog. I also use utteranc.es and love it.
|> Seq.filter (fun (post : Disqus.Post) -> not post.IsSpam || not post.IsDeleted)
I’m not sure the
Seq.filter
... worked correctly, as I still had to go and manually delete a couple of comments that were marked as spam from the Github Issues
I think you meant to AND those conditions together...
|> Seq.filter (fun (post : Disqus.Post) -> not post.IsSpam && not post.IsDeleted)
...or negate their OR
|> Seq.filter (fun (post : Disqus.Post) -> not (post.IsSpam || post.IsDeleted))
Otherwise, you are keeping spam was previously deleted or deleted posts that are not spam.
I am increasingly dissatisfied with the name filter
. My current thought is that functions named keepIf
and removeIf
would be better. Then you would be able to write...
|> Seq.removeIf (fun (post : Disqus.Post) -> post.IsSpam || post.IsDeleted)
...which is the same as what you had but with filter
replaced with removeIf
.
Switching comments from Disqus to utteranc.es and importing to Github with F# | Stuart Grassie: TemporalCohesion
Shows how to export blog comments from Disqus into Github Issues and integrate utterance.es
https://www.temporalcohesion.co.uk/2020/07/20/switching-comments-from-disqus-to-utterances-importing-with-fsharp