README.rst

changeset 2
c492770144c4
parent 1
783c8a0db76f
child 7
415d034b0864
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/README.rst	Tue Jun 23 10:59:59 2015 +0300
@@ -0,0 +1,76 @@
+SCC access script
+=================
+
+This small scripts permits interacting with the Single Calculus Chain through
+the command line. Specifically, with the script you can:
+
+* Upload a file to the SCC for processing
+* Download the processed files and graphs
+* Delete an existing measurement from the SCC (with appropriate privileges)
+
+The main functions are implemented in a class (SCC) that you can also import 
+and use in your custom scripts.
+
+The script does not provide any feedback if a file upload fails. Before using
+the script, you will need to upload some files manually and be confident that 
+your SCC file format and processing settings are correct.
+
+Please note that this is not part of the "official" SCC tools. I will update
+it when I have time but I cannot guarantee to maintain it in the long run.
+
+Any suggestions for improvements and new features are more than welcome.
+
+
+Installation
+------------
+
+The only requirement for running this program is the requests python module.
+If you have pip installed you can install it by::
+
+   pip install requests.
+
+See http://docs.python-requests.org/en/latest/user/install/ for more details.
+
+You can use the script by cloning this mercurial repository. Alternatively, you 
+can just coppy the scc_access.py and and settings.sample.py files to a local 
+directory.
+
+
+Settings
+--------
+You will need to change some user-defined settings in a settings.py file. You
+can rename the settings.sample.py file to settings.py and follow the instructions 
+there.
+
+Specifically, you will need to:
+
+1. Change the BASIC_LOGIN and DJANGO_LOGIN to your credentials.
+2. Change the OUTPUT_DIR to the location were the results will be stored.
+
+Please not that it's not a good idea to store your own credentials in the settings
+file. The standard user has "Station Management" privileges and if the credentials 
+are stolen, someone could change/delete the stations settings from the SCC database.
+For this, it is better to use a used account with minimum access settings, that
+can only upload files and measurements.
+
+
+Usage
+-----
+
+You can upload a file specifying the username and the system id::
+
+   python scc_access.py 20110101po01.nc 125
+
+If you want to wait for the processing to finish and download the resulting files
+you need to define the -p flag::
+
+   python scc_access.py 20110101po01.nc 125 -p
+
+If you want to delete an existing measurement id from the database use the -d flag and
+the measurement id::
+   
+   python scc_access.py -d 20110101po01
+
+For more information on the syntax type::
+   
+   python scc_access.py -h

mercurial