@echo off

chcp 65001
chcp 932

set prog="get_WEBconf.py"
set outfile="WEB_new.conf"


rem --- from  sourceforge (forbidden to access by App?)
set url="http://downloads.sourceforge.net/project/pmsforregza/Config/Latest/WEB.conf?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fpmsforregza%2Ffiles%2FConfig%2FLatest%2F&ts=1475987664&use_mirror=jaist"
set url="https://sourceforge.net/projects/pmsforregza/files/Config/Latest/WEB.conf"
set url="https://sourceforge.net/projects/pmsforregza/files/Config/Latest/KwdList.conf/download?source=file"


rem --- from @wiki pms_regza「通常ページ(https://www32.atwiki.jp/pms_regza/pages/37.html）」
set url="https://www32.atwiki.jp/pms_regza?cmd=upload&act=open&pageid=37&file=WEB.conf"

rem --- from @wiki pms_regza 「ウィキ内共通利用ファイル管理（https://www32.atwiki.jp/_mng/admin_pub.php）」
set url="http://img.atwikiimg.com/www32.atwiki.jp/pms_regza/pub/config/Latest/WEB.conf"

if not exist %prog% cd utility
set opt=%1
if "%opt%"=="" set opt="taiwa=1"

python %prog% %url% %outfile% %opt%

if %opt% == "taiwa=1"  pause
rem pause

rem https://sourceforge.net/projects/pmsforregza/files/latest/download?source=files