~aleteoryx/tclfeed-bsky

ref: 68d11e12ad1c9df969d29438495ca91a423c3f86 tclfeed-bsky/src/algos/tclposting.tcl -rw-r--r-- 671 bytes
68d11e12Aleteoryx heuristic tweaks 28 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
namespace eval ::algos::tclposting {
  variable log [logger::init algos::tclposting]
  proc intake {uri text data} {
    variable log
    if {![regexp -nocase -- [join {
      {\mtcl(/tk)?\M}
      {\.tcl}
      {tclsh}
      {tcl-lang}
      {tcltk}
      {tcllib}
      {tklib}
      {tcl\.tk}
      {tcllang}
      {tkinter}} | ] $text] &&
      ![regexp -- {\mTk\M} $text]} \
    {
      return {}
    }

    if {[regexp -nocase -- [join {
      {Title Tk}
      {Comic-Con Tk}
      {\mtvs?\M}
      {\d\d("|in)}
      {television}
      {DVDVR}
      {wrestling}} | ] $text]} \
    {
      return {}
    }

    return [dict get $data commit record createdAt]
  }
}