~aleteoryx/tclfeed-bsky

ref: cdfdf857d91e52c9183625c10f39f643518338b0 tclfeed-bsky/src/algos/tclposting.tcl -rw-r--r-- 649 bytes
cdfdf857Aleteoryx document mod tools 29 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
namespace eval ::algos::tclposting {
  variable log [logger::init algos::tclposting]
  proc intake {uri text data} {
    variable log
    if {![regexp -- [join {
      {\s[Tt]cl(/[Tt]k)?(\.|,|\s)}
      {^[Tt]cl(/[Tt]k)?(,|\s)}
      {\s[Tt]cl(/[Tt]k)?$}
      {\sTk(\.|,|\s)}
      {^Tk(,|\s)}
      {\sTk$}
      {\.tcl}
      {tclsh}
      {tcl-lang}
      {tcltk}
      {tcllib}
      {tklib}
      {tcl\.tk}
      {#tcllang}} | ] $text]} \
    {
      return {}
    }

    if {[regexp -nocase -- [join {
      {Title Tk}
      {Comic-Con Tk}} | ] $text]} \
    {
      return {}
    }

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