Hi,
I am looking for an example config.xml and/or .ini file that includes channel icon url links. I want to use specific channel URL image links, but I can't seem to figure out where to insert the link in the config file nor can I find a thread that shows a sample working config file that shows in the destination XML file.
Thank you for helping.
please any help with that as I need it too
The way I do it (and there is probably a much better way as you will see why in a min) is once you have grabbed the epg data open your epg xml file
Look at the top of the xml and you will see a list of channel details
See my file in attachment as an example and add the icon src line for adding a channel logo
Now here comes the issue.
The next time you run the webgrab it will replace all the channel data in the xml file so you will need to copy and paste all the channel data with your image links you have done into a seperate file and then copy it all back replacing the updated epg channel data once you run webgrab again.
There is probably a much better way that can auto insert the images either from a seperate file or directly by telling the ini how to do it but i've no idea how
The way I do it so I don't have to edit the guide each run is in my site ini I have this:
index_temp_9.modify {substring(type=regex)|'config_site_id' "Icon:([^,]*)"}
index_urlchannellogo.modify {addstart('index_temp_9' not="")|http://myserver/path/to/image/folder/'index_temp_9'}
index_temp_9 might be different for you based on how many index_temp_X are in your .ini file. This allows me to set the following in my config.xml file:
channel update="i" site="siteini" site_id="stuff_that_goes_here,Icon:My Icon.png" xmltv_id="Whatever"
So what this does is in the site ini when the channel is being processed, it will check the site_id for a regex match of Icon: and take whatever is there as the image value. Note that if you add a space after the : that will be included as part of the image file name. You can also replace the comma there with something else if the site ini file uses those as a separator, you just need to modify the regex ^, to be ^separator IE: ^| would be used if | is used as the separator in the site_id for the channel.
This allows me to quickly add new channels and channel logo images without the need of manually editing the XML every time it runs and is adaptable for most site ini files.
I tested this and it works great thanks however some of my site ini files are encrypted so I can't add this code to it.
Is there a way to add the channel logo url automatically after its grabbed the epg data. I presume via rex
just curious which siteini don't have logo ? or do you want to add your own ?
tvguide.com doesn't have logos but I got that working with the siteini addition posted
tvguide.co.uk pulls channel logos automatically but if I replace the code it uses with the one posted above it no longer recognizes the site id and doesn't pull any data
This is what is in the tvguide.co.uk site.ini
index_variable_element.modify {set|'config_site_id'}
index_urlchannellogo.modify {addstart|http://my.tvguide.co.uk/channel_logos/'index_variable_element'.png}
So it pulls the logo from that web address and it pulls the image that matches the site id. Eg if site id is 127 then it pulls 127.png
However I want to change it so it's like the example posted in the post earlier so I can put my own link in. I can change the url but unless the url ends 127.png it won't work and in the case of file hosting sites it will give you a random share link so it won't work.
I've got around it by uploading the image and calling it 127.png to github as that uses a direct link with the raw address that ends 127.png so that works
The encrypted ones do automatically grab channel logos but I just wondered if you wanted to automatically add your own or change the ones that are grabbed after they are grabbed when you can't edit the site ini
Like mentioned above tvguide doesn't have them, not sure on about other siteini, I know tvtv.us has them. I also add it in to be available in fixed.ini. I use custom logos that are white or the colors are more friendly to be displayed on a darker guide background.
Sparklesunshine: I haven't tried messing with rex post-processing yet, so don't have an answer on that one yet.
How you did it for the fixed ini
It didn't work for me
Would you share your fixed ini file
Many thanks
For fixed ini to maintain same format it uses:
index_temp_1.modify {substring(type=regex)|'config_site_id' "Icon:([^#]*)"}
index_urlchannellogo.modify {addstart('index_temp_1' not="")|http://server/path/to/images/'index_temp_1'}
Example channel that would be in the config, note Icon: followed by icon file name:
<channel update="f" site="fixed" site_id="00:00-23:59##title:My Show##description:This is a show##Icon:MyIcon.png####" xmltv_id="ID">My Channel</channel>
many thanks for the explanation. this work perfectly if you have it as one line but in my case I do it with multiple line like the following
please see picture
any suggestion..
many thanks
Should be 2 #'s before Icon: ##Icon:cyc.png####
Even though the Icon addition only looks for Icon: and then uses everything after Icon: until it detects a #, the other parsing for description etc. that comes with the fixed ini looks for double ## for splitting each section.
many thanks
this works like magic, many thanks again for your time and prompt responses.
for after the fact edit of the guid.xml file .. I use Git software with Shell scripts
so you create a txt file with the following and when save it replace extension to .sh
#!/bin/sh
cd /c/data/EPG "guide path location"
sed -i '819a ' guid.xml
sed -i '816s ' guid.xml
if you notice the
819a is the line number I want to insert the icon after
816s is the line number I want to replace. like an icon link and I want to to replace it with mine
to identify the line number I use Notepad++
another trick that I start from the line number from bottom( 819 the 816) as when you add number the the line number sequence get shifted so start from the bottom will not affect the sequence you want to edit.
and you can run the shell from windows task after your Wbgraber completed.
thanks
Hi all channel logo seekers !!
a very interesting conversation with some amazing suggestion for a solution!!
For some time already I was working on a more general addition WG++ ... a plugin that can be used in the POSTPROCESSOR
It is intended as a general purpose addition. It allows to run a 'plugin' , that must be an executable utility/app/program , that the user can run as part of the POSTPROCESSOR
Example, interesting for you guys, to add or change the channel logos. Let me explain how that will work :
Suppose there is a small program 'add_logos.exe' . It reads a file (e.g. my_logos.ini) with all the channel logos you want in your xmltv and does just that!!
In your config file you specify it , see config.xml
The content of 'my_logos.ini' looks like this (xmltv_id, logo value):
TV Câmara , https://www.net.com.br/imagens/logo/tv_camara-1680_95x39.png
TV Brasil , https://www.net.com.br/imagens/logo/tv_brasil-1683_95x39.png
PREMIERE HD 3 ³ , https://www.net.com.br/imagens/logo/premiere_hd_3_-1175_95x39.png
Suppose the channel section of your guide.xml is, see attached guide.xml
Notice this :
'TV Câmara' the logo in my_logos is different from that in guide.xml
'TV Brasil', has no logo in the guide.xml
'Premiere HD 2' has no value in my_logos.ini
'PREMIERE HD 3 ³' has the same value in guide.xml and my_logos.ini
The result after it ran, see guidelogos.xml..
I have a reasonable working version of this 'add_logos.exe' and I also implemented the 'plugin' option of the POSTPROCESSOR.
I expect to release them in the coming days ...
pls let me know if you have any extra suggestions
Jan
That sounds great. Will make maintaining the channel icons and adding new ones a lot easier, really excited to see this addition and thanks for all the hard work!
I've found another way to replace a channel logo after grabbing
I have uploaded my example script and instructions - unzip the attachement
Basically it is a script that will replace the logo line in your xml with what you tell it to replace it with.
It is different from the example posted above because instead of telling it what line number to replace you tell it exactly what text to replace. This eliminates the possibility of line numbers changing each grab.
So every time you run WebGrab+Plus it should replace your change with the original url of the logo from what it grabs into your xml. Running the script will replace that again with what ever you want to replace it with assuming the orig url hasn't changed
Hello WGMaker
many thanks for releasing the add_logo.exe
I just extract the add_logo.exe folder within the same location. has my logo ini file in my siteini.pack folder and run it
but nothing happen it did not create the out put xml file
what I am missing?
WebGrab+Plus/w MDB & REX Postprocess -- version V3.1.3.3
[ Info ] Job (add_logo.exe /in=arEPG.v1.xml /out=logos.arEPG.v1.xml /logos=my_logos.ini) started at 10/11/2020 21:36:00
[ Info ] Job (add_logo.exe /in=arEPG.v1.xml /out=logos.arEPG.v1.xml /logos=my_logos.ini) finished at 10/11/2020 21:36:00 done in 0s
then I start moving add_logo.exe and my_logo ini everywhere {same directory like XML file , main directory for Webgraber etc} still the same issue.
please advise
Hi, it is a bit difficult to figure out what goes wrong with just the .jpg screen copies. Please send me the following files to [email protected] :
* my_logos.ini
* arEPGv1.xml (or just the channel part)
* the webgrab++.log.txt (of the run that failed)
* the config file
From the jpg's it is not fully clear what the locations of the files is.
The easiest way is to have everything in the same folder as the webgrab++.config as that is the default path for add_logo
* add_logo.exe + arEPG.v1.xml + my_logos.ini
If you decide for another location, you must include the full path for each of them e.g.
I assuming your /in file is on that default location,
/in=arEPG.v1.xml /out=logos.arEPG.v1.xml /logos=..\appdata\local\webgrab+plus\siteini.pack\my_logos.ini
What I wonder is, if some of the files are not found by add_logo, there must be some warning/error in the log file?
We will fix this ... Jan
Hello! I am having same issue and after following your steps I'm still in the same situation. Any solution?
Thank you in advance :)
I've written a simple guide to most of the basic WebGrabPlus functions
Goto https://webgrabplusguide.github.io
Read from the part "Channel Logos"
The first part you can add/change a line in the siteini so it adds the channel logo which points to a file on for example github that matches the name of site_id
Second part is "Change channel logos on encrypted siteinis or post grab" for if the siteini grabs a logo but you want to change it automatically via a script without editing the siteini
The third part is "Add channel logo line via script post grab" if the siteini doesn't pull a logo line at all & you don't want to edit the siteini
Thankyou very much, sparklesunshine!
I am terrible noob, so it is being difficult for me.
I was expecting a solution for the add_logo plugin that has been added recently.
I am not sure about my abilities running scripts yet, so I hope @wgmaker or @bebawy6 have an answer from their previous discussion.
upload webgrab log
Yes, sure!
I am uploading the files
EDITED NO CONFIG WITH LICENSE INFO !!
[ ] WebGrab+Plus/w MDB & REX Postprocess -- version V3.1.0.0
http://webgrabplus.com/content/introducing-postprocess-plugin
add logo wasnt added until webgrab 3.1.4 beta
upgrade to 3.1.5