https://github.com/gesiscss/binder_gallery
Binder Gallery for GESIS Notebooks
https://github.com/gesiscss/binder_gallery
binder gallery gesis-binder
Last synced: 11 months ago
JSON representation
Binder Gallery for GESIS Notebooks
- Host: GitHub
- URL: https://github.com/gesiscss/binder_gallery
- Owner: gesiscss
- License: mit
- Created: 2019-01-18T13:39:55.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-05-01T20:32:42.000Z (about 3 years ago)
- Last Synced: 2025-04-19T19:05:17.842Z (over 1 year ago)
- Topics: binder, gallery, gesis-binder
- Language: Python
- Homepage: https://notebooks.gesis.org/gallery/
- Size: 6.06 MB
- Stars: 5
- Watchers: 14
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Binder Gallery
Binder Gallery for [GESIS Notebooks](https://notebooks.gesis.org/)
## Run the gallery locally
1. Clone the repository and get into it
```bash
git clone https://github.com/gesiscss/binder_gallery.git
cd binder_gallery
```
2. [Create and activate a virtual environment](http://flask.pocoo.org/docs/1.0/installation/#virtual-environments)
with python version at least 3.7.
3. Install dependencies:
```bash
pip install -r dev_requirements.txt
```
4. Set required environment variables
```bash
export FLASK_APP=binder_gallery
export FLASK_ENV=development
# for windows
set FLASK_APP=binder_gallery
set FLASK_ENV=development
```
5. Create a local sqlite3 db and apply migrations
```bash
python manage.py db upgrade
```
6. Run the application
```bash
flask run
```
### Create user
1. With `create-user` command:
```bash
flask create-user
```
2. With flask shell:
2.1. Start a flask shell
```bash
flask shell
```
2.2. Run this code to create a user:
```python
from binder_gallery.models import User
User.create_user("name", "password")
```
## To have custom configuration
1. Create a config file `local_config.py` under project folder `binder_gallery`
2. Put your custom configuration:
```python
from config import Config as BaseConfig
class Config(BaseConfig):
# add your custom configuration here
```
3. Define the env variable for custom config:
```bash
export BG_APPLICATION_SETTINGS=local_config.Config
# for windows
set BG_APPLICATION_SETTINGS=local_config.Config
```
## TODOs
1. Remove GESIS related parts (templates, static files...)?
---
Funded by the German Research Foundation (DFG).
FKZ/project number:
[324867496](https://gepris.dfg.de/gepris/projekt/324867496?context=projekt&task=showDetail&id=324867496&).