mirror of
https://github.com/PR0M3TH3AN/VoxVera.git
synced 2025-09-09 15:38:43 +00:00
Add batch import script
This commit is contained in:
@@ -15,10 +15,11 @@ done
|
||||
|
||||
CONFIG_PATH="src/config.json"
|
||||
FROM_PDF=""
|
||||
NON_INTERACTIVE=0
|
||||
|
||||
usage() {
|
||||
echo "Usage: $0 [-c config_path] [--from-pdf PDF]"
|
||||
echo "Create and deploy a flyer based on config.json."
|
||||
echo "Usage: $0 [-c config_path] [--from-pdf PDF] [--no-interaction]"
|
||||
echo "Create and deploy a flyer based on config.json."
|
||||
exit 1
|
||||
}
|
||||
|
||||
@@ -33,6 +34,10 @@ while [[ $# -gt 0 ]]; do
|
||||
FROM_PDF="$2"
|
||||
shift 2
|
||||
;;
|
||||
-n|--no-interaction)
|
||||
NON_INTERACTIVE=1
|
||||
shift
|
||||
;;
|
||||
-h|--help)
|
||||
usage
|
||||
;;
|
||||
@@ -89,10 +94,12 @@ update_config_from_pdf() {
|
||||
rm -rf "$tmpdir"
|
||||
}
|
||||
|
||||
if [[ -n "$FROM_PDF" ]]; then
|
||||
update_config_from_pdf
|
||||
else
|
||||
update_config_interactive
|
||||
if [[ $NON_INTERACTIVE -eq 0 ]]; then
|
||||
if [[ -n "$FROM_PDF" ]]; then
|
||||
update_config_from_pdf
|
||||
else
|
||||
update_config_interactive
|
||||
fi
|
||||
fi
|
||||
|
||||
# Regenerate QR codes based on the updated configuration
|
||||
|
Reference in New Issue
Block a user