}\r
\r
html {\r
- background-color: #8DDD83;\r
+ background-color: #8DDD83;\r
height: auto;\r
font: normal 12pt Arial, Verdana, Helvetica, sans-serif;\r
}\r
}\r
\r
h1 {\r
- font-size: 20pt;\r
- font-style: italic;\r
- font-weight: bold;\r
- margin-left: 40px;\r
+ font-size: 20pt;\r
+ font-style: italic;\r
+ font-weight: bold;\r
+ margin-left: 40px;\r
}\r
\r
td {\r
- vertical-align:top;\r
+ vertical-align:top;\r
}\r
\r
div.entete {\r
width: 90%;\r
- position: fixed;\r
+ position: fixed;\r
z-index: 5;\r
background-color: #65A35D;\r
height: 50px;\r
}\r
\r
div.entete form p {\r
- color: black;\r
- font-size: 7pt;\r
- margin-top: 1px;\r
+ color: black;\r
+ font-size: 7pt;\r
+ margin-top: 1px;\r
}\r
\r
div.entete form p label {\r
- margin-right: 4px;\r
+ margin-right: 4px;\r
}\r
\r
div.entete form input[type='checkbox'] {\r
- border:2px solid red;\r
+ border:2px solid red;\r
}\r
\r
div.pied {\r
}\r
\r
table#liste .listeFichiers img {\r
- position: absolute;\r
+ position: absolute;\r
left: -9px;\r
top: -18px;\r
}\r
\r
table#liste td {\r
- background-color: #7BC671; \r
+ background-color: #7BC671; \r
color: #20531A;\r
- padding: 3px;\r
+ padding: 3px;\r
}\r
\r
table#liste td.titre {\r
- font-weight: bold;\r
- cursor: pointer;\r
+ font-weight: bold;\r
+ cursor: pointer;\r
}\r
\r
table#liste td.annee {\r
- text-align: right;\r
- width: 50px;\r
+ text-align: right;\r
+ width: 50px;\r
}\r
\r
table#liste td.duree {\r
- text-align: right;\r
- width: 80px;\r
+ text-align: right;\r
+ width: 80px;\r
}\r
\r
table#liste td.lien {\r
- text-align: center;\r
- width: 15px;\r
+ text-align: center;\r
+ width: 15px;\r
}\r
\r
table#liste td.lien div {\r
}\r
\r
table#liste td.fichier {\r
- text-align: center;\r
- width: 12px;\r
+ text-align: center;\r
+ width: 12px;\r
}\r
\r
table#liste td.fichier div {\r
}*/\r
\r
table#liste td.titre:hover {\r
- background-color: #B1F1A9; \r
- padding: 3px;\r
+ background-color: #B1F1A9; \r
+ padding: 3px;\r
}\r
\r
table#liste td.detail {\r
- background-color: #8DDD83; \r
- padding: 0px 0px 0px 0px;\r
+ background-color: #8DDD83; \r
+ padding: 0px 0px 0px 0px;\r
}\r
\r
table#liste table.detail {\r
- display:none;\r
+ display:none;\r
+ width:100%;\r
padding-bottom: 10px;\r
- border-spacing: 0px 0px;\r
+ border-spacing: 0px 0px;\r
}\r
\r
table#liste table.detail td {\r
- padding: 3px; \r
+ padding: 3px; \r
background-color: #B1F1A9;\r
}\r
\r
table#liste table.detail td.titreDetail {\r
- font-weight: bold;\r
+ font-weight: bold;\r
}\r
\r
\r
+# Attention, le but de ce fichier n'est pas d'être le plus clair possible ^-^´´\r
+\r
require 'rexml/document'\r
require 'net/http'\r
require 'thread'\r
\r
class String\r
def virerBalisesHTML\r
- return self.gsub(/<(.*?)>/, '')\r
+ return gsub(/<(.*?)>/, '')\r
+ end\r
+ def virerBalisesHTML!\r
+ gsub!(/<(.*?)>/, '')\r
end\r
end\r
\r
\r
@aPlusieursReponses = false # pour faire les choses bien\r
\r
- puts @fichiers[0]\r
+ puts " -> " + @fichiers[0]\r
puts "Fais ton choix jeune padawan (un caractère et pas plus)"\r
tabNoms = @idsAllocine.keys\r
choix = 1\r
\r
#/<a href="\/film\/fichefilm_gen_cfilm=(\d+)\.html" class="link1">/ =~ donneesHtml\r
#r = donneesHtml.scan(/<a href="\/film\/fichefilm_gen_cfilm=(\d+)\.html" class="link1">(.*?)<\/a>/)\r
- r = donneesHtml.scan(/<a href="\/film\/fichefilm_gen_cfilm=(\d+)\.html" class="link1">(.*?)<\/a>(?:<\/h4><h5 style="color: #666666"> (.*?)<\/h5>){0,1}/)\r
+ r = donneesHtml.scan(/<a href="\/film\/fichefilm_gen_cfilm=(\d+)\.html" class="link1">(.*?)<\/a>(?:<\/h4><h5 style="color: #666666"> (.*?)<\/h5>){0,1}(?:<h4><br \/><\/h4>){0,1}(?:<h4 style="color: #666666"> de (.*?)<\/h4>){0,1}(?:<h4 style="color: #666666"> avec (.*?)<\/h4>){0,1}(?:<h4 style="color: #666666"> \((.*?)\)<\/h4>){0,1}/)\r
\r
if r.length > 1\r
@aPlusieursReponses = true\r
r.each{|f|\r
- @idsAllocine[f[1].virerBalisesHTML + (f[2] != nil ? " " + f[2].virerBalisesHTML : "")] = f[0]\r
+ @idsAllocine[f[1].virerBalisesHTML + (f[2] != nil ? " " + f[2].virerBalisesHTML : "") + (f[3] != nil ? " de " + f[3].virerBalisesHTML : "") + (f[4] != nil ? " avec " + f[4].virerBalisesHTML : "") + (f[5] != nil ? " (" + f[5].virerBalisesHTML + ")" : "")] = f[0]\r
}\r
elsif r.length == 1\r
loadDepuisIdAllocine(r[0][0], connexionHttp) \r
} unless $1.nil? \r
\r
# Synopsis \r
- /Synopsis.*?<h4>(.+?)<\/h4>/m =~ ficheHtml\r
+ /Synopsis.*?<h4>(.*?)<\/h4>/m =~ ficheHtml\r
@synopsis = $1 unless $1.nil?\r
+ @synopsis.gsub!(/<br\s*\/>|<br\s*>/, "\n")\r
+ @synopsis.virerBalisesHTML!\r
\r
# Budget \r
/Budget<\/b> : (.+?) millions d'euros<\/h4>/ =~ ficheHtml\r
} \r
racine.add(genres) \r
\r
- racine.add(REXML::Element::new('synopsis').add_text(@synopsis))\r
+ synopsisElement = REXML::Element::new('synopsis')\r
+ @synopsis.split("\n").each{|s|\r
+ next if s =~ /^\s*$/\r
+ synopsisElement.add(REXML::Element::new('p').add_text(s))\r
+ }\r
+ racine.add(synopsisElement)\r
+ \r
budgetElement = REXML::Element::new('budget')\r
budgetElement.add_text(@budget)\r
budgetElement.add_attribute('unite', @budgetUnite)\r
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">\r
<xsl:template match="filmographie">
- <html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr">
+ <html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr">\r
+
<head>
<title>DivX</title>\r
<link rel="stylesheet" href="../css/yopyop.css" type="text/css" />\r
<script type="text/javascript" src="../js/yopyop.js" ></script>
- </head>
+ </head>\r
+
<body onload="doRecherche()" >\r
+ \r
<div class="entete" >
<h1>DivX - TV</h1>\r
<div id="nbFilms" ></div>\r
</p>\r
</form>\r
</div>\r
+ \r
<div class="contenu">
- <table id="liste">\r
-
+ <table id="liste">
<xsl:for-each select="film">
<xsl:sort select="annee" order="descending" />\r
<xsl:sort select="titre" />
<tr id="ligne{@id}">\r
<td class="fichier">\r
<div>\r
- <!--div class="listeFichiers" id="listeFichiers{@id}" onmouseout="cacherFichiers('{@id}')"-->\r
<ul><a></a>\r
<xsl:for-each select="fichiers/fichier"><li><a href="divx://{.}"><xsl:value-of select="."/></a></li></xsl:for-each>\r
</ul>\r
</div>\r
- <!--/div-->\r
</td>\r
<td class="lien"><div><a href="{url}"></a></div></td>
<td onclick="detailFilm('{@id}')" class="titre" id="titre{@id}"><xsl:value-of select="titre"/></td>
</tr>\r
<tr>\r
<td class="titreDetail">Synopsis</td>\r
- <td><xsl:value-of select="synopsis"/></td>\r
+ <td>\r
+ <xsl:for-each select="synopsis/p"><p><xsl:value-of select="."/></p></xsl:for-each>\r
+ </td>\r
</tr>\r
</table>\r
</td>\r
</tr>
- </xsl:for-each>
- </table>\r
+ </xsl:for-each>
+ </table> \r
</div>\r
- <div class="pied"></div>
+ \r
+ <div class="pied"></div>\r
+
</body>
</html>
</xsl:template>