Ran update_copyright.py
[chemdb.git] / README
1 Web, python, and command-line interfaces for managing a chemical inventory.
2
3 Commands
4 ========
5
6 The web interface (:file:`bin/chem_web.py`) is a web-daemon using
7 CherryPy.  Standard command for starting the daemon::
8
9     $ bin/chem_web.py -a 192.168.1.2 -p 55555
10
11 Standard command for stopping the daemon::
12
13     $ bin/chem_web.py --stop
14
15 From the command line, you can validate CAS#s (and possibly other fields) with::
16
17     $ bin/chem_db.py -f example/inventory.db -V
18
19
20 Database format
21 ===============
22
23 :mod:`chemdb.db.text` provides the python interface to this format.
24 The basic idea was to produce and use files which were
25 M$-Excel-compatible, since future users might not want to maintain the
26 ChemDB interface.  A brief example :file:`inventory.db` file is
27 included in the examples directory.
28
29 * Tab-delimited ('\t') fields
30 * Endline-delimited ('\n') records
31 * The first line is the header (starts with a pound sign '#').
32 * The header should be a tab-delimited list of short field names.
33 * If the second line also begins with a pound sign,
34   it contains a tab-delimiteded list of long field names.
35 * Blank lines are ignored.
36
37 The fields H, F, R, and S are the NFPA Health, Fire, Reactivity, and
38 Special Hazards (NFPA diamond).
39
40 * Blue: Health Hazard
41    0  Hazard no greater than ordinary material
42    1  May cause irritation; minimal residual injury
43    2  Intense or prolonged exposure may cause incapacitation;
44       Residual injury may occur if not treated
45    3  Exposure could cause serious injury even if treated
46    4  Exposure may cause death
47 * Red: Fire Hazard
48    0  Will not burn
49    1  Must be preheated for ignition; flashpoint above 200°F (93°C)
50    2  Must be moderately heated for ignition, flashpoint above 100°F (38°C)
51    3  Ignition may occur under most ambient conditions,
52       Flashpoint below 100°F (38°C)
53    4  Extremely flammable and will readily disperse through air under standard
54       conditions, flashpoint below 73°F (23°C)
55 * Reactivity hazards:
56    0  Stable
57    1  May become unstable at elevated temperatures and pressures.
58       May be mildly water reactive
59    2  Unstable; may undergo violent decomposition, but will not detonate.
60       May form explosive mixtures with water
61    3  Detonates with strong ignition source
62    4  Readily detonates
63 * Special Hazards have the following codes:
64    * OX   strong oxidizer
65    * -W-  water reactive
66    * SA   simple ascphyxiants
67           (The only gases for which this symbol is permitted are nitrogen, helium,
68            neon, argon, krypton, and xenon..)
69 * Unofficial Special Hazard codes:
70    * ACID  acid
71    * ALK   base
72    * COR   corrosive
73    * BIO   Biohazard
74    * POI   Poison
75    * CRY   Cyrogenic
76
77
78 Contents
79 ========
80
81     AUTHORS               (list of authors contributing code to ChemDB)
82     bin                   (executibles)
83     |-- chem_db.py        (command line interface)
84     `-- chem_web.py       (web interface)
85     chemdb                (python package)
86     contrib               (useful but non-critical utilities)
87     `-- ssl               (SSL key/certificate generation)
88     COPYING               (GNU GPLv3 license)
89     DEPENDENCIES          (description of software dependencies)
90     example               (example data for demonstrations and testing)
91     |-- inventory.db      (example inventory database)
92     `-- static            (example directory for statically served content)
93         `-- MSDS          (example MSDS storage location)
94             `-- 0.html    (dummy MSDS for acetic acid)
95     README                (this file)
96     template
97     |-- doc               (LaTeX source for PDF generation)
98     `-- web               (Jinja2 templates for HTML generation)
99     update_copyright.py   (script automating copyright blurb maintenance)
100
101
102 Generated files and directories
103 -------------------------------
104
105 ============  =======================================================================
106 backup        store database file snapshots from every change
107 chem_web.pid  store the Process ID (PID) for a daemonized chem_web.py process
108 chem_web.log  log chem_web activity (maintained between runs, so remove periodically)
109 ============  =======================================================================
110
111 TODO
112 ====
113
114 Security
115 --------
116 I can create my own self-signed certificate.
117 Protects against eavesdropping, but not man-in-the-middle attacks.
118 Solution for now: hide from external world, trust everyone inside, backup before any change.
119
120
121 History
122 =======
123
124 The original web fron-end was based on Adam Bachman's simplewiki.py_.
125
126 .. simplewiki.py: http://bachman.infogami.com/another_simple_wiki
127
128
129 License
130 =======
131
132 ChemDB is released under the GNU General Public License version 3.
133 See :file:`COPYING` for details.