Daily Offerings

How It Works

Maid-chan has a scheduler worker for handling various daily tasks. For example, Maid-chan will send out daily good morning and good night greetings upon subscription. This feature is known as “Daily Offerings”.

maidchan-offerings-morning

Daily offerings contain of two parts: greeting and image. Greetings are taken from maidchan/constant.py while offerings are taken from offerings/stock/ directory.

maidchan.offerings.check_event_morning_offerings()[source]

Maid-chan supports event type morning messages, e.g.: Halloween, Christmas, etc. If “force” flag is turned on, Maid-chan will use a specific message for the morning greeting. Otherwise, there’s a probability that Maid-chan will use seasonal type of messages.

maidchan.offerings.get_morning_offerings_text()[source]
maidchan.offerings.get_night_offerings_text()[source]

In general, offerings text functionality has two types: normal and special with 2% of probability. For example, Maid-chan sends morning greeting more than half an hour later than usual because of overslept (2% chance). Greeting text on any specific day is the same for everyone, as it is stored in scheduler’s metadata.

maidchan.offerings.get_offerings_image()[source]
maidchan.offerings.remove_offerings_image(filepath)[source]

In addition to text-based greetings, Maid-chan offers image as an addition. For all images which are stored under offerings/stock/, Maid-chan will pick 2 random images on daily basis for morning and night offerings. Each day, used offerings are moved to offerings/used/ directory. If there is no image under offerings/stock/ directory, Maid-chan will simply skip sending out images as a part of daily offerings.

How to Run

  1. You can start running scheduler by executing:
$ maidchan_scheduler
  1. You can subscribe & unsubscribe to Maid-chan’s daily offerings via subscribe offerings and unsubscribe offerings command in the Messenger. Upon subscription, you will be asked 2 questions: your usual waking up time and your usual sleeping time.