-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Import-Scripts für Artikel und User-Exporte
- Loading branch information
Bernd Ritter
committed
Apr 19, 2024
1 parent
110e331
commit 00f6345
Showing
3 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
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
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 | ||
|
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
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 | ||
|
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
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" |