~aleteoryx/tclfeed-bsky

f9c699e615d3debea80af458f15847debb21f543 — Aleteoryx 25 days ago c2a8695
improved heuristics (curse the french!); make the error logging code work
2 files changed, 21 insertions(+), 1 deletions(-)

M src/algos/tclposting.tcl
M src/ws.tcl
M src/algos/tclposting.tcl => src/algos/tclposting.tcl +19 -0
@@ 17,15 17,34 @@ namespace eval ::algos::tclposting {
    {
      return [dict get $data commit record createdAt]
    }

    # bare minimum
    if {![regexp -nocase -- {\mtcl(/tk)?\M} $text] &&
        ![regexp -- {\mTk\M} $text]} return

    # blocklist
    if {[regexp -nocase -- [join {
      {SYTRAL}
      {F[eê]te ?des ?Lumi[eè]res}
      {m[eé]tro}
      {\mLyon(naise?s?)?\M}
      {TCL\+Ve?Lo?}

      {Wok Mix}

      {youtu\.?be(\.com)[^ ]+(tk|tcl)}

      {Title Tk}
      {Tk (you|DM)\M}
      {Comic-Con Tk}
      {\mtvs?\M}
      {\d\d( ?"|( |-|)in(ch)?)}
      {television}
      {Projector}

      {tcl-bookreviews}
      {TopTenTuesday}

      {DVDVR}
      {wrestling}
      {tk mclaren}} | ] $text]} return

M src/ws.tcl => src/ws.tcl +2 -1
@@ 270,8 270,9 @@ namespace eval ::ws::c {
          [set callback($sock)] $sock close [dict get $frame data]
        }
      }
    } return]} {
    } result options]} {
      ${log}::error "error in websocket callback for ${sock}: $result"
      ${log}::error "options: $options"
    }
  }
}