You are here

Create a hash (-) to include date & time next to program title

19 posts / 0 new
Last post
EPGFreak
Offline
Donator
Joined: 5 years
Last seen: 1 month
Create a hash (-) to include date & time next to program title

Is there a way to include a hash (-) followed by the date & time of the program next to the title name?

For instance: "Seinfeld - Sunday @ 1pm PT"

Where by the program title Seinfeld would show up in the EPG, but modify the ini to match and include the date|time|timezone next to it?

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 6 min

it could be done but not in any universal way,every ini u use would have to be individually modified as when modifying titles there are a few thing that have to be considered.
I tried it on a random one I picked and mananged todo it.

Attachments: 
EPGFreak
Offline
Donator
Joined: 5 years
Last seen: 1 month

Yes, this is exactly what I am looking for. I am hoping to do this in the directv.com.ini. I am not sure how I would go about doing this with its existing template. I am able to remove unnecessary categories, but I need to include the same format you have in your sample file. No sub-title description necessary. I only want the title along with the day and time to show......

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 6 min

as I said every ini is different,here's the issue with this one...
the start/stop time the ini scrubs is in UTC time, so this would be the only time available to be displayed.
so a user on the east coast(new York for example) would see a time that's 4 hrs earlier(new York is currently UTC+0400) than what their guide time would be for the program.

even if the guide.xml times were in say new York local time for example the correct matching time would only be dispayed for uses in the same timezone.

for someone on the west coast(la for example) would see a time that's 7 hrs earlier(la is UTC+0700 currently).

this happens because when the guide.xml is imported the epg software adjusts all times in the data to the users local time when its dsplayed.

EPGFreak
Offline
Donator
Joined: 5 years
Last seen: 1 month

I understand. Is there a way to modify it to reflect ET? My goal is to have all times shown as ET in the description. Since the EPG will load according to the user's time, they will still see - DATE @ TIME (ET) next to the title. Is that doable?

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 6 min

add this after your index_start.scrub line

index_temp_2.modify {calculate(format=date,dddd)}
index_temp_3.modify {substring(type=regex)|'index_start' "(\d{1,2}:\d{1,2}):\d{1,2}$"}
index_temp_3.modify {calculate(format=time,h:mmtt)|'index_temp_3' 4:0 +}
index_title.modify {addend| - 'index_temp_2' @ 'index_temp_3' ET}

again,this isn't bulletproof because when November comes ET timezone observes DST so above where I add 4:0 hrs to the time it would need to be changed to 5:0 for the time to be correct,then in march next year it would need to be changed back to 4:0.
maybe some more code could be added to possibly figure this out but I ant getting that fancy.

EDIT: it wasn't working correctly,use new code above

Attachments: 
EPGFreak
Offline
Donator
Joined: 5 years
Last seen: 1 month

It added the time, but it is all showing the same date and time after I generated the xml. For exmple, all entries have appended - Sunday & 4:00AM ET at the end of every program title.

Any clues why it's posting a static time instead of pulling from the program date & time?

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 6 min

most likely because of the wg version your using,i use 2.1.9
there some changes made for date/time calculations from theis version foreward,its suppost to be backwards compatible for prior wg versions.

EPGFreak
Offline
Donator
Joined: 5 years
Last seen: 1 month

I am using 2.1.10. I noticed that the date just changed to Monday. But it is adding the same date to all future events.

Here is the modified ini that I am working with.

Attachments: 
Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 6 min

I see the prob,ur index_start.scrub is diff than my ini,change..

index_temp_3.modify {substring(type=regex)|'index_start' "(\d{1,2}:\d{1,2}):\d{1,2}$"}

to

index_temp_3.modify {substring(type=regex)|'index_start' "(\d{1,2}:\d{1,2})$"}

EPGFreak
Offline
Donator
Joined: 5 years
Last seen: 1 month

Ok, almost there The times are changing, but they are in 24hr time instead on 12hr time frame.

Also, all the days show MONDAY. Could I be possibly missing something with the day as well?

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 6 min

yes,it should be -4 hrs.thks
heres a better way todo it as it will get the correct offset from UTC regardless if its in DST or not so no modifications are needed for DST.
you must use wg 2.1.10 as only it has bug fix for the timezone calculation,any earlier version of wg will not give the correct results.

index_temp_2.modify {calculate(format=date,unix)|'index_start'}
index_temp_2.modify {calculate(timezone=America/New_York)}
index_temp_2.modify {calculate(format=date,unix)}
index_temp_3.modify {calculate(format=date,dddd)|'index_temp_2'}
index_temp_4.modify {calculate(format=time,h:mmtt)|'index_temp_2'}
index_title.modify {addend| - 'index_temp_3' @ 'index_temp_4' ET}

Attachments: 
EPGFreak
Offline
Donator
Joined: 5 years
Last seen: 1 month

Thank you guys, that seem to work for the time schedule.

Another issue which has surfaced is that the title include a (?) in it. Is there a proper way to comment this out from the title string or comment out any text that comes after the title I would like to show?

Monday @ 4:00PM ET (?) <---- I want to remove the (?) from the text. I am using 2.1.10.0

I tried to use index_title.modify {remove("(?)"}, but it does not remove it...

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 6 min

u must have modified this ini as your missing your details title scrub.
add this line

title.modify {addstart|'index_title'}

the reason for the (?) and why it cannot be removed is here..
http://www.webgrabplus.com/faq#faq_834

EPGFreak
Offline
Donator
Joined: 5 years
Last seen: 1 month

I haven't made many modifications from the directv.com ini that comes in the latest site pack.

Where do I place the comment title.modify {addstart|'index_title'} in this bracket?

scope.range {(indexshowdetails)|end}
index_start.scrub {regex||"airTime":"(\d{4}-\d{1,2}-\d{1,2}T\d{1,2}:\d{1,2}):||}

index_temp_2.modify {calculate(format=date,unix)|'index_start'}
index_temp_2.modify {calculate(timezone=America/New_York)}
index_temp_2.modify {calculate(format=date,unix)}
index_temp_3.modify {calculate(format=date,dddd)|'index_temp_2'}
index_temp_4.modify {calculate(format=time,h:mmtt)|'index_temp_2'}
index_title.modify {addend| - 'index_temp_3' @ 'index_temp_4' ET}

index_duration.scrub {single|"duration":||,|,}
index_title.scrub {single|"title":"||"|"}
index_title.modify {remove("(?)"}

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 6 min

after the end_scope line where the temp_1 lines is

EPGFreak
Offline
Donator
Joined: 5 years
Last seen: 1 month

Thank you for your patience and continued support. Regarding the ini, is it possible to include a code that will either comment out or modify the header that appears in the generated xml file?

For instance, this is the header on my xml file:

I would like to modify the name and url. I am curious to know if I can automatically do this via the ini file or if I have to edit it directly in the xml file each time I generate a new file.....

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 6 min

it has to be removed manually(or via a script) after wg runs as its hard coded in the exe.

EPGFreak
Offline
Donator
Joined: 5 years
Last seen: 1 month

Thanks, that makes sense.

With regard to the EPG grabs, are there any recommended programs that will run the grab daily and upload it to an FTP folder? I am not finding an app that will marry the custom ini file that I have along with WGP......

Any advice on programs or scripts that can run this on a Windows OS will be appreciated....

Log in or register to post comments

Brought to you by Jan van Straaten

Program Development - Jan van Straaten ------- Web design - Francis De Paemeleere
Supported by: servercare.nl