Skip to content

Commit

Permalink
Import-Scripts für Artikel und User-Exporte
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernd Ritter committed Apr 19, 2024
1 parent 110e331 commit 00f6345
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tools/scripts/import_articles
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

APIUSER=dummy
APITOKEN=ADDB0F5E7826C857D7376D1BD9BC33C0C544790A2EAC96144A8AF22B1298C940
PG_PASSWORD=geheim
ARTICLE_DIR=$1

BASE_FILES=$(find $1/article-*.xml -type f | sort)

PG_PASSWORD=geheim

for i in $BASE_FILES; do
echo "Importing $i"
curl -u $APIUSER:$APITOKEN -X POST -H "Accept: application/xml" -H "Content-Type: application/xml" http://localhost:8080/holarseweb/api/import/articles -d @$i
done

16 changes: 16 additions & 0 deletions tools/scripts/import_users
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

APIUSER=dummy
APITOKEN=ADDB0F5E7826C857D7376D1BD9BC33C0C544790A2EAC96144A8AF22B1298C940
PG_PASSWORD=geheim
ARTICLE_DIR=$1

BASE_FILES=$(find $1/user-*.xml -type f | sort)

PG_PASSWORD=geheim

for i in $BASE_FILES; do
echo "Importing $i"
curl -u $APIUSER:$APITOKEN -X POST -H "Accept: application/xml" -H "Content-Type: application/xml" http://localhost:8080/holarseweb/api/import/users -d @$i
done

3 changes: 3 additions & 0 deletions tools/scripts/refresh_searchindex
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

docker-compose -f doc/docker-compose.yml exec -T db psql -v ON_ERROR_STOP=1 -U holarse -d holarse -c "refresh materialized view mv_searchindex"

0 comments on commit 00f6345

Please sign in to comment.