Skip to content

Instantly share code, notes, and snippets.

@altipard
Created October 27, 2016 10:31
Show Gist options
  • Select an option

  • Save altipard/f4b67db27456d75f09e8eda50451c4d0 to your computer and use it in GitHub Desktop.

Select an option

Save altipard/f4b67db27456d75f09e8eda50451c4d0 to your computer and use it in GitHub Desktop.
#!/bin/bash
WS_AUTH_USER=user # username for export
WS_AUTH_PW=password # password for user
TERMBASE_ID=1 # id of termbase
FILE_FORMAT=csv # choose ONE from xls|csv|multiterm|tbx
QUERY=* # use * for all terms
SRC_LANG_ID=1 # id of source language use x|y|z for multiple ids
TGT_LANG_ID=2 # id of target language use x|y|z for multiple ids
BASE_URL="http://www.example.com" # base url of termxplorer
DUMPDATE=$(date +%Y%m%dT%H%M)
URL="$BASE_URL/service.php?t=export&WS_AUTH_USER=$WS_AUTH_USER&WS_AUTH_PW=$WS_AUTH_PW&termbase_id=$TERMBASE_ID&file_format=$FILE_FORMAT&q=$QUERY&src_lang_id=$SRC_LANG_ID&tgt_lang_ids=$TGT_LANG_ID"
echo $URL
wget -O "$DUMPDATE.$FILE_FORMAT" $URL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment