Hello,
Is it possible to limit the size of the description to 1000 characters for example?
Obviously modifying the .INI or do you know of some external SW?
Thanks. srr f my eng
JuanF: wg++ 2.1.5,os win 10
Brought to you by Jan van Straaten
Program Development - Jan van Straaten ------- Web design - Francis De Paemeleere
Supported by: servercare.nl
Hello Blackbear199,
Is not in all events.
- INI: UK\radiotimes.com.ini
- Channel: site_id="11272" xmltv_id="BBC One Northern Ireland HD"
- INI: Spain\plus.es.ini
- Channel: site_id="MV3" xmltv_id="#0"
- Channel: site_id="A3" xmltv_id="Antena 3"
- Channel: site_id="TVE" xmltv_id="LA 1"
....
Thanks
To limit the length of the information, I have added the following statements to some of the SiteIni's
This just limits the text in the different tags to the defined value.
Willy
Hi Doglover, thanks for your help.
I have added the lines, only for description, but not work.. sure I did something wrong.
------------------------------------------------------------------------------------------
site {url=plus.es|timezone=Europe/Madrid|maxdays=7|cultureinfo=es-ES|charset=UTF-8|titlematchfactor=70|ratingsystem=ES}
site {keepindexpage|allowlastpageoverflow}
*
site {episodesystem=onscreen} *Enable for Onscreen Episode System
*site {episodesystem=xmltv_ns} *Enable for xmltv_ns Episode System
*
url_index{url|http://www.movistarplus.es/programacion-tv/|urldate|/?v=json}
url_index.headers {customheader=Accept-Encoding=gzip,deflate}
urldate.format {datestring|yyyy-MM-dd}
*
index_variable_element.modify {set|"'config_site_id'-CODE"}
index_showsplit.scrub {multi|'index_variable_element'|{"ESTRENO"|}|}]}}
scope.range{(splitindex)|end}
index_temp_1.modify {substring(type=regex)|'index_showsplit' "\"HORA_INICIO\":\"(\d{2}:\d{2})\""}
index_temp_1.modify {cleanup(removeduplicates span=1 link="index_showsplit")}
end_scope
*
scope.range{(indexshowdetails)|end}
index_start.scrub {single|HORA_INICIO":"||"|"}
*index_stop.scrub {single|HORA_FIN":"||"|"}
index_title.scrub {single(separator=":""(" include=first)|"TITULO":"||"|"}
index_title.modify {cleanup(style=unidecode)}
index_description.modify {substring(type=char)|'index_description' 0 1000}
index_category.scrub {single|GENERO|":"|"}
index_category.modify {cleanup}
index_category.modify {remove|\}
*
index_urlshow {url||"URL":"||"}
index_urlshow.modify {remove|\}
index_urlshow.headers {customheader=Accept-Encoding=gzip,deflate}
end_scope
*
scope.range{(showdetails)|end}
title.modify {addstart|'index_title'}
titleoriginal.scrub {single|<h1 itemprop="name" class="h-epsilon">|(|)|</h1>}
titleoriginal.modify {remove|)}
subtitle.scrub {single(separator=":" include=last)|<div class="title-image">|<h1 class="h-epsilon">|</h1>|</div>}
subtitle.modify {clear(~ "Episodio")}
subtitle.modify {remove(type=regex)|\(.+?\)}
subtitle.modify {cleanup(style=unidecode)}
subtitle.modify {clear('index_title')}
*
episode.scrub {regex set(pattern="Temporada 'S1' Episodio 'E1'")||<title>.*?(Temporada \d+\. Episodio \d+)||}
episode.modify {replace|.| }
*
description.scrub {multi|<div itemprop="description"|<p>|</p>|</div>}
* limit 1000 characters
description.modify {substring(type=char)|'description' 0 1000}
*description.modify {cleanup}
*category.scrub {single(separator=" / ")|<p itemprop="genre">||</p>|</p>}
director.scrub {single|Director</h3>|<span itemprop="name" >|</span>|</p>}|<h3}
actor.scrub {multi|<h3 class="heading">Reparto</h3>|<span itemprop="name" >|</span>|</div>}
productiondate.scrub {single|<p itemprop="datePublished"|content="|"| >}
showicon.scrub {single|<div class="cover">|<img src="http://www.webgrabplus.com/%7C"| alt}
ratingicon.scrub {url|http://www.plus.es|Calificación</h3><img src="http://www.webgrabplus.com/%7C%7C"|"}
rating.scrub {single|Calificación</h3>|src="/assets/images/movistar-plus/calf-|.svg"|<div}
rating.modify {cleanup(style=upper)}
starrating.scrub {single|<div class="rating-value">|<span itemprop="ratingValue" class="rating">|</span>|</div>}
starrating.modify {calculate(format=F1)|2 *}
starrating.modify {clear("0.0")}
starrating.modify {addend(not "")|/10}
---------------------------------------------------------------------------------------------------------------------------------------
Please could you help me?
Thanks
Juan
That should work.
However did you try to do a complete new grab (force). Because the details are not changed on already grabbed shows.
This change has only effect on the new grabbed shows.
Willy
PS: I would leave the statement
*description.modify {cleanup}
active. So remove the *
This will not have an effect on the limit to 1000 chars, but avoids unicode chars being present.
Not work :(
I changed to force, but I think that is not the problem because Im testing and I delete the file every time.
I dont know what happen...
Thanks doglover...
Hello doglover,
You can see it here.
Thanks
Found it.
The description consist out of several elements. The limit is applied on each element separately.
In order to have it limit the total, you need to convert the description first to a single element.
Perfect!!!
Many thanks doglover...
Juan
Agreed this is a better way.
Willy
Great!!!...
Many thanks both.
Juan
Hello,
There are some channel programs in the same INI that exceed 1000 characters.
I dont know what is the problem.
INI: radiotimes.com.ini
Channel: site="radiotimes.com" site_id="54" BBC Radio 3
.....................
*description.modify {replace|\|| } *convert to single
*description.modify {substring(type=char)|'description' 0 1000}
description.modify {remove|\|} *convert to single
temp_2.modify {calculate(format=F0 type=char)|'description' #}
loop{('temp_2' > "900")|end}
description.modify {remove(type=sentence)|-1 1}
temp_2.modify {calculate(format=F0 type=char)|'description' #}
end_loop
subtitle.modify {remove(type=regex)|\d{2}\/\d{2}\/\d{4}}
subtitle.modify {clear(~ "Episode")}
end_scope
*
** _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
** ##### CHANNEL FILE CREATION (only to create the xxx-channel.xml file)
..............
<programme start="20180329003000 +0000" stop="20180329063000 +0000" channel="3004.gibsat.com">
<title lang="en">Through the Night</title>
<desc lang="en">With John Shea. Mendelssohn: String Quartet No 2 in A minor, Op 13. Calidore Quartet. 10.01 Schumann: Märchenbilder, Op 113. 1.19 Mozart: Piano Trio in B flat, K502. 1.42 Schubert: Arpeggione Sonata, D821. 2.08 Haydn: Piano Sonata for piano in F, Hob1629. 2.23 Schubert transcr Liszt: Ständchen for piano (Schwanengesang, D957). 2.31 Rimsky-Korsakov: Scheherazade - symphonic suite after 1001 Nights, Op 35. 3.14 Salmenhaara: Concerto for Two Violins and Orchestra. 3.32 Bella: Solemn Overture in E flat. 3.39 Schlözer: Étude de concert in A flat, Op 1 No 2. 3.43 Holst: Ave Maria. 3.49 Rossini: Overture: Il Barbiere di Siviglia. 3.57 Geminiani: Concerto Grosso, Op 3 No 2. 4.06 Anon: Aquella voz de Cristo. 4.11 Ravel: Sonatine. 4.24 Bach: O Jesu Christ, meins Lebens Licht, BWV118 (excerpt). 4.31 Ravel: Alborada del gracioso (Miroirs). 4.38 Vivaldi: Flute Concerto in D, RV90 (Il gardellino). 4.49 Schumann: Toccata in C for piano, Op 7. 4.55 Mozart: Symphony No 34 in C, K338. 5.17 Schubert: Nacht und Träume, D827. 5.21 Bach: Cantata, BWV54 (Widerstehe doch der Sunde). 5.33 Daniel-Lesur: Suite Medievale for flute, harp and string trio. 5.47 Atrrib Mozart: Partita in E flat, KAnhC171. 6.08 CPE Bach: Anbetung dem Erbarmer - Easter Cantata, Wq243 (before 1784).(n)</desc>
<credits>
<presenter>John Shea</presenter>
</credits>
<category lang="en">Music</category>
<icon src="http://www.webgrabplus.com/%3Ca%20href%3D"http://images.radiotimes.com/assets/images/holding/radio.png?quality=60&mode=crop&width=130&height=100&404=radio">http://images.radiotimes.com/assets/images/holding/radio.png?quality=60&..." />
</programme>
any ideas?
Many thanks.
Yes.
This Siteini uses both the index_description and description scrubs.
In order to limit the desc tag to 1000 chars in the XMLTV file, You need to add both index_description and description together before limiting them.
However there are a bit of problems doing this. So I grabbed the index_description as index_temp_2 and added that to the description before the limiting step.
Willt
Yes.
This Siteini uses both the index_description and description scrubs.
In order to limit the desc tag to 1000 chars in the XMLTV file, You need to add both index_description and description together before limiting them.
However there are a bit of problems doing this. So I grabbed the index_description as index_temp_2 and added that to the description before the limiting step.
Willt
Many thanks DogLover,
Works fine....
Best Regards