This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
# 10000 questions for RDMO | |
This script uses faker to create a set of catalogs with a lot of questions. | |
## Setup | |
``` | |
cd rdmo-app | |
mkdir scripts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# needs to be installed with e.g. `pip install requests` | |
import requests | |
from pathlib import Path | |
access_token = '<access_token>' | |
url = 'https://zenodo.org/api/deposit/depositions/<id>' | |
path = Path('/path/to/the/files') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
RDMO=~/code/rdmorganiser/rdmo | |
RDMO_CATALOG=~/code/rdmorganiser/rdmo-catalog | |
python manage.py print_settings | grep -E '^DEBUG\s*=\s(True)' > /dev/null | |
[ $? -ne 0 ] && echo 'DEBUG is not True' && exit 1 | |
python manage.py check | |
[ $? -ne 0 ] && echo 'check failed' && exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
RDMO=~/code/rdmorganiser/rdmo | |
python manage.py print_settings | grep -E '^DEBUG\s*=\s(True)' > /dev/null | |
[ $? -ne 0 ] && echo 'DEBUG is not True' && exit 1 | |
python manage.py check | |
[ $? -ne 0 ] && echo 'check failed' && exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"id": "124990", | |
"full_name": "Lars ADAKTUSSON", | |
"first_names": [ | |
"Lars" | |
], | |
"last_names": [ | |
"Adaktusson" | |
], |