This code is responsible for sending data in correct format to Firebase database which is used as backend for PyCon mobile app.
- Python 3.4 || Python 3.5
- pip - tool for installing and managing Python packages
- virtualenv (not required) - tool to keep the dependencies required by different projects in separate places
- Create virtual environment in your project folder
- Install required libraries and packages
pip install -r requirements.txt
- Create csv folder in your project
- Run code:
python convert.py
- Enter the name of your CSV file (example: "pyconcz_schedule").
This config is used for settings in mobile application. Add code to the config file.
{
"config":{
"pycon_name":"PyCon CZ",
"pycon_logo":"https://cz.pycon.org/2016/static/img/pyconlogo.svg",
"pycon_color":"#dedede ",
"twitter_hashtag":"#pyconcz",
"pycon_db":"pyconcz2016",
"active":true
}
}
For every dictionary key, add value based on the column name in your database. On the left side, there are final keys, on the right side, there are your database columns. Add code to the mapping file. It would be appropriate, If you have all your columns in one exported csv file. Example of the configuration:
{
"room" : "room",
"active" : true,
"avatar" : "avatar",
"bio" : "More information about you (public)",
"description" : "Abstract (public)",
"github" : "",
"speaker" : "Your full name",
"date_start" : "time",
"date_end" : "time_end",
"title" : "Title",
"twitter" : "Your Twitter User-name/github account",
"type" : "What are you proposing?"
}
You can define these types:
- Workshop
- Talk
- Event (afterparty, lighting talks, lunch, coffee break,...)
- Import csv files to Amazon S3 Storage
- Download csv files from S3
- Create django admin interface for managing input/output csv and mapping columns