GuiLite/sync.bat

17 lines
688 B
Batchfile
Raw Normal View History

2018-11-01 10:35:37 +08:00
echo off
set url="https://api.powerbi.com/beta/72f988bf-86f1-41af-91ab-2d7cd011db47/datasets/2ff1e8a8-2f6f-4d73-a75d-86829e3f4574/rows?key=8f5xLp1gP8%%2FzSee4vCUBcyjR65I9zZ6nb%%2B%%2F7bbzex%%2FSctLX3ntIlAR0sxWpDdguuYyDtLdHK%%2Fxbxj%%2FrSBkX7eQ%%3D%%3D"
2018-09-03 17:14:03 +08:00
set date=
for /f "tokens=2-4 delims=/ " %%a in ("%date%") do (set MM=%%a& set DD=%%b& set YYYY=%%c)
2018-11-01 10:35:37 +08:00
set datetime=%YYYY%-%MM%-%DD%T%time: =0%0+0800
set devie_info=Win-%USERNAME%
2018-09-03 17:14:03 +08:00
set raw_data=[{^
2018-11-01 10:35:37 +08:00
\"device_info\" :\"%devie_info%\",^
\"project_info\" :\"%1\",^
\"time\" :\"%datetime%\",^
\"weight\" : 1^
2018-09-03 17:14:03 +08:00
}]
2018-09-12 12:43:11 +08:00
curl.exe --include --request POST --header "Content-Type: application/json" --data-binary^
2018-09-03 17:14:03 +08:00
"%raw_data%" "%url%"