Project

hikkmemo

0.0
No commit activity in last 3 years
No release in over 3 years
Extensible/customizable/programmable thread/post/image memoizer for imageboards.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 1.5
~> 1.1
~> 3.46
~> 1.3
 Project Readme
$ sudo apt-get install sqlite3 libsqlite3-dev
$ sudo gem install hikkmemo
$ sudo gedit /usr/local/bin/hikkmemo
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
require 'hikkmemo'
require "unicode_utils/upcase"
require 'unicode_utils/lowercase_char_q'

Readers = Hikkmemo::Readers

Hikkmemo.run '~/.hikkmemo', {
  :log_to => :console,
  :prompt => '/%b/> ',
  :prompt_color => :red,
  :theme  => :zebra,
  :colors => [:green, :yellow],
  :msg_sz => 50,
  :boards => {
    :c    => Readers.nullchan('/c/'),
    :pr   => Readers.dvach_hk('/pr/'),
    :s    => Readers.dobrochan('/s/'),
    :scii => Readers.iichan('/sci/')
  }
} do
  hook do |post, board|
    msg = UnicodeUtils.upcase(post[:message])
    if ['RUBY', 'РУБИ', 'РАБИ'].any? {|w| msg.include? w }
      notice "Активность рубиняш в #{post[:thread]}-треде (#{board.to_s})."
    end
  end

  hook :c do |post|
    if UnicodeUtils.lowercase_char? post[:message][0]
      notice "Кто-то написал с маленькой буквы в #{post[:thread]}-треде."
    end
  end

  cmd 'мяу' do |args|
    puts "Мур-мур, #{args.reverse.join(' ')}."
  end

   cmd 'kishki' do
    puts @workers
  end
end
$ hikkmemo