home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Products
TV-Server
XMLTV - Script EPG Multi-Source
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="azzuro" data-source="post: 1144328" data-attributes="member: 50482"><p>Hello,</p><p></p><p>i do, today an small script based on msdos for download EPG data from internet.</p><p></p><p>Download_EPG.bat</p><p>[code=dos]</p><p>REM Multi source Grabbing EPG V3 - from MediaPortal Software.</p><p></p><p>REM location</p><p>SET source_path=C:\ProgramData\Team MediaPortal\MediaPortal TV Server\xmltv</p><p>SET xmltv_path=C:\ProgramData\Team MediaPortal\MediaPortal TV Server\xmltv</p><p>SET Wget=".\tools\wgetwin\wget.exe"</p><p>SET Zip_tool=".\tools\unzip\unzip.exe"</p><p>SET log_path=%source_path%\log</p><p></p><p>REM location of the EPG file</p><p>SET EPG1_path=EPG1</p><p>SET EPG2_path=EPG2</p><p></p><p>REM EPG1 source and filename</p><p>REM URL from the source package</p><p>SET Zip_WebSource1="http://"</p><p>REM filename saved on your disk</p><p>SET file_name_in_zip1=EPG1.zip</p><p>REM Filename of the file present in the zip</p><p>SET file_name_in_xml1=complet.xml</p><p>REM filename output wanted</p><p>SET file_name_ou_xml1=EPG1.xml</p><p></p><p>REM EPG2 source and filename</p><p>SET Zip_WebSource2="http://"</p><p>SET file_name_in_zip2=EPG2.zip</p><p>SET file_name_in_xml2=tvguide.xml</p><p>SET file_name_ou_xml2=EPG2.xml</p><p></p><p>REM Log setting</p><p>SET Log_name=Grabbing_%Date:~-4% %Date:~-7,-5% %Date:~-10,-8%_%Time:~-11,-9% %Time:~-8,-6% %Time:~-5,-3%.log</p><p>SET Keep_file=2</p><p></p><p>cd "%source_path%"</p><p>REM Keep the last log files set to "Keep_file"</p><p></p><p>for /f "skip=%Keep_file% eol=: delims=" %%F in ('dir /b /a-d /o-d *.log') do del "%%F"</p><p></p><p>Echo EPG grabbing Version 2 '28/07/2015' >> "%Log_name%"</p><p>Echo Grabbing EPG Started - %Date:~-4%/%Date:~-7,-5%/%Date:~-10,-8% %Time:~-11,-9%:%Time:~-8,-6%:%Time:~-5,-3% >> "%Log_name%"</p><p>Echo. >> "%Log_name%"</p><p>Echo __________________________________________________________________ >> "%Log_name%"</p><p></p><p>REM : Create folder for download the EPG, WGet contain bug because don't create the folder.</p><p>mkdir %EPG1_path% >> "%Log_name%"</p><p>mkdir %EPG2_path% >> "%Log_name%"</p><p></p><p>Echo. >> "%Log_name%"</p><p>Echo download EPG Source file >> "%Log_name%"</p><p>Echo. >> "%Log_name%"</p><p></p><p>%Wget% -x -O "%source_path%/%EPG1_path%/%file_name_in_zip1%" -a "%source_path%/%Log_name%" %Zip_WebSource1%</p><p>%Wget% -x -O "%source_path%/%EPG2_path%/%file_name_in_zip2%" -a "%source_path%/%Log_name%" %Zip_WebSource2%</p><p></p><p>REM Unzip the XML EPG, if zipped</p><p>%Zip_tool% -o "%source_path%\%EPG1_path%\%file_name_in_zip1%" -d "%source_path%\%EPG1_path%" >> "%Log_name%"</p><p>%Zip_tool% -o "%source_path%\%EPG2_path%\%file_name_in_zip2%" -d "%source_path%\%EPG2_path%" >> "%Log_name%"</p><p></p><p>REM Delete previous EPG XML file available inside the dedicated EPG folder, and rename the new one.</p><p>del "%source_path%\%EPG1_path%\%file_name_ou_xml1%" >> "%Log_name%"</p><p>rename "%source_path%\%EPG1_path%\%file_name_in_xml1%" "%file_name_ou_xml1%" >> "%Log_name%"</p><p></p><p>REM Delete previous EPG XML file available inside the dedicated EPG folder, and rename the new one.</p><p>del "%source_path%\%EPG2_path%\%file_name_ou_xml2%" >> "%Log_name%"</p><p>rename "%source_path%\%EPG2_path%\%file_name_in_xml2%" "%file_name_ou_xml2%" >> "%Log_name%"</p><p></p><p>REM copy the both XML EPG to the XMLTV path</p><p>Echo. >> "%Log_name%"</p><p>copy /Y "%source_path%\%EPG1_path%\%file_name_ou_xml1%" "%xmltv_path%\%file_name_ou_xml1%" >> "%Log_name%"</p><p>copy /Y "%source_path%\%EPG2_path%\%file_name_ou_xml2%" "%xmltv_path%\%file_name_ou_xml2%" >> "%Log_name%"</p><p></p><p>Echo. >> "%Log_name%"</p><p>Echo Grabbing Finished - %Date:~-4%/%Date:~-7,-5%/%Date:~-10,-8% %Time:~-11,-9%:%Time:~-8,-6%:%Time:~-5,-3% >> "%Log_name%"</p><p>[/code]</p><p></p><p>tvguide.lst</p><p>[code]EPG1.xml</p><p>EPG2.xml[/code]</p><p></p><p>V3: 13/01/2016</p><p>solve few error in path.</p><p></p><p>V2 - 28/07/2015</p><p>- modified the unzip program FBzip > unzip Msdos '"PKUnzip"</p><p>- EPG are stored in their own folder.</p><p>- add Log file, with the last 3 files available.</p></blockquote><p></p>
[QUOTE="azzuro, post: 1144328, member: 50482"] Hello, i do, today an small script based on msdos for download EPG data from internet. Download_EPG.bat [code=dos] REM Multi source Grabbing EPG V3 - from MediaPortal Software. REM location SET source_path=C:\ProgramData\Team MediaPortal\MediaPortal TV Server\xmltv SET xmltv_path=C:\ProgramData\Team MediaPortal\MediaPortal TV Server\xmltv SET Wget=".\tools\wgetwin\wget.exe" SET Zip_tool=".\tools\unzip\unzip.exe" SET log_path=%source_path%\log REM location of the EPG file SET EPG1_path=EPG1 SET EPG2_path=EPG2 REM EPG1 source and filename REM URL from the source package SET Zip_WebSource1="http://" REM filename saved on your disk SET file_name_in_zip1=EPG1.zip REM Filename of the file present in the zip SET file_name_in_xml1=complet.xml REM filename output wanted SET file_name_ou_xml1=EPG1.xml REM EPG2 source and filename SET Zip_WebSource2="http://" SET file_name_in_zip2=EPG2.zip SET file_name_in_xml2=tvguide.xml SET file_name_ou_xml2=EPG2.xml REM Log setting SET Log_name=Grabbing_%Date:~-4% %Date:~-7,-5% %Date:~-10,-8%_%Time:~-11,-9% %Time:~-8,-6% %Time:~-5,-3%.log SET Keep_file=2 cd "%source_path%" REM Keep the last log files set to "Keep_file" for /f "skip=%Keep_file% eol=: delims=" %%F in ('dir /b /a-d /o-d *.log') do del "%%F" Echo EPG grabbing Version 2 '28/07/2015' >> "%Log_name%" Echo Grabbing EPG Started - %Date:~-4%/%Date:~-7,-5%/%Date:~-10,-8% %Time:~-11,-9%:%Time:~-8,-6%:%Time:~-5,-3% >> "%Log_name%" Echo. >> "%Log_name%" Echo __________________________________________________________________ >> "%Log_name%" REM : Create folder for download the EPG, WGet contain bug because don't create the folder. mkdir %EPG1_path% >> "%Log_name%" mkdir %EPG2_path% >> "%Log_name%" Echo. >> "%Log_name%" Echo download EPG Source file >> "%Log_name%" Echo. >> "%Log_name%" %Wget% -x -O "%source_path%/%EPG1_path%/%file_name_in_zip1%" -a "%source_path%/%Log_name%" %Zip_WebSource1% %Wget% -x -O "%source_path%/%EPG2_path%/%file_name_in_zip2%" -a "%source_path%/%Log_name%" %Zip_WebSource2% REM Unzip the XML EPG, if zipped %Zip_tool% -o "%source_path%\%EPG1_path%\%file_name_in_zip1%" -d "%source_path%\%EPG1_path%" >> "%Log_name%" %Zip_tool% -o "%source_path%\%EPG2_path%\%file_name_in_zip2%" -d "%source_path%\%EPG2_path%" >> "%Log_name%" REM Delete previous EPG XML file available inside the dedicated EPG folder, and rename the new one. del "%source_path%\%EPG1_path%\%file_name_ou_xml1%" >> "%Log_name%" rename "%source_path%\%EPG1_path%\%file_name_in_xml1%" "%file_name_ou_xml1%" >> "%Log_name%" REM Delete previous EPG XML file available inside the dedicated EPG folder, and rename the new one. del "%source_path%\%EPG2_path%\%file_name_ou_xml2%" >> "%Log_name%" rename "%source_path%\%EPG2_path%\%file_name_in_xml2%" "%file_name_ou_xml2%" >> "%Log_name%" REM copy the both XML EPG to the XMLTV path Echo. >> "%Log_name%" copy /Y "%source_path%\%EPG1_path%\%file_name_ou_xml1%" "%xmltv_path%\%file_name_ou_xml1%" >> "%Log_name%" copy /Y "%source_path%\%EPG2_path%\%file_name_ou_xml2%" "%xmltv_path%\%file_name_ou_xml2%" >> "%Log_name%" Echo. >> "%Log_name%" Echo Grabbing Finished - %Date:~-4%/%Date:~-7,-5%/%Date:~-10,-8% %Time:~-11,-9%:%Time:~-8,-6%:%Time:~-5,-3% >> "%Log_name%" [/code] tvguide.lst [code]EPG1.xml EPG2.xml[/code] V3: 13/01/2016 solve few error in path. V2 - 28/07/2015 - modified the unzip program FBzip > unzip Msdos '"PKUnzip" - EPG are stored in their own folder. - add Log file, with the last 3 files available. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Products
TV-Server
XMLTV - Script EPG Multi-Source
Contact us
RSS
Top
Bottom