- Main remote repo: BitBucket
- Mirror remote repo: GitHub
- stocktotal project contains 3 modules:
- Source: source Taiwan stock information
- Report: generate pdf/png report
- Portal: generate web portal report
First of all, we need PostgreSQL 9.1 (or higher). Then prepare the following environment for each module. Source module is required if your database is empty.
- Python 3.2 (or higher) environment
- Java running environment
- Apache Ant building environment
- Apache2
- PHP 5.3 (or higher)
- lxml: process HTML. In Windows, may use unofficial binary package
- py-postgresql: PostgreSQL driver and tools library
- 7-Zip: file archiver in Windows
- xlrd: extract data from Microsoft Excel. To use xlrd in Python 3, may use takluyver-xlrd
- wget: in Windows
For license issue, we need to prepare the following required jar files:
- KAIU font: use iReport 4.x to import Windows KAIU font into a jar file, say
font-kaiu.jar
- PHP 5 pdo driver for PostgreSQL
- Create a new role
stocktotal
with passwordstocktotal
- Create a new database
stocktotal
with ownerstocktotal
- Create home directory:
$HOME_DIR
- Clone:
git clone https://bitbucket.org/Menggen/stocktotal.git
- Put
7z.exe
and7-zip.dll
in directory$HOME_DIR/source/core/thirdparty/sevenzip/
- Put
wget.exe
in directory$HOME_DIR/source/core/thirdparty/wget
- Put
font-kaiu.jar
in directory$HOME_DIR/report/core/lib/
- Copy
$HOME_DIR/portal
to Apache2 htdocs directory
- Database schema:
$HOME_DIR/db/postgres/pg_dump.sql
. - Source module: execute
$HOME_DIR/source/source_manager.py -h
for usage. Note that running source module will consume a lot of time. - Report module: we need to build first:
$HOME_DIR/report/builder_manager.py
. To generate report, execute$HOME_DIR/report/generator_manager.py -h
for usage. - Portal module: open web browser and browse
http://localhost/portal/report.php
If you have any question/suggestion/advice, please mail to [email protected]