•  Previous
  • 1
  • 2
  • 3(current)
  • 4
  • 5
  • 7
  • Next 
 
Thread Rating:
  • 1 Vote(s) - 5 Average
Converting skins to 1920x1080
#31
@Sinnocence: Nice - does that handle the "400r" case as done above in the xlst?

On another note, is it possible with XSLT to transform say:

<tag>Blah Blah Blah $INFO[foo,bar, $LOCALIZE[1234]] Foo Gary</tag>

to:

<tag>"Blah Blah Blah " + Info(foo, "bar", " " + Localize(1234)) + " Foo Gary"</tag>

i.e. $INFO[] -> Info(), anything else (including whitespace) to be placed in quotes and separated via +. 2nd and third params in $INFO[] (including whitespace) to be placed in quotes. First param in $INFO[] to ignore whitespace. Doable, or pipe dream?

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
Reply
#32
jmarshall Wrote:@Sinnocence: Nice - does that handle the "400r" case as done above in the xlst?

On another note, is it possible with XSLT to transform say:

<tag>Blah Blah Blah $INFO[foo,bar, $LOCALIZE[1234]] Foo Gary</tag>

to:

<tag>"Blah Blah Blah " + Info(foo, "bar", " " + Localize(1234)) + " Foo Gary"</tag>

i.e. $INFO[] -> Info(), anything else (including whitespace) to be placed in quotes and separated via +. 2nd and third params in $INFO[] (including whitespace) to be placed in quotes. First param in $INFO[] to ignore whitespace. Doable, or pipe dream?

Cheers,
Jonathan

$ESCINFO please come back. Everything is forgiven....
My skins:

Amber
Quartz

Reply
#33
OT: Heh - after the initial pain it should make lots of nice things much easier - after all, ya'll want Info(foo,Info(bar),foo) and posx + 5 type stuff, right? Wink
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
Reply
#34
Updated again, attribute conversion should now work for "start=" and "end=" in slide animation elements and "center=" in rotate and zoom animation elements.

http://www.gtwf-koeln.de/xmlconvertgui.exe

What´s missing apart from border attribute in <texture>, <texturefocus> and <texturenofocus> ?

EDIT: doesn´t convert everything, have to check again

EDIT2: got it i think. exe updated
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#35
i´ve fixed some bugs and let it process the aeon nox skin. it looks usable Smile
some small corrections, but it´s really almost complete.
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#36
Again an update, it seems as it would work perfectly for EVERYTHING now Smile
Please report if it works for you, too.
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#37
jmarshall Wrote:@Sinnocence: Nice - does that handle the "400r" case as done above in the xlst?

Apologies, I'm not familiar with the skin xmls & I never saw the 'r' comment - I was just trying to save someone else the headache putting the XSL together. I just took a look at the wiki (http://wiki.xbmc.org/index.php?title=Def...ntrol_tags) and it looks like the only alpha char used is 'r' (?). Below is a quick update to cater for this:
Code:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method="xml" indents="yes"/>

<xsl:variable name="MULTIPLIER">1.5</xsl:variable>

  <!-- template (copies input file as-is) -->
  <xsl:template match="@*|node()">
    <xsl:copy>
      <xsl:apply-templates select="@*|node()"/>
    </xsl:copy>
  </xsl:template>

  <!-- specific overrides -->
  <xsl:template match="posx|posy|width|height|textoffsetx|textoffsety|radiowidth|radioheight|radioposx|radioposy|textwidth|border">
    <xsl:element name="{local-name()}">
        <xsl:choose>
           <xsl:when test="not(substring(., string-length(.))) = 'r')">
              <xsl:value-of select="round(number(.) * number($MULTIPLIER))"/>
           </xsl:when>
           <xsl:otherwise>
              <xsl:value-of select="round(number(substring-before(., 'r')) * number($MULTIPLIER))"/><xsl:text>r</xsl:text>
           </xsl:otherwise>
        </xsl:choose>
    </xsl:element>
  </xsl:template>

</xsl:stylesheet>


jmarshall Wrote:On another note, is it possible with XSLT to transform say:

<tag>Blah Blah Blah $INFO[foo,bar, $LOCALIZE[1234]] Foo Gary</tag>

to:

<tag>"Blah Blah Blah " + Info(foo, "bar", " " + Localize(1234)) + " Foo Gary"</tag>

i.e. $INFO[] -> Info(), anything else (including whitespace) to be placed in quotes and separated via +. 2nd and third params in $INFO[] (including whitespace) to be placed in quotes. First param in $INFO[] to ignore whitespace. Doable, or pipe dream?

That depends! It should be possible via (one very ugly) regex group substitution except that in your example the first and second parameters to $INFO look the same and are treated differently during/after convertion (one becomes a string literal). Is this a healthy example? I can't see any mention of this syntax change on the wiki to confirm but if you want to send on some concrete examples of the before & after then I'll take a look at this (and doing the 'r' substitution properly with regex also in case you guys add other chars in the future) if/when I get a few minutes.

[edit] if the first param to every function is left clean, and all other params get wrapped in quotes then that's pretty straight forward - but is this true of all of the new function definitions?[/edit]
Reply
#38
phil65 Wrote:Again an update, it seems as it would work perfectly for EVERYTHING now Smile
Please report if it works for you, too.

Works brilliantly - well done that's really cool.
Reply
#39
Works good for me also. This is very cool since I was converting a skin to 1080 at the moment (old version of Aeon). This will definitely save sometime on the coverflow view!
Reply
#40
Most of it works, only the r value is not put back now. >499r< becomes >798< and it doesn't convert 31 xml with error "Cannot insert the node in the specified location". Used it on Aeon Nox
Reply
#41
Big_Noid Wrote:Most of it works, only the r value is not put back now. >499r< becomes >798< and it doesn't convert 31 xml with error "Cannot insert the node in the specified location". Used it on Aeon Nox

hmm then i broke something i think. worked 100%. will check.
EDIT: just tested on DialogMuteBug from Aeon Nox. 40r becomes 60r, so everything´s corrrect. you´re using the newest version?
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#42
I checked add header. Without it it does convert the 31 missing xml's but 'r' is still broken.

EDIT: used the link in post #34
Reply
#43
updated, i hope everything works now.
only thing is that 240.5 becomes 360 for example and not 361.
the program just doesnt parse it correctly when it´s a double value, so i have to remove the last two chars and convert then.
will look at it again perhaps in the future.
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#44
maybe put the link in the OP so it's easier to find Wink
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#45
Martijn Wrote:maybe put the link in the OP so it's easier to find Wink

Thx
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
  •  Previous
  • 1
  • 2
  • 3(current)
  • 4
  • 5
  • 7
  • Next 
 
Thread Rating:
  • 1 Vote(s) - 5 Average



Logout Mark Read Team Forum Stats Members Help
Converting skins to 1920x108051