omnomnomnom - Manage your digital shelf. Expirations notifications, pricing history.
Dashie der otter 7858c68190
Derp
10 months ago
contrib Fix cron syntax 11 months ago
locale More baguette 11 months ago
media add media dir 11 months ago
omnomnomnom Add configs 11 months ago
shelf Derp 10 months ago
static Things 11 months ago
.gitignore Derp 10 months ago
LICENSE Yes it's MIT 11 months ago
README.md I HATE LICENSING 11 months ago
manage.py First import 11 months ago
requirements.txt Add missing dependencies 11 months ago

README.md

OmNomNomNom

Omnomnomnom helps you manage your products and expiry times.

Features

  • Shelf listing
  • Expiry date
  • Expiry date with opened flag (time to expire after opening)
  • Product picture
  • Emails reminders
  • Price history

Some notes

  • A Product should represent a product with an unique couple name/brand/barcode
  • Having a product in stock just means to manage Product Stock, any times you add one, with some price, this price is added to Product Price History
  • You should then not delete Product when expired, just delete the Product Stock associated
  • Prices History are managed per product/shop couple. (same product can be at a different price on some shops)

Installation

Initial

A good point is to install this on a dedicated user, using VirtualEnv too.

sudo su - youruser
cd ~/
git clone https://dev.sigpipe.me/dashie/omnomnomnom
cd omnomnomnom

Virtual Env

as root : pip3 install virtualenv
then under the user, youruser:

virtualenv --python=python3 ~/venv/
source ~/venv/bin/activate

Rest of install (virtual env or not)

source ~/venv/bin/activate
cd ~/omnomnomnom/
pip install -r requirements.txt
cp omnomnomnom/settings.py.sample omnomnomnom/settings.py
$EDITOR omnomnomnom/settings.py

Edit settings.py according to your setup

python manage.py migrate
python manage.py createsuperuser
django-admin compilemessages

Using gunicorn

as user omnomnomnom
cd omnomnomnom
python managepy collectstatic

pip install gunicorn
cp contrib/gunicorn.conf gunicorn.conf
$EDITOR gunicorn.conf

edit as you wish

as root
mkdir /var/log/omnomnomnom
chown -R omnomnomnom: /var/log/omnomnomnom

apt install supervisor # or whatever package manager you use

cp ~omnomnomnom/omnomnomnom/contrib/omnomnomnom.supervisor.conf /etc/supervisor/conf.d/omnomnomnom.conf
$EDITOR /etc/supervisor/conf.d/omnomnomnom.conf

edit as you wish

then start supervisor using your system, like for debian:
/etc/init.d/supervisor start

view status with:
supervisorctl status

Reminder emails

You can setup the crons with:

In file /etc/cron.d/omnomnomnom:

# Reminder every days, for next 3 days
0 1 * * * /home/omnomnomnom/venv/bin/python /home/omnomnomnom/manage.py reminders --email --expires 3
# Reminder every monday, for next 6 days
0 1 * * */1 /home/omnomnomnom/venv/bin/python /home/omnomnomnom/manage.py reminders --email --expires 6
# Reminder every first day of month, for the next 30 days
0 1 * */1 * /home/omnomnomnom/venv/bin/python /home/omnomnomnom/manage.py reminders --email --expires 30

Remember to restart cron daemon after edit of this file
/etc/init.d/crond restart

Licensing

Omnomnomnom use the MIT license, however we use Django-Suit which is under "Creative Commons Attribution-NonCommercial 3.0" which means you will probably take a look at http://djangosuit.com/pricing/ to get a paid license for it if you use Omnomnomnom in any kind of business.

The Free license of Django-Suit is only applicable for personnal use.