Skip to content
Snippets Groups Projects
Commit bef33217 authored by dcz's avatar dcz
Browse files

Zmiany poptrzebne do ładowania bazy

parent f4e940a0
Branches
Tags
No related merge requests found
......@@ -28,7 +28,7 @@ OPINION_MAP = {
}
def import_expansions():
xml_file = os.path.join(BASE_DIR, 'data', 'walenty', 'phrase_types_expand_20200926.xml')
xml_file = os.path.join(BASE_DIR, 'data', 'walenty', 'phrase_types_expand_20210913.xml')
xml_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), xml_file)
parser = make_parser()
......
#!/bin/bash
dropdb shellvalier
createdb shellvalier -E UTF8 -T template0 -l pl_PL.utf8
python3 manage.py migrate
python3 manage.py import_plWordnet
python3 manage.py import_tei
sudo su postgres -c "dropdb shellvalier"
sudo su postgres -c "createdb shellvalier -E UTF8 -T template0 -l pl_PL.utf8"
# reset the migrations since we create the DB from scratch
find . -path "*/migrations/*.py" -not -name "__init__.py" -delete
find . -path "*/migrations/*.pyc" -delete
python manage.py makemigrations
python manage.py migrate
rm import.log
time python manage.py start_import
time python manage.py import_expansions
time python manage.py import_plWordnet
time python manage.py import_tei
head import.log
wc import.log
#python manage.py check_descriptions
python manage.py generate_semantics_css
# TODO dev only!!!
python manage.py shell -c "from django.contrib.auth.models import User; User.objects.create_superuser('shell', '', 'valier')"
......@@ -32,7 +32,7 @@ def import_tei():
logging.basicConfig(filename='import.log', level=logging.DEBUG)
#xml_file = os.path.join(BASE_DIR, 'data', 'walenty', 'walenty_20200926_smaller.xml')
xml_file = os.path.join(BASE_DIR, 'data', 'walenty', 'walenty_20200926.xml')
xml_file = os.path.join(BASE_DIR, 'data', 'walenty', 'walenty_20210913_smaller.xml')
xml_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), xml_file)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment