-
Notifications
You must be signed in to change notification settings - Fork 6
Cinema Debye Scherrer
This tutorial is an introduction to Cinema: Debye-Scherrer.
If you have already, go to the git repository for Cinema: Debye-Scherrer and clone to your favorite directory.
To get the example packaged with cinema running, navigate to the installation directory, open a terminal a serve a http server.
python -m http.server
With the server running open a internet browser tab and enter: """http://localhost:8000/main.html""". Note that the correct port is displayed when launching the python http server.
You should see something like the following in the browser:
After you have set CINEMA_PATH to your installation of the CINEMA: Debye Scherrer using milk-config
, you can use the MILK conda environment to serve any data.csv file by calling
milk-cinema
from the folder containing the data.csv. There are a number of options which can be displayed with milk-cinema -h
.
% milk-cinema -h
usage: milk-cinema [-h] [-cinema_path CINEMA_PATH] [-data_path DATA_PATH] [-serve_path SERVE_PATH] [-port PORT] [-ip IP]
[-databases_index DATABASES_INDEX] [-databases_name DATABASES_NAME] [-run_server RUN_SERVER]
[-open_browser OPEN_BROWSER] [-local_cinema LOCAL_CINEMA]
Launch CINEMA viewing session.
optional arguments:
-h, --help show this help message and exit
-cinema_path CINEMA_PATH
Installation path of Cinema:debye-scherrer.
-data_path DATA_PATH Directory containing data.csv.
-serve_path SERVE_PATH
Both cinema and data path must be a child of serve_path.
-port PORT Port number to serve on.
-ip IP IP to serve on.
-databases_index DATABASES_INDEX
Specifies database index in databases.json that will have its directory overwritten.
-databases_name DATABASES_NAME
Name in CINEMA databases.json.
-run_server RUN_SERVER
Run server at end of script.
-open_browser OPEN_BROWSER
Open url in browser.
-local_cinema LOCAL_CINEMA
Run cinema from data_path.
By default milk-cinema
will copy the cinema installation to the data.csv parent directory and serve a http server from that directory to avoid accidentally serving your entire user directory over http (security issue!). If you structure your installation right, you can use the -local_cinema
option to avoid the copy.
MILK automatically configures the database and launches the browser by default.
In the browser you should see:
The cool thing with http is that anybody on your network can access the server and interact with the Rietveld data. This also means, be careful what you serve over http. The simple http server is not meant to be a production server. The local call to cinema will only serve the data.csv directory and its subdirectories e.g.