Menu

Tree [931b45] master /
 History

HTTPS access


File Date Author Commit
 abelujo 2018-04-21 vindarel vindarel [06211f] silence some tests
 doc 2018-04-18 vindarel vindarel [bc0278] doc: run in production with gunicorn
 docker 2017-11-30 vindarel vindarel [df96cb] test the installation script on Docker (add mis...
 locale 2018-05-10 vindarel vindarel [8a0628] fix sell failing when no sold price and no init...
 migrations 2016-07-15 vindarel vindarel [56a88c] migrations: rename field in old ones and put as...
 scripts 2017-11-02 vindarel vindarel [15b54f] fix save_covers script: create images/covers/ i...
 search 2018-05-18 vindarel vindarel [931b45] Sell from a place or a deposit (and don't count...
 static 2018-05-18 vindarel vindarel [931b45] Sell from a place or a deposit (and don't count...
 templates 2018-05-17 vindarel vindarel [7629bc] List export with covers: use remote url, local ...
 .babelrc 2017-11-01 vindarel vindarel [4fd882] Install and setup Brunch and Vuejs \o/
 .bowerrc 2014-11-11 vindarel vindarel [12c01a] gulpfile
 .gitignore 2017-12-15 vindarel vindarel [d5677e] vue Basket pagination component
 .gitlab-ci.yml 2017-11-29 vindarel vindarel [d660e2] gitlab-ci: build only on new tag pushed, not at...
 .gitmodules 2016-04-28 vindarel vindarel [6979cc] submodule: get with https, without ssh auth
 .ignore 2017-12-12 vindarel vindarel [e4e46b] add .ignore (for ag, the silver searcher)
 .jshintrc 2017-03-23 vindarel vindarel [f066b7] jshint: reduce js lint errors by x10 (to 23)
 .projectile 2017-12-12 vindarel vindarel [8f31eb] add .projectile (emacs' project manager)
 .pylintrc 2017-04-05 vindarel vindarel [284cce] (minor) pylint: less relative imports
 COPYRIGHT 2016-05-28 vindarel vindarel [55f380] update copyright ..2016
 LICENCE 2014-10-29 vindarel vindarel [73aedd] GPLv3
 Makefile 2018-04-02 vindarel vindarel [0b01d8] uninstall helper++
 Procfile 2016-11-07 vindarel vindarel [ab2c11] (deployment) Honcho the task supervisor and its...
 README.md 2018-05-17 vindarel vindarel [fbe3fe] fix List export pdf when price none
 README_fr.md 2017-02-24 vindarel vindarel [431643] i18n fr: stock -> fonds
 bower.json 2017-07-28 vindarel vindarel [3f80e2] Datejs = browser lib -> installed with Bower (f...
 brunch-config.js 2017-12-27 vindarel vindarel [078d05] Vue brunch install lodash
 dbfixture.json 2015-02-26 vindarel vindarel [56b800] Fixes #8 Add a Card to the "auto command" Baske...
 fabfile.py 2017-11-02 vindarel vindarel [9f572f] fab script:script_name,client
 fabutils.py 2018-04-21 vindarel vindarel [4383ef] fab: print client status
 gulpfile.js 2017-07-28 vindarel vindarel [3f80e2] Datejs = browser lib -> installed with Bower (f...
 install.sh 2017-11-29 vindarel vindarel [f9b274] test the installation script on Docker
 manage.py 2017-03-16 vindarel vindarel [48cb1c] Licence -> 2017
 package.json 2017-12-27 vindarel vindarel [078d05] Vue brunch install lodash
 setup.cfg 2017-02-28 vindarel vindarel [8192f0] (minor) format++
 tox.ini 2015-03-06 vindarel vindarel [24e7af] use Tox. Test in a fresh venv.
 venv_create.sh 2017-03-03 vindarel vindarel [4f31fe] CI: echo debugging
 yarn.lock 2017-12-26 vindarel vindarel [7317c6] Vue Lists - add search result to List

Read Me

Abelujo - free software to manage independent book (and records) shops.

français: Lisez-moi

This project is at its debut stage. However it is already possible to:

  • look up for books, either by keywords or by isbn/ean (which works with a barcode scanner). See the https://gitlab.com/vindarel/bookshops library. You can currently search for:

    • french books (through librairiedeparis, decitre.fr or chapitre.com)
    • spanish books (through casadellibro.com)
    • german books(through buchlentner.de)
    • you want another one ? The sooner you tell us, the quicker you'll have it ;)
    • look up for CDs (via discogs.com)
    • do an inventories of your stock,
    • manage lists of books, export them to csv and pdf (with barcodes),
    • send an email to distributors to order books,
    • manage deposits and distributors, see the balance of your deposits,
    • sell books, see conflicts of distributors, see the history,
    • import data from a LibreOffice Calc file (.ods) (experimental, cli only. See the user documentation).

It is translated to english, french and spanish.

We base our work on the software specifications from the Ruche project
(to which we particpated):
http://ruche.eu.org/wiki/Specifications_fonctionnelles. We wrote there
what we understood about the work of a bookseller (like how to manage
different distributors, how to manage deposits, etc). You should read it
and tell us wether or not what we are doing will suit your needs (I'll
translate this document to english one day or another, but you should
tell me now if you're interested).

Abelujo means Beehive in Esperanto.

Feedback welcome at vindarel at mailz dot org.

Donate using Liberapay

looking for a registered card

Installation

Instructions for Debian 8.

build status

Either do the quick way:

curl -sS https://gitlab.com/vindarel/abelujo/raw/master/install.sh | bash -

this will clone the repo in the current directory and install all its dependencies.

or read below for the detailed instructions.

See after to install without sudo.

Get the sources:

git clone --recursive https://gitlab.com/vindarel/abelujo.git

it creates the directory "abelujo":

cd abelujo

Install the required dependencies for Debian (Ubuntu/LinuxMint/etc):

make debian
# a shortcut for
# sudo apt-get install python-pip nodejs nodejs-legacy
# sudo pip install --upgrade pip
# sudo pip install virtualenvwrapper
# sudo yarn install gulp -g  # a JS build system. (warn: -g is deprecated)
# Debian users have to install nodejs-legacy if the node command doesn't give you a javascript shell.
# Unixes: install yarn (and not npm) with
# curl -o- -L https://yarnpkg.com/install.sh | bash

Also install the Nodejs platform and the yarn package manager (instead of npm):

 sudo make install-nodejs

Create and activate a virtual environment (so than we can install python
libraries locally, not globally to your system). Do as you are used to,
or do the following:

source venv_create.sh # [venvname] (optional argument)
workon abelujo
pip install --upgrade pip  # v9 or above is recommended.

now your shell prompt should show you are in the abelujo
virtualenv. To quit the virutal env, type deactivate. To enter it,
type workon \<TAB\> abelujo.

To install the dependencies, create and populate the database, run:

make install
# and if bower asks for the version of Angular, choose version #1.3.20.

We are done ! Now to try Abelujo, run the development server like this:

make run
# or set the port with:
# python manage.py runserver 9876

and open your browser to http://127.0.0.1:8000 (admin/admin).

Enjoy ! Don't forget to give feedback at ehvince at mailz dot org !

Install without sudo

make debian-nosudo
make install-nosudo

please read the Makefile in this particular case.

How to update

To update, you need to: pull the sources (git pull --rebase),
install new packages (system and python-wide), run the database
migrations, build the static assets and, in production, collect the
static files.

In the virtual env, run:

make update
# git pull --rebase
# git submodule update --remote
# install pip, migrate, gulp, collecstatic, compile transalation files

Development

Django project (1.8), in python (2.7), with AngularJS (1.3) (transitioning to Vue) and the
Django Rest Framework
(partly).

We also use:

Read more about our tools choices
to understand better what does what and how everything works together.

See the developer documentation: http://dev.abelujo.cc/ This is
our database graph (make graphdb).

Dev installation

As a complement to the installion procedure above, you also need to
install development dependencies that are listed in another
requirements file::

make pip-dev

and npm packages to run end to end tests:

make npm-dev  # packages listed in devDependencies of packages.json

Additional management commands start with my_.

To livereload Django and Vue assets using Brunch and Django's runserver:

make watch

Configure services

Sentry

Put your
Sentry
private token in a sentry.txt file. The settings will see and read
it.

To get Fabric send it to the remote instance on install (fab install
calls fab save_variables), add the token into your clients.yaml
under sentry_token (see the fabfile).

Test with python manage.py raven test and see the new message in your dashboard.

Start Redis

We need Redis for long operations (dowloading the whole stock as csv, huey task runner,…).

redis-server &

see #83.

Run unit tests

make unit

Code coverage:

make cov  # and open your browser at htmlcov/index.html

Testing the installation script in Docker

Given you have Docker already installed, run the installation script
in a fresh Ubuntu 16.04 with:

chmod +x dockentry.sh
docker run  -v "$(pwd)/docker":/home/docker/ -ti ubuntu:16.04 /home/docker/dockentry.sh

The script given as argument creates a user with sudo rights and then
calls the installation script.

You can also simply step into the image and run scripts manually from
there.

See a bit more in doc/dev/ci.rst.

Load data

See the scripts in scripts/ to load data (specially shelves
names), in different languages.

Troubleshooting

If you get:

OperationalError: no such column: search_card.card_type_id

it is probably because you pulled the sources and didn't update your
DB. Use database migrations (make migrate).

Uninstall

To uninstall Javascript and Python libraries, see make uninstall[-js, -pip].

The most worth it is to uninstall JS libs from node_modules, that
frees a couple MB up.

Documentation

We have developer documentation: http://dev.abelujo.cc/

Donate using Liberapay