Commands
========
-The web interface (chem_web.py) is a web-daemon using web.py and it's build in htmlserver.
-Standard command for starting the daemon::
+The web interface (:file:`bin/chem_web.py`) is a web-daemon using
+CherryPy. Standard command for starting the daemon::
- $ chem_web.py -a 192.168.1.2:55555
+ $ bin/chem_web.py -a 192.168.1.2 -p 55555
Standard command for stopping the daemon::
- $ chem_web.py --stop
+ $ bin/chem_web.py --stop
From the command line, you can validate CAS#s (and possibly other fields) with::
- $ python chem_db.py -f current/inventory.db -V
+ $ bin/chem_db.py -f example/inventory.db -V
Database format
===============
-text_db.py provides the python interface to this format. The basic
-idea was to produce and use files which were M$-Excel-compatible,
-since future users might not want to maintain this interface. A brief
-example inventory.db file is included in the examples directory.
+:mod:`chemdb.db.text` provides the python interface to this format.
+The basic idea was to produce and use files which were
+M$-Excel-compatible, since future users might not want to maintain the
+ChemDB interface. A brief example :file:`inventory.db` file is
+included in the examples directory.
* Tab-delimited ('\t') fields
* Endline-delimited ('\n') records
it contains a tab-delimiteded list of long field names.
* Blank lines are ignored.
-The fields H, F, R, and S are the NFPA Health, Fire, Reactivity, and Special Hazards (NFPA diamond).
+The fields H, F, R, and S are the NFPA Health, Fire, Reactivity, and
+Special Hazards (NFPA diamond).
* Blue: Health Hazard
0 Hazard no greater than ordinary material
Contents
========
-* README this file
-* DEPENDENCIES list of dependencies (libraries, python modules, etc.)
-* COPYING GNU General Public License, version 3
-* text_db.py python interface to the above db format
-* chem_db.py chem-inventory specific functionality such as
- * CAS # validation,
- * a Material Saftey Data Sheet (MSDS) manager,
- * document-generation drivers, and
- * a simple command line interface.
-* current store the current database file.
-* backup store previous (timestamped) database files.
- You may want to clean this out occasionally.
-* MSDS store Material Saftey Data Sheets by database index number
-* docs latex (and metapost) sources for document generation.
-* chem_web.py daemonized web bindings to chem_web.py
-* ssl Secure Socket Layer (SSL) key and certificate generation tests.
+ bin (executibles)
+ |-- chem_db.py (command line interface)
+ `-- chem_web.py (web interface)
+ chemdb (python package)
+ contrib (useful but non-critical utilities)
+ `-- ssl (SSL key/certificate generation)
+ COPYING (GNU GPLv3 license)
+ DEPENDENCIES (description of software dependencies)
+ example (example data for demonstrations and testing)
+ |-- inventory.db (example inventory database)
+ `-- static (example directory for statically served content)
+ `-- MSDS (example MSDS storage location)
+ `-- 0.html (dummy MSDS for acetic acid)
+ README (this file)
+ template
+ |-- doc (LaTeX source for PDF generation)
+ `-- web (Jinja2 templates for HTML generation)
+ update_copyright.py (script automating copyright blurb maintenance)
Generated files and directories
-------------------------------
============ =======================================================================
-templates quasi-HTML templates for pages generated chem_web.py
+backup store database file snapshots from every change
chem_web.pid store the Process ID (PID) for a daemonized chem_web.py process
chem_web.log log chem_web activity (maintained between runs, so remove periodically)
============ =======================================================================