Kaede

Gem Version Build Status Coverage Status Code Climate

Scheduler for recpt1 recorder using Syoboi Calendar.

Installation

Add this line to your application's Gemfile:

gem 'kaede'

And then execute:

$ bundle

Or install it yourself as:

$ gem install kaede

Usage

Requirements

Some of them should be optional, though.

Setup

kaede dbus-policy $KAEDE_USER > kaede.conf
sudo mv kaede.conf /etc/dbus-1/system.d/kaede.conf

cp kaede.rb.sample kaede.rb
vim kaede.rb
gem install pg  # gem install sqlite3
kaede db-prepare

cp kaede.service.sample kaede.service
vim kaede.service

sudo cp kaede.service /etc/systemd/system/kaede.service
sudo systemctl enable kaede.service
sudo systemctl start kaede.service

Add your available channels.

kaede add-channel MX -c kaede.rb --recorder 16 --syoboi 19
kaede add-channel BS11 -c kaede.rb --recorder 211 --syoboi 128
...

Add your favorite anime tids.

kaede add-tid -c kaede.rb 3331
...

Operations

Update programs and schedules. It supposed to be run periodically (by cron or systemd.timer).

kaede update -c kaede.rb

List schedules.

gdbus introspect --system --dest cc.wanko.kaede1 --object-path /cc/wanko/kaede1/program -r

Reload schedules (usually not needed).

dbus-send --system --dest=cc.wanko.kaede1 /cc/wanko/kaede1/scheduler cc.wanko.kaede1.Scheduler.Reload

Stop scheduler. The current scheduler process exits after all the running recorders finish.

dbus-send --system --dest=cc.wanko.kaede1 /cc/wanko/kaede1/scheduler cc.wanko.kaede1.Scheduler.Stop

What recorder does

  1. Post the earlier tweet (optional).
  2. Record the program into record_dir by recpt1.
    • At the same time, decode into cache_dir by b25.
    • At the same time, dump ass into cache_dir by assdumper.
  3. Post the later tweet (optional).
  4. Clean the recorded TS (in cache_dir) into cabinet_dir.
  5. Move dumped ass (in cache_dir) into cabinet_dir.
  6. Enqueue the filename into redis_queue.

Contributing

  1. Fork it ( https://github.com/eagletmt/kaede/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request