You are here

Unable to use element variable

3 posts / 0 new
Last post
alfabe
Offline
Joined: 5 years
Last seen: 5 years
Unable to use element variable

Hello,

I am trying to make an ini file on macos over mono 5.20.

But I am unable to use scrubbed temp element. I simpy try to add the hour from temp_2 to the end of the temp_1. I tried addend, addstart, replace with 'element' but they did not work.

Here is the snippet of the ini file

Quote:

index_showsplit.modify {sort(ascending,string)}
sort_by.scrub {single(target="index_showsplit")|"no"|:|,|,}
index_showsplit.modify {cleanup}
*

index_temp_1.scrub {regex||"day": "(.*?)", "||}
index_temp_1.modify {calculate(format=date,yyyy-MM-ddThh:mm:ssZ)|1:0 +}

index_temp_2.scrub {regex||"start_date": "[\d-]*(T.*?Z)", "||}
temp_3.scrub {regex||"end_date": "[\d-]*(T.*?Z)", "||}

index_temp_1.modify{substring(type=regex)|([\d-]*)T.*?Z}
index_temp_1.modify{addend(debug)|'index_temp_2'}

Here is the debug output.

Quote:

[ Debug ] Element: INDEX_TEMP_1
[ Debug ] Modify
[ Debug ] command & arguments : addend(debug)
[ Debug ] Expression-1 : 'index_temp_2'
[ Debug ] Element value before operation:
[ Debug ] 2019-06-16
[ Debug ] String composer result for Expression-1 :
[ Debug ] Expression-1 expanded :
[ Debug ] Element value after operation:
[ Debug ] 2019-06-16
[ Debug ] Debugging information SiteIni
[ Debug ] Element: INDEX_TEMP_1
[ Debug ] Modify
[ Debug ] command & arguments : addend(debug)
[ Debug ] Expression-1 : 'index_temp_2'
[ Debug ] Element value before operation:
[ Debug ] 2019-06-16
[ Debug ] String composer result for Expression-1 :
[ Debug ] Expression-1 expanded :
[ Debug ] Element value after operation:
[ Debug ] 2019-06-16
[ Debug ] Debugging information SiteIni

mat8861
Online
WG++ Team memberDonator
Joined: 9 years
Last seen: 4 min

the operations you are doing are wrong and it seems all very confusing. Without a base and knowing clearly what you want to do is impossible

alfabe
Offline
Joined: 5 years
Last seen: 5 years

Well, the grabbed data is not correct. To get the correct full date, I had to take dd:mm:yy(always gives me a day before) from "day" and hour data from "start_date" and "end_date". That's why the code is a little bit messy.

For example, here's the today's grabbed data

Quote:

{
"status": true,
"schedule": [
{
"si_traffic_key": "da05de77f13b4dd980ce",
"audience_groups": 12,
"planning": "",
"created_by": "msgold",
"year": "2003",
"id": "5cc17032cfef0b5e4539f663",
"subject": "Vegas'ta Son Şans (The Cooler) Tür: Dram - Romantik Yönetmen: Wayne Kramer Oyuncular: William H. Macy, Maria Bello, Alec Baldwin",
"modified_date": "2019-06-14T13:38:07.928000Z",
"modified_by": "msgold",
"no": 5802129,
"actor": "",
"audio_subtitles": 3,
"application": "com.epg",
"start_date": "2019-06-13T21:45:00Z",
"channel": "58d29bb0eefad3db9c606260",
"description": "Bernie Lootz, dünyanın en şanssız adamlarından birisi. Üstelik bu hastalığı son derece de bulaşıcı. Shelly Kaplow isimli bir casino patronu tarafından kiralanır. Kaplow'un amacı büyük oyuncuların talihini ortadan kaldırmaktır. Adamın kötü şansı onlara da bulaşacak ve kimse büyük paralar kazanamayacaktır! En İyi Yardımcı Erkek Oyuncu dalında Alec Baldwin Oscar'a aday gösterildi. (Dil: Türkçe/Orijinal - Altyazı: Türkçe/İngilizce)",
"end_date": "2019-06-14T00:25:00Z",
"director": "",
"genre": "sinema/genel",
"program_name": "Vegas'ta Son Şans",
"day": "2019-06-15T21:00:00Z",
"episode": "",
"screen_violence": 4,
"created_date": "2019-06-14T13:38:08.027000Z",
"_id": "5d03a340cfef0b5855783296"
},
{
"si_traffic_key": "678b182a36d343789c8c",
"audience_groups": 4,
"planning": "",
"created_by": "msgold",
"year": "1999",
"id": "5bffd725cfef0b4d8d44e7d1",
"subject": "Araf (Limbo) Tür: Macera - Dram - Gerilim Yönetmen: John Sayles Oyuncular: David Strathairn, Mary Elizabeth Mastrantonio, Vanessa Martinez",
"modified_date": "2019-06-14T13:38:07.949000Z",
"modified_by": "msgold",
"no": 5802130,
"actor": "",
"audio_subtitles": 3,
"application": "com.epg",
"start_date": "2019-06-14T00:25:00Z",
"channel": "58d29bb0eefad3db9c606260",
"description": "Alaska'nın güneydoğusunda geçen hikayenin başkarakteri Joe Gastineau, yıllar önce geçirdiği deniz kazasının travmasını taşıyan bir denizcidir. Joe'nun hayatı bir gün şarkıcı Donna de Angelo ve kızı Noelle ile tanıştıktan sonra değişime uğrar. Üvey kardeşi Bobby'nin kasabaya geri dönüp bir ricada bulunması ise tüm karakterlerin hayatlarını sonsuza dek değiştirecektir. (Dil: Türkçe/Orijinal - Altyazı: Türkçe/İngilizce)",
"end_date": "2019-06-14T03:15:00Z",
"director": "",
"genre": "sinema/genel",
"program_name": "Araf",
"day": "2019-06-15T21:00:00Z",
"episode": "",
"screen_violence": 4,
"created_date": "2019-06-14T13:38:08.027000Z",
"_id": "5d03a340cfef0b5855783297"
},
]
}

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