Ant Movie Catalog: scripts y plantillas filmos-discografías

Foro para todos los temas que atañen a esta vuestra web. Tutoriales, cómo y preguntas frecuentes: elaboración, publicación de filmografías en el foro etc.

Notapor pere_ubu » Vie Jun 23, 2006 12:30 am

Hola monty, pega las primeras 5 fichas en el post de filmos en proceso, no importa si desencuadra, para ver el código.
A ver si veo el problema.
Avatar de Usuario
pere_ubu
Director consagrado
Director consagrado
 
Mensajes: 1768
Registrado: Jue Ago 18, 2005 4:01 pm
Ubicación: Que tu sabiduría no sea humillación para tu prójimo - Khayyam

Notapor montypa » Vie Jun 23, 2006 12:46 am

Pere ya he colocado las cinco primeras fichas en el post pero al previsualizar creo que me ocurre lo mismo. Gracias.Veremos si podemos arreglarlo
Avatar de Usuario
montypa
Director de culto
Director de culto
 
Mensajes: 848
Registrado: Lun Ene 16, 2006 11:21 pm

Notapor pere_ubu » Vie Jun 23, 2006 1:33 am

Bueno monty, el problema parece estar cuando abres el html con el editor de texto. Ya he corregido las primeras dos y no veo otro problema.

Abre el html con el notepad de windows y asegúrate de que en el menú Formato esté destildada la casilla ajuste de línea.

Si con eso no se resuelve me avisas y revisamos la plantilla.
Avatar de Usuario
pere_ubu
Director consagrado
Director consagrado
 
Mensajes: 1768
Registrado: Jue Ago 18, 2005 4:01 pm
Ubicación: Que tu sabiduría no sea humillación para tu prójimo - Khayyam

Notapor montypa » Vie Jun 23, 2006 5:08 pm

Pere he probado a hacer lo que me dices. Tanto con el ajuste de línea marcado como desmarcado en el bloc de notas el resultado cuando lo llevo al post es el mismo el ancho de la página se duplica. Unas veces me quedan las fichas alineadas a la izquierda con el ancho margen a la derecha y otras al contrario las fichas se colocan a la derecha y el margen a la izquierda. Yo lo único que modifiqué con el frontpage de la plantilla red que viene en el mod amc 2.0.0 es poner las palabras reparto, actores o director en negrita para que apareciesen en la ficha no se si puede deberse a eso.
Avatar de Usuario
montypa
Director de culto
Director de culto
 
Mensajes: 848
Registrado: Lun Ene 16, 2006 11:21 pm

Notapor pere_ubu » Vie Jun 23, 2006 5:16 pm

Es posible que sea eso monty. Envíame la plantilla por mail y la reviso.
Avatar de Usuario
pere_ubu
Director consagrado
Director consagrado
 
Mensajes: 1768
Registrado: Jue Ago 18, 2005 4:01 pm
Ubicación: Que tu sabiduría no sea humillación para tu prójimo - Khayyam

Notapor montypa » Sab Jun 24, 2006 1:28 pm

Pere me llegó la plantilla modificada y he hecho las pruebas oportunas y me ocurrió lo mismo. Le pasé a Thelion el archivo amc y el con la plantilla blue(donde no aparece el nombre del director) la ha probado y la filmo se coloca perfectamente. Asi que el problema debe ser la plantilla o alguna cosa que yo no hago bien cuando abro la filmo con el editor de texto. Sigo haciendo pruebas y sigo alguna sugerencia de Thelion por si doy con la solución. Ya te cuento. un saludo y muchas gracias por todo.
Avatar de Usuario
montypa
Director de culto
Director de culto
 
Mensajes: 848
Registrado: Lun Ene 16, 2006 11:21 pm

Notapor pere_ubu » Sab Jun 24, 2006 5:10 pm

Pues es raro, parecía funcionar bastante bien.
Si aún no lo resuelves envíame el archivo AMC y yo me encargo de pegarlas fichas editando tus post en este hilo.
Avatar de Usuario
pere_ubu
Director consagrado
Director consagrado
 
Mensajes: 1768
Registrado: Jue Ago 18, 2005 4:01 pm
Ubicación: Que tu sabiduría no sea humillación para tu prójimo - Khayyam

Problemas Ant Movie Catalog

Notapor alesves » Lun Sep 18, 2006 12:40 am

Estoy intentando realizar una base de datos de películas españolas con links a eMule.

La base la tengo bastante avanzada pero cuando intento colocar los enlaces no se como hacerlo. :-(

Alguien me podría echar un cable, si realmente es posible hacerlo, que creo que si pues cuando se hacen las filmografías se puede poner.

No se si queda muy claro lo que intento hacer.

Saludos y gracias.
Avatar de Usuario
alesves
Director de culto
Director de culto
 
Mensajes: 855
Registrado: Mar Ene 31, 2006 9:56 pm

Notapor David_Holm » Lun Sep 18, 2006 1:02 am

Ya hay un hilo para este programa creado por gabol.

Añade los enlaces en formato html (igual que para publicar en el foro) en el campo que consideres oportuno, para las filmografías se suele hacer en comentarios (para que se adapte a las plantillas). En la vista "normal", no puedes pinchar los enlaces porque el formato es de texto plano, si exportas en html la ficha o fichas que quieras si podrías pincharlos desde ahí. No es un programa que domine, seguro que algún compañero te puede orientar mejor.

Saúdos
Avatar de Usuario
David_Holm
Director consagrado
Director consagrado
 
Mensajes: 2156
Registrado: Sab Abr 15, 2006 12:06 pm
Ubicación: Nun lugar que nunca existiu, nun tempo xa esquecido

Notapor Norman » Jue Sep 21, 2006 1:18 am

Dejo por aquí los scripts que estoy utilizando para la filmo de Hitchcock por si interesan. Son el script modificado de IMDb que incluye el Ant Movie Catalog, y el posteado por gilistico.

IMDb_modificado

Código: Seleccionar todo
program IMDB;

uses
  StringUtils1;

var
  MovieName: string;
  MovieURL: string;
  MovieNumber: string;

// ***** analyzes the results page that asks to select a movie from a list *****

procedure AnalyzeResultsPage(Address: string);
var
  PageText: string;
  Value: string;
begin
  PageText := GetPage(Address);
  if pos('<title>IMDb', PageText) = 0 then
  begin
    AnalyzeMoviePage(PageText)
  end else
  begin
    if Pos('[b]No Matches.[/b]', PageText) > 0 then
    begin
      if GetOption('BatchMode') = 0 then
        ShowMessage('No movie found for this search');
      Exit;
    end;
    if GetOption('BatchMode') = 0 then
    begin
      PickTreeClear;
      repeat
        Value := TextBefore(PageText, '<ol>', '[b]');
        if Value <> '' then
        begin
          HTMLRemoveTags(Value);
          HTMLDecode(Value);
          PickTreeAdd(Value, '');
        end;
        Value := TextBetween(PageText, '<ol>', '</ol>');
        PageText := RemainingText;
      until not AddMovieTitles(Value);
      Value := TextBefore(PageText, '][b]more titles[/b][/url]', '</ol>'), '
', ', ');
    HTMLRemoveTags(Value);
    HTMLDecode(Value);
    SetField(fieldDirector, Value);
  end;
  // Actors
  if CanSetField(fieldActors) then
  begin
    Value := TextBetween(PageText, 'ast overview', '');
    if Value = '' then
      Value := TextBetween(PageText, 'redited cast', '');
    if Value = '' then
      Value := TextBetween(PageText, 'Cast:', '[/table]');
    if Value [/tr] 0 do
          begin
            Value2 := TextBetween(Value, '<tr', '[/tr]');
            Value := RemainingText;
            if Pos('rest of cast', Value2) > 0 then
              Continue;
            if Pos('[url=fullcredits](more)[/url]', Value2) > 0 then
              Break;
            if FullValue <> '' then
              FullValue := FullValue + #13#10;
            TextBefore(Value2, '[/td]', '');
            Value2 := TextBetween(RemainingText, '/]', '[/url]');
            if Value2 <then> 0 do
          begin
            Value2 := TextBetween(Value, '[tr]', '[/tr]');
            Value := RemainingText;
            if Pos('rest of cast', Value2) > 0 then
              Continue;
            if Pos('[url=fullcredits](more)[/url]', Value2) > 0 then
              Break;
            if FullValue [/td] 0 do
          begin
            Value2 := TextBetween(Value, '<tr', '[/tr]');
            Value := RemainingText;
            if Pos('rest of cast', Value2) > 0 then
              Continue;
            if Pos('[url=fullcredits](more)[/url]', Value2) > 0 then
              Break;
            if FullValue <> '' then
              FullValue := FullValue + #13#10;
            TextBefore(Value2, '[/td]', '');
            Value2 := TextBetween(RemainingText, '/]', '[/url]');
            if Value2 <> '' then
            begin
              FullValue := FullValue + Value2;
               Value2 := TextBetween(RemainingText, 'e]', '[/td]');
               if Value2 <then> 0 do
          begin
            Value2 := TextBetween(Value, '[tr]', '[/tr]');
            Value := RemainingText;
            if Pos('rest of cast', Value2) > 0 then
              Continue;
            if Pos('[url=fullcredits](more)[/url]', Value2) > 0 then
              Break;
            if FullValue <> '' then
              FullValue := FullValue + #13#10;
            FullValue := FullValue + TextBefore(Value2, '[/td]', '');
            Value2 := TextBetween(RemainingText, '[td]', '[/td]');
            if Value2 <> '' then
              FullValue := FullValue + ' (as ' + Value2 + ')';
          end;
*)
        4:
          begin
            FullValue := TextBefore(Value, '[/tr][tr][td]', '');
            if FullValue = '' then
              FullValue := Value;
            FullValue := StringReplace(FullValue, ' [tr][td]rest of cast listed alphabetically:</small>[/td][/tr] ', '');
            FullValue := StringReplace(FullValue, '[/tr]', #13#10);
          end;
      end;
      HTMLRemoveTags(FullValue);
      HTMLDecode(FullValue);
      case GetOption('ActorsLayout') of
        0, 2:
          FullValue := StringReplace(FullValue, #13#10, ', ');
      end;
      SetField(fieldActors, FullValue);
    end;
  end;
  //Country
  if CanSetField(fieldCountry) then
  begin
    SetField(fieldCountry, ImportList(PageText, GetOption('MultipleValuesCountry'), '/Countries/'));
  end;
  //Category
  if CanSetField(fieldCategory) then
  begin
    SetField(fieldCategory, ImportList(PageText, GetOption('MultipleValuesCategory'), '/Genres/'));
  end;
  // Language
  if CanSetField(fieldLanguages) then
  begin
    SetField(fieldLanguages, ImportList(PageText, GetOption('MultipleValuesLanguages'), '/Languages/'));
  end;
  // Length
  if CanSetField(fieldLength) then
  begin
    Value := TextBetween(PageText, '[b]Duraci&oacute;n:[/b]' + #13#10, ' ');
    if Value <then> 0 then
        SetField(fieldLength, TextAfter(Value, ':'))
      else
        SetField(fieldLength, Value);
    end;
  end;
  // AKA Name
  if CanSetField(fieldTranslatedTitle) then
  begin
    Value := TextBetween(PageText, '[b]Tambi&eacute;n conocida como:[/b]
', '
' + #13#10 + '<b');
    if Value <then> 0 then
  begin
    Value := TextAfter(PageText, '[url=trivia]');
    if Value <> '' then
    begin
      sleep(50);
      Value := GetField(fieldURL);
      FullValue := GetPage(Value+'/trivia');
      Value := TextBetween(FullValue, '<ul>', '');
      Value2 := TextBetween(FullValue, '<title>', '</title>');
      Value := StringReplace(Value, #13#10, '');
      Value := StringReplace(Value, '  ', '');
      Value := StringReplace(Value, '<li>', #13#10 + '- ');
      HTMLRemoveTags(Value);
      HTMLDecode(Value);
      HTMLRemoveTags(Value2);
      HTMLDecode(Value2);
      Value2 := AnsiUpperCase(Value2);
      case GetOption('Trivia') of
        1:
          begin
            if GetField(fieldDescription) <> '' then
              Value := GetField(fieldDescription) + #13#10 + #13#10 + 'IMDB ' + Value2 + ': ' + Value
            else
              Value :=  'IMDB ' + Value2 + ': ' + Value;
            SetField(fieldDescription, Value);
          end;
        2:
          begin
            if GetField(fieldComments) <then> 0) then
  begin
    Value := TextAfter(PageText, '[url=awards]');
    if Value </h1> 0 do
        Value := StringReplace(Value, #13#10+#13#10, #13#10);
      FullValue:= Value2+': '+Value;
      case GetOption('Awards') of
        1:
          begin
            if GetField(fieldDescription) <> '' then
              Value := GetField(fieldDescription) + #13#10 + #13#10 + Value2 + ': ' + Value
            else
              Value := Value2 + ': ' + Value;
            SetField(fieldDescription, Value);
          end;
        2:
          begin
            if GetField(fieldComments) <> '' then
              Value := GetField(fieldComments) + #13#10 + #13#10 + Value2 + ': ' + Value
            else
              Value := Value2 + ': ' + Value;
            SetField(fieldComments, Value);
          end;
      end;
    end;
  end;
end;

// ***** Imports lists like Genre, Country, etc. depending of the selected option *****

function ImportList(PageText: string; MultipleValues: Integer; StartTag: string): string;
var
  Value, Value2: string;
begin
  if MultipleValues = 0 then
  begin
    Value := TextBetween(PageText, StartTag, '[/url]');
    Value2 := TextAfter(Value, ']');
  end
  else
  begin
    Value := TextBetween(PageText, StartTag, #13#10);
    Value2 := TextBefore(Value, ' ');
    HTMLRemoveTags(Value2);
    if MultipleValues = 1 then
      Value2 := StringReplace(Value2, ' / ', ', ');
  end;
  HTMLDecode(Value2);
  Result := Value2;
end;

// ***** Gets summaries for the movie, based on the plot outline given in parameter (that contains the URL to more summaries) *****

function ImportSummary(PlotText: string): string;
var
  Address, Value, Value2, PageText, Longest: string;
begin
  Address := TextBetween(PlotText, '[url=/rg/title-tease/plotsummary', '](more)[/url]');
  if (Address = '') or (GetOption('DescriptionSelection') = 0) then
  begin
    Result := Trim(TextBefore(PlotText, '[url=/rg', ''));
    if Result = '' then
      Result := Trim(PlotText);
    HTMLRemoveTags(Result);
    HTMLDecode(Result);
  end
  else
  begin
    PageText := GetPage('http://spanish.imdb.com/rg/title-tease/plotsummary' + Address);
    PickListClear;
    Longest := '';
    Value := TextBetween(PageText, '<p class="plotpar]', '');
    PageText := RemainingText;
    while Value <do> 0 do
        Value := StringReplace(Value, '  ', ' ');
      if Length(Value) > Length(Longest) then
        Longest := Value;
      PickListAdd(Trim(Value));
      Value := TextBetween(PageText, '<p class="plotpar]', '');
      PageText := RemainingText;
    end;
    if (GetOption('BatchMode') > 0) or (GetOption('DescriptionSelection') = 2) then
      Result := Longest
    else
    begin
      if not PickListExec('Select a description for "' + GetField(fieldOriginalTitle) + '"', Result) then
        Result := '';
    end;
  end;
end;

// ***** beginning of the program *****

begin
  if CheckVersion(3,5,0) then
  begin
    MovieName := '';
    if GetOption('BatchMode') = 2 then
    begin
      MovieName := GetField(fieldURL);
      if Pos('imdb.com', MovieName) = 0 then
        MovieName := '';
    end;
    if MovieName = '' then
      MovieName := GetField(fieldOriginalTitle);
    if MovieName = '' then
      MovieName := GetField(fieldTranslatedTitle);
    if GetOption('BatchMode') = 0 then
    begin
      if not Input('IMDB Import', 'Enter the title or the IMDB URL of the movie:', MovieName) then
        Exit;
    end
    else
      Sleep(500);
    if MovieName <then> 0 then
        AnalyzeResultsPage(MovieName)
      else
      begin
        MovieName := StringReplace(MovieName, '&', 'and');
        if (GetOption('BatchMode') > 0) or (GetOption('PopularSearches') = 1) then
          AnalyzeResultsPage('http://spanish.imdb.com/find?tt=1;q=' + UrlEncode(MovieName))
        else
          AnalyzeResultsPage('http://spanish.imdb.com/find?more=tt;q=' + UrlEncode(MovieName));
      end;
    end;
  end
  else
    ShowMessage('This script requires a newer version of Ant Movie Catalog (at least the version 3.5.0)');
end.
Avatar de Usuario
Norman
Así empezó Hitchcock
Así empezó Hitchcock
 
Mensajes: 45
Registrado: Sab Sep 09, 2006 6:59 pm

Notapor Norman » Jue Sep 21, 2006 1:21 am

gilistico

Código: Seleccionar todo
(***************************************************

Ant Movie Catalog importation script
www.antp.be/software/moviecatalog/

[Infos]
Authors=gilistico
Title=IMDB (ES)
Description=Importación de creditos desde IMDB adaptandolos al castellano
Language=ES
Version=2.00
Requires=3.5.0
Comments=Se traducen los terminos, paises, categorías,... más usuales.
License=This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
GetInfo=1

[Options]

***************************************************)

program IMDB_ES;

uses
   StringUtils1;

var
   MovieName:   string;
   MovieURL:    string;
   MovieNumber: string;


// Pagina de resultados de la busqueda de peliculas - Extracción de resultados
function BuscaPeliculas(Address: string): Boolean;
var
   Pagina, Item, Item2: string;
   Value, value2: string;
   Primero: Integer;
begin

   Pagina := GetPage(Address);


   if Pos('[b]No Matches.[/b]', Pagina) > 0 then
       begin
      Result := False;
            Exit;
       end;


   PickTreeClear;

   while Pos('</ol>', Pagina)> 0 do
   begin
      Value := TextBetween(Pagina, '<ol>', '</ol>');
           Pagina := RemainingText;

      while Pos('</li>',Value)> 0 do
      begin
         Value2 := TextBefore(Value, '</li>', '');
         Value  := RemainingText;

           Address := TextBetween(Value2, '[url=', ']');
         MovieNumber := TextBetween(Address, '/tt', '/');
           Address := 'http://imdb.com/title/tt' + MovieNumber + '/combined';

         Value2 := StringReplace(Value2,' ',' ');
         Value2 := StringReplace(Value2,#13#10,' ');
             HTMLRemoveTags(Value2);
             HTMLDecode(Value2);
         Value2 := Trim(Value2);
         value2 := StringReplace(Value2,'"','');

         if Pos('aka',Value2)> 0 then
         begin
            Item2  := TextBefore(Value2, 'aka', '');
            Value2 := RemainingText;

            while Pos('aka',Value2)> 0 do
            begin
               Item := TextBefore(Value2, 'aka', '');
               Value2  := RemainingText;

               if Pos('(',Item)> 0 then
                  Item := TextBefore(Item, '(', '');
               if Pos('-',Item)> 0 then
                  Item := TextBefore(Item, '-', '');

               Item2 := Trim(Item2) + '; ' + Trim(Item);
            end;

            if Pos('(',Value2)> 0 then
               Value2 := TextBefore(Value2, '(', '');
            if Pos('-',Value2)> 0 then
               Value2 := TextBefore(Value2, '-', '');

            Value2 := Trim(Item2) + '; ' + Trim(Value2);
         end;

         PickTreeAdd(Value2, Address);
      end;
   end;

   if PickTreeExec(Address) then
           AnalizaPelicula(Address);

   Result := True;
end;


// Pagina combinada de la pelicula - Extracción de datos de la pelicula.

procedure AnalizaPelicula(Address: string);
var
     Value, Value2, Value3, FullValue: string;
     p: Integer;
   Pagina, Estrenos: string;
   Comments: String;
   Tmp, Todo, Item: String;
   n,m,num: Integer;
   Persona, Cargo: String;
   Guion, Novela, Historia: String;

begin

   Comments := ''; // GetField(fieldComments)+#13#10+'-------------------------'+#13#10;
   MovieNumber := TextBetween(Address, '/tt', '/');
   Pagina := GetPage(Address);

   // Url de la pagina combinada
   if Address <> GetField(fieldURL) then
      SetField(fieldURL, Address);

   // Titulo original
   Value  := TextBetween(Pagina, '<title>', '</title>');
   if Value <> '' then
   begin
      Value2 := TextBefore(Value, ' (', '');
      HTMLDecode(Value2);
      if Value2 <> GetField(fieldOriginalTitle) then
         SetField(fieldOriginalTitle, Value2);
   end;


   // Año
   Value  := RemainingText;
   if Value <then> 0 then
            Value2 := TextBefore(Value, '/', '')
      else  Value2 := TextBefore(Value, ')', '');
      if Value2 <> GetField(fieldYear) then
               SetField(fieldYear, Value2);
   end;

   // Valoración
   Value := TextBetween(Pagina, '/rating-stars/', '/rating-vote/');
   if Value <> '' then
   begin
      Item := TextBetween(Value, '[b]', '/');
      if Item <> GetField(fieldRating) then
         SetField(fieldRating, Item);
   end;



     //Pais
       Value := TextBetween(Pagina, '[b]Country:[/b]', '
');
       if Value <> '' then
       begin
          HTMLRemoveTags(Value);
      HTMLDecode(Value);
      value := StringReplace(Value,#13#10,' ');
      Value := RenombraPais(Trim(Value));
      Value := StringReplace(Value,' /',',');
      if Value <> GetField(fieldCountry) then
         SetField(fieldCountry, Value);
   end;


   //Categoría
       Value := TextBetween(Pagina,'[b]Genre:[/b]', '
');
       if Value <> '' then
       begin
          HTMLRemoveTags(Value);
      HTMLDecode(Value);
      value := StringReplace(Value,#13#10,' ');
      value := StringReplace(Value,' /',',');
      value := StringReplace(Value,'/',',');
      value := StringReplace(Value,'(more)','');
      Value := RenombraCategoria(Trim(Value));
      if Value <> GetField(fieldCategory) then
         SetField(fieldCategory, Value);
   end;


   // Duración
   Value := TextBetween(Pagina, '[b]Runtime:[/b]' + #13#10, ' ');
   if Value <then> 0 then
         Value := TextAfter(Value, ':');
      if Value <> GetField(fieldLength) then
              SetField(fieldLength, Value);
       end;

   // Productora
   Value := TextBetween(Pagina, 'Production Companies[/b]', '</ul>');
       if Value <> '' then
       begin
      Value := StringReplace(Value, '</li><li>', '; ');
            HTMLRemoveTags(Value);
            HTMLDecode(Value);
      if Value <> GetField(fieldProducer) then
               SetField(fieldProducer, Value);
   end




   // creditos
   // Address := 'http://imdb.com/title/tt' + MovieNumber + '/fullcredits';
   // Pagina := GetPage(Address);

     // Director
   Value := TextBetween(Pagina, 'Directed by[/b][/url]', '[/table]');
       if Value [/tr] 0 do
      begin
         Value2 := TextBefore(Value, #13#10, '');
         Value  := RemainingText;

         Persona := TextBefore(Value2, '[/td]', '');
         HTMLRemoveTags(Persona);
               HTMLDecode(Persona);
         Persona := Trim(Persona);

         if Persona = '' then
            continue;

         Cargo   := RemainingText;
         HTMLRemoveTags(Cargo);
               HTMLDecode(Cargo);
         Cargo := Trim(Cargo);

         if Tmp <> '' then
            Tmp := Tmp + ', ';

               Tmp := Tmp + Trim(Persona);
      end
      if Tmp <> GetField(fieldDirector) then
         SetField(fieldDirector, Tmp);
      end;


   // Actores
   Value := TextBetween(Pagina, 'Cast[/b][/url]', '[/table]');
       if Value [/tr] 0 do
      begin
         Value2 := TextBefore(Value, #13#10, '');
         Value  := RemainingText;
               HTMLRemoveTags(Value2);
               HTMLDecode(Value2);
         Value2 := Trim(Value2);

         if Pos('rest of cast', Value2) > 0 then
            break;

         num := Num + 1;
         if num > 15 then
            break;

         n:=Pos('....', Value2);
         if n > m then
            m := n;
      end;
      if m> 30 then
         m := 30;

      Tmp := '';
      Value := Todo;
      num := 0;
      While Pos(#13#10, Value)> 0 do
      begin
         Value2 := TextBefore(Value, #13#10, '');
         Value  := RemainingText;
               HTMLRemoveTags(Value2);
               HTMLDecode(Value2);
         Value2 := Trim(Value2);
         if value2 = '' then
            continue;

         if Pos('rest of cast', Value2) > 0 then
            break;

         num := Num + 1;
         if num > 20 then
            break;

         Item   := TextBefore(Value2, '....', '');

         for n := length (Item) to m do
            Item := Item +'.';

         cargo := RemainingText;

         if Pos('(age ', Cargo) > 0 then
         begin
            Cargo := StringReplace(Cargo,'(age ','(A los ');
            Cargo := StringReplace(Cargo,')','años)');
         end

         else if Pos('(', Cargo) > 0 then
            Cargo  := TextBefore(Cargo, '(', '');

         Item := Item + Cargo;
         Tmp := Tmp + Item +  #13#10;
      end;

              Tmp := StringReplace(Tmp, '(as ', '(como ');
         if Tmp <> GetField(fieldRating) then
               SetField(fieldActors, Tmp);
       end;

   // Guionista
   Value := TextBetween(Pagina, 'Writing credits[/b][/url]', '[/table]');
       if Value [/tr] 0 do
      begin
         Value2 := TextBefore(Value, #13#10, '');
         Value  := RemainingText;

         Value2 := StringReplace(Value2, '(in alphabetical order)', '');


         Persona := TextBefore(Value2, '[/td]', '');
         HTMLRemoveTags(Persona);
               HTMLDecode(Persona);

         Persona := StringReplace(Persona, '(WGA)', '');

         Persona := Trim(Persona);

         if Persona = '' then
            continue;

         Cargo   := RemainingText;
         HTMLRemoveTags(Cargo);
               HTMLDecode(Cargo);
         Cargo := Trim(Cargo);


         if Pos('(screenplay)', Cargo) > 0 then
            Cargo := 'screenplay';
         if Pos('(teleplay)', Cargo) > 0 then
            Cargo := 'teleplay';
         Cargo := StringReplace(Cargo, ') and', '');
         Cargo := StringReplace(Cargo, ') &', '');
         Cargo := StringReplace(Cargo, '(', '');
         Cargo := StringReplace(Cargo, ')', '');
         Cargo := StringReplace(Cargo, 'and', 'y');
         Cargo := StringReplace(Cargo, '&', 'y');

         if (Pos('material', Cargo) > 0) OR
            (Pos('earlier', Cargo) > 0) then
               continue;

         cargo := Trim(cargo);

         if (Cargo = '') OR
             (Cargo = 'screenplay') OR
             (Cargo = 'teleplay') OR
             (Cargo = 'scenario') OR
             (Cargo = 'written by') then
         begin
            if guion <then> 0) OR
            (Pos('story', Cargo) > 0) then
         begin

            Cargo := trim(Cargo);

            if Historia <then> 0) OR
            (Pos('graphic novels', Cargo) > 0) OR
            (Pos('comic', Cargo) > 0) then
         begin

            Cargo := trim(Cargo);

            if Novela <then> 0 then
         begin

            Cargo := StringReplace(Cargo, 'novels', '');
            Cargo := trim(Cargo);

            if Novela <then> 0) OR
            (Pos('novel', Cargo) > 0) then
         begin

            Cargo := StringReplace(Cargo, 'play', '');
            Cargo := StringReplace(Cargo, 'novel', '');
            Cargo := trim(Cargo);

            if Novela <then> 0 then
         Novela := Novela + ')';

      if Pos('Historia', Historia) > 0 then
         Historia := Historia + ')';

      Guion := Guion + ' '+ Novela + Historia;
      Guion := PonerY(Guion);

      Comments := Comments +  'Guión: ' + Guion + #13#10;
      end;

   // Musica
   Item := GetPersonas(Pagina,'Music by');
       if Item <> '' then
            Comments := Comments + 'Música: ' + Item + #13#10;

   // Fotografía
   Item := GetPersonas(Pagina,'Cinematography by');
       if Item <> '' then
            Comments := Comments + 'Fotografía: ' + Item + #13#10;

   // Montaje
   Item := GetPersonas(Pagina,'Film Editing by');
       if Item <> '' then
            Comments := Comments + 'Montaje: ' + Item + #13#10;

     //Lenguaje original
       Value := TextBetween(Pagina, '[b]Language:[/b]', '
');
       if Value <> '' then
       begin
          HTMLRemoveTags(Value);
      HTMLDecode(Value);
      value := StringReplace(Value,#13#10,' ');
      value := StringReplace(Value,'/',',');
      Value := RenombraIdioma(Trim(Value));
      Comments := Comments +  'Rodaje: ' + Value;
   end;

     //Color
       Value := TextBetween(Pagina, '[b]Color:[/b]', '
');
       if Value <> '' then
       begin
          HTMLRemoveTags(Value);
      HTMLDecode(Value);
      value := StringReplace(Value,#13#10,' ');
      value := StringReplace(Value,' /',',');
      value := StringReplace(Value,'/',',');
      value := StringReplace(Value,'Black and White','Blanco y negro');
      Value := RenombraIdioma(Trim(Value));
      Comments := Comments + '; ' + Value;
   end;

     //Sonido
       Value := TextBetween(Pagina, '[b]Sound Mix:[/b]', '
');
       if Value <> '' then
       begin
          HTMLRemoveTags(Value);
      HTMLDecode(Value);
      value := StringReplace(Value,#13#10,' ');
      value := StringReplace(Value,' /',',');
      value := StringReplace(Value,'/',',');
      Value := RenombraIdioma(Trim(Value));
      Comments := Comments + '; ' + Value;
   end;

   Comments := Comments + #13#10;

   // Aspectos técnicos
   Item := '';
   Address := 'http://imdb.com/title/tt' + MovieNumber + '/technical';
   Estrenos := GetPage(Address);
   Value := TextBetween(Estrenos, '<dl>','</dl>');
   if value </dd> 0 do
      begin
         Value2 := TextBefore(Value,'</dd>', '<dt>');
         Value  := RemainingText;

         Todo := TextBefore(Value2,'</dt>', '');
         Value2 := RemainingText;

         if (Pos('Camera', Todo)> 0) OR
              (Pos('Laboratory', Todo)> 0) then
            continue;

         if Pos('negative format', Todo)> 0 then
            Value2 := 'negativo: '+ value2;
         if Pos('Printed film', Todo)> 0 then
            Value2 := 'distribución: '+ value2;
         if Pos('Aspect ratio', Todo)> 0 then
            Value2 := 'formato: '+ value2;
         if Pos('Cinematographic process', Todo)> 0 then
            Value2 := 'proceso: '+ value2;

               HTMLRemoveTags(Value2);
               HTMLDecode(Value2);

         if Pos('(', Value2)> 0 then
            Value2 := TextBefore(Value2,'(', '');

         If Item <> '' then
            Item  := Item + '; ';
         Item := Item + value2;
      end;
      Comments := Comments + 'Aspectos técnicos: ' + Item + #13#10;
   end;

   // Lugares de rodaje
   Item := '';
   Historia := '';
   Address := 'http://imdb.com/title/tt' + MovieNumber + '/locations';
   Estrenos := GetPage(Address);
   if Estrenos <> '' then
      Value := TextBetween(Estrenos, '<dl>','</dl>');
   if value </dd> 0 do
      begin
         Value2 := TextBefore(Value,'</dd>', '<dt>');
         Value  := RemainingText;

         Todo := TextBefore(Value2,'</dt>', '');
         Value2 := RemainingText;

               HTMLRemoveTags(Todo);
               HTMLDecode(Todo);
         Todo := StringReplace(Todo,', USA','')+'; ';
         Item := Item + Todo;

         if Pos(',', Todo)> 0 then
            cargo := TextBefore(Todo,';', ',')
         else   cargo := TextBefore(Todo,';', '');

         if Pos(cargo, Historia)> 0 then
            continue;

         Historia := Historia + cargo+'; ';
      end;

      if length(Item)> 100 then
         Item := Historia;
      if Item <> '' then
         Item := Item + #13#10;
      Item := StringReplace(Item,'; '+ #13#10,'');

      if Item <then> 0 do
   begin
      Value := TextBetween(Estrenos, '[tr][td]','[/tr]');
      Estrenos  := RemainingText;

      Value2   := TextBefore(Value,'[/td]', '');         // Pais
      Value    := RemainingText;
      Value    := TextBefore(Value,'[/td]', '"right]');      // Año
      Historia := RemainingText;
      Historia := TextBefore(Historia,'[/td]', '[td]');      // Motivo
      value := Value + Historia;
            HTMLRemoveTags(Value2);
      HTMLDecode(Value2);
            HTMLRemoveTags(Value);
            HTMLDecode(Value);

      if Pos('Spain', Value2) > 0 then
               Item := 'Estreno en España: ' + RenombraMes(Trim(Value)) + #13#10;

      if n = 0 then
               Todo:= 'Estreno en ' +  RenombraPais(Trim(Value2)) + ': '+ RenombraMes(Trim (Value)) + #13#10;
      n := 1;

   end;
   if (Todo <> '') AND (Todo <> Item) then
      Comments := Comments + Trim(Todo);
   if Item <> '' then
      Comments := Comments + Trim(Item);

   // Sinopsis, solo si no la tenemos, pues está en ingles
   Value := GetField(fieldDescription);
   If value = '' then
   begin
      Address := 'http://imdb.com/title/tt' + MovieNumber + '/plotsummary';
      Estrenos := GetPage(Address);
      Value := TextBetween(Estrenos, '<p class="plotpar]', '');
      HTMLRemoveTags(Value);
      HTMLDecode(Value);
      SetField(fieldDescription, Value);
   end;



   // Comentarios: Guionista, etc.
         SetField(fieldComments, Comments);

end;



// Función para extraer datos de los tecnicos de la película
function GetPersonas(Pagina: string; Text: string): string;
var
   Value, value2, Tmp, Persona, Cargo: string;
begin
   // Vestuario
   Value := TextBetween(Pagina, Text + '[/b][/url][/td][/tr][tr] [td]','[/table]');
       if Value [/tr] 0 do
      begin
         Value2 := TextBefore(Value, #13#10, '');
         Value  := RemainingText;

         Value2 := StringReplace(Value2, '(in alphabetical order)', '');
         Value2 := StringReplace(Value2, 'director of photography', '');

         Persona := TextBefore(Value2, '[/td]', '');
         HTMLRemoveTags(Persona);
               HTMLDecode(Persona);
         Persona := Trim(Persona);

         if Persona = '' then
            continue;

         Cargo   := RemainingText;
         HTMLRemoveTags(Cargo);
               HTMLDecode(Cargo);
         Cargo := Trim(Cargo);

         if Pos('additional', Cargo) > 0 then continue;
         if Pos('uncredited', Cargo) > 0 then continue;
         if Pos('photography', Cargo) > 0 then continue;
         if Pos('song', Cargo) > 0 then continue;
         if Pos('theme', Cargo) > 0 then continue;
         if Pos('music', Cargo) > 0 then continue;
         if Pos('executive', Cargo) > 0 then continue;
         if Pos('associate', Cargo) > 0 then continue;
         if Pos('line', Cargo) > 0 then continue;
         if Pos('co-', Cargo) > 0 then continue;
         if Pos('video', Cargo) > 0 then continue;

         if Tmp <then>0 then
   begin
            Delete(Value,n,1);
               Insert(' y', Value,n);
   end;
   result := Value;
end;

// Funciones de traducción
function RenombraCategoria(Value: string): String;
begin
   Value := StringReplace(Value,'Action','Acción');
   Value := StringReplace(Value,'Adventure','Aventuras');
   Value := StringReplace(Value,'Animation','Animación');
   Value := StringReplace(Value,'Biography','Biografía');
   Value := StringReplace(Value,'Comedy','Comedia');
   Value := StringReplace(Value,'Crime','Policíaca');
   Value := StringReplace(Value,'Documentary','Documental');
      //Value := StringReplace(Value,'Drama','Drama');
   Value := StringReplace(Value,'Family','Familiar');
   Value := StringReplace(Value,'Fantasy','Fantástica');
   Value := StringReplace(Value,'Film-Noir','Cine negro');
   Value := StringReplace(Value,'Game-Show','Exhibición deportiva');
   Value := StringReplace(Value,'History','Histórica');
   Value := StringReplace(Value,'Horror','Terror');
   Value := StringReplace(Value,'Music','Música');
      //Value := StringReplace(Value,'Musical','Musical');
   Value := StringReplace(Value,'Mystery','Misterio');
   Value := StringReplace(Value,'News','Noticiario');
   Value := StringReplace(Value,'Reality-TV','Reality-Show');
        Value := StringReplace(Value,'Romance','Romántica');
   Value := StringReplace(Value,'Sci-Fi','Ciencia ficción');
   Value := StringReplace(Value,'Short','Cortometraje');
   Value := StringReplace(Value,'Sport','Deportes');
   Value := StringReplace(Value,'Talk-Show','Diálogos');
      //Value := StringReplace(Value,'Thriller','Thriller');
   Value := StringReplace(Value,'TWar','Bélica');
      //Value := StringReplace(Value,'Western','Western');
   result := Value;
end;


function RenombraMes(Value: string): String;
begin
         Value := StringReplace(Value,'January','de enero de ');
         Value := StringReplace(Value,'February','de febrero de');
         Value := StringReplace(Value,'March','de marzo de');
         Value := StringReplace(Value,'April','de abril de');
         Value := StringReplace(Value,'May','de mayo de');
         Value := StringReplace(Value,'June','de junio de');
         Value := StringReplace(Value,'July','de julio de');
         Value := StringReplace(Value,'August','de agosto de');
         Value := StringReplace(Value,'September','de septiembre de');
         Value := StringReplace(Value,'October','de octubre de');
         Value := StringReplace(Value,'November','de noviembre de');
         Value := StringReplace(Value,'December','de diciembre de');
   result := Value;
end;

function RenombraPais(Value: string): String;
begin
         Value := StringReplace(Value,'USA','Estados Unidos');
   Value := StringReplace(Value,'Spain','España');
   Value := StringReplace(Value,'Belgium','Bélgica');
   Value := StringReplace(Value,'Brazil','Brasil');
   Value := StringReplace(Value,'Croatia','Croacia');
   Value := StringReplace(Value,'Czech Republic','República Checa');
   Value := StringReplace(Value,'Czechoslovakia','Checoslovaquia');
   Value := StringReplace(Value,'Denmark','Dinamarca');
   Value := StringReplace(Value,'East Germany','Alemania del este');
   Value := StringReplace(Value,'Egypt','Egipto');
   Value := StringReplace(Value,'Finland','Finlandia');
   Value := StringReplace(Value,'France','Francia');
   Value := StringReplace(Value,'Germany','Alemania');
   Value := StringReplace(Value,'Greece','Grecia');
   Value := StringReplace(Value,'Hungary','Hungría');
   Value := StringReplace(Value,'Ireland','Irlanda');
   Value := StringReplace(Value,'Italy','Italia');
   Value := StringReplace(Value,'Japan','Japón');
   Value := StringReplace(Value,'Mexico','Méjico');
   Value := StringReplace(Value,'Morocco','Marruecos');
   Value := StringReplace(Value,'Netherlands','Holanda');
   Value := StringReplace(Value,'New Zealand','Nueva Zelanda');
   Value := StringReplace(Value,'Norway','Noruega');
   Value := StringReplace(Value,'Philippines','Filipinas');
   Value := StringReplace(Value,'Poland','Polonia');
   Value := StringReplace(Value,'Romania','Rumanía');
   Value := StringReplace(Value,'Russia','Rusia');
   Value := StringReplace(Value,'South Korea','Corea del Sur');
   Value := StringReplace(Value,'Soviet Union','URSS');
   Value := StringReplace(Value,'Sweden','Suecia');
   Value := StringReplace(Value,'Switzerland','Suiza');
   Value := StringReplace(Value,'Turkey','Turquía');
   Value := StringReplace(Value,'UK','Reino Unido');
   Value := StringReplace(Value,'West Germany','Alemania occidental');
   result := Value;
end;

function RenombraIdioma(Value: string): String;
begin
         Value := StringReplace(Value,'Albanian','Albanés');
         Value := StringReplace(Value,'Arabic','Árabe');
         Value := StringReplace(Value,'Bulgarian','Búlgaro');
         Value := StringReplace(Value,'Cantonese','Cantonés');
         Value := StringReplace(Value,'Czech','Checo');
         Value := StringReplace(Value,'Danish','Danés');
         Value := StringReplace(Value,'Dutch','Holandés');
         Value := StringReplace(Value,'English','Inglés');
         Value := StringReplace(Value,'Finnish','Finlandés');
         Value := StringReplace(Value,'French','Francés');
         Value := StringReplace(Value,'Georgian','Georgiano');
         Value := StringReplace(Value,'German','Alemán');
         Value := StringReplace(Value,'Greek','Griego');
         Value := StringReplace(Value,'Hebrew','Hebreo');
         Value := StringReplace(Value,'Hungarian','Húngaro');
         Value := StringReplace(Value,'Italian','Italiano');
         Value := StringReplace(Value,'Japanese','Japonés');
         Value := StringReplace(Value,'Korean','Coreano');
         Value := StringReplace(Value,'Malayalam','Malayo');
         Value := StringReplace(Value,'None','Muda');
         Value := StringReplace(Value,'Norwegian','Noruego');
         Value := StringReplace(Value,'Persian','Persa');
         Value := StringReplace(Value,'Polish','Polaco');
         Value := StringReplace(Value,'Portuguese','Portugués');
         Value := StringReplace(Value,'Romanian','Rumano');
         Value := StringReplace(Value,'Russian','Ruso');
         Value := StringReplace(Value,'Serbo-Croatian','Servo-croata');
         Value := StringReplace(Value,'Silent','Cine Mudo');
         Value := StringReplace(Value,'Spanish','Castellano');
         Value := StringReplace(Value,'Swedish','Sueco');
         Value := StringReplace(Value,'Turkish','Turco');
   result := Value;
end;



// Aquí empieza el espectáculo
begin

   if (CheckVersion(3,5,0)=FALSe) then
   begin
          ShowMessage('Se requiere Ant Movie Catalog versión 3.5 o superior');
      exit;
   end;

        MovieName := GetField(fieldTranslatedTitle);

   if MovieName = '' then
         MovieName := GetField(fieldOriginalTitle);

   Input('Busqueda de creditos edn IMDB', 'Título de la pelicula', MovieName);

   if (MovieName <> '') AND (BuscaPeliculas('http://us.imdb.com/find?more=tt;site=aka;q=%2B' +
      StringReplace(UrlEncode(MovieName),'%20','%2B'))) then
      exit;

   MovieName := GetField(fieldOriginalTitle);
   if (MovieName = '') OR (NOT BuscaPeliculas('http://us.imdb.com/find?more=tt;site=aka;q=%2B' +
      StringReplace(UrlEncode(MovieName),'%20','%2B'))) then
      ShowMessage('No se han encontrado resultados.');

end.


Hay que configurar el programa de la siguiente forma:

gilistico.ifs

Campos modificables:
País
Categoría
Comentarios

IMDB_modificado.ifs

Opciones de script:
0-0-1-4-1-1-1-0-0-2-0-2-2

Campos modificables:
Título Original
Título Traducido
Director
Año
Duración
Intérpretes
URL
Descripción
Comentarios

El título traducido muestra todos los akas incluidos el español y los latinoamericanos. El estreno de la película en España selecciona el último (relanzamiento,...) y el mayor problema puede surgir con el guión que de vez en cuando la arma.

En el post de la filmo en proceso comentaba que al poner citas en el espacio de los links dejaba mucho espacio en blanco alrededor de la imagen, pero creo que este es el lugar correcto para comentarlo. ¿Sabéis cómo se puede solucionar?
Avatar de Usuario
Norman
Así empezó Hitchcock
Así empezó Hitchcock
 
Mensajes: 45
Registrado: Sab Sep 09, 2006 6:59 pm

Notapor Niten » Mié Nov 22, 2006 11:18 am

"Niten" escribió aquí:


alesves escribió:La base la tengo bastante avanzada pero cuando intento colocar los enlaces no se como hacerlo. :-( No se si queda muy claro lo que intento hacer.
Exactamente no sé qué es lo que quieres hacer, pero si en el campo llamado Url pones el enlace ed2k, cuando pinches en ir a ese enlace la descarga pasa directamente al emule.

Saludos
Niten
 

Notapor Zitor » Jue Nov 30, 2006 10:35 pm

¿Alguien tiene un script para IMDb que funcione correctamente?
El que utilizo en la actualidad importa con ciertos errores: en el campo productor aparecen los guionistas, y el campo actores directamente se queda en blanco (esto sucede desde que en IMDb incluyeron fotos de los susodichos).

Sau2
Avatar de Usuario
Zitor
Amante del cine
Amante del cine
 
Mensajes: 157
Registrado: Jue Ago 18, 2005 9:22 pm
Ubicación: Leyenda

Notapor TOTEM » Lun Mar 05, 2007 2:07 pm

Zitor escribió:¿Alguien tiene un script para IMDb que funcione correctamente?
Fijate aquí: http://www.cineforum-clasico.org/archivo/viewt ... 6913#36913
Avatar de Usuario
TOTEM
Director consagrado
Director consagrado
 
Mensajes: 3836
Registrado: Dom May 14, 2006 12:51 pm
Ubicación: Eros City

Notapor Urraka2006 » Lun Mar 05, 2007 5:28 pm

alesves escribió:Un buen programa es Antmovie.


Gracias Alesves, lo pincho yo también. Como soy un poco "rupestre" me la había fabricado en excell, incluyendo carátulas, pero la he tenido que partir en dos por temor a que se vaya a freir espárragos y perderla toda, ya que va ocupando mucho espacio. Probaré la Antmovie, que seguro que me da más juego.
Avatar de Usuario
Urraka2006
Amante del cine
Amante del cine
 
Mensajes: 155
Registrado: Jue Feb 08, 2007 10:51 pm

Notapor Zitor » Lun Mar 05, 2007 7:40 pm

Gracias TOTEM. La verdad es que harto de tener problemas con el script me decidí a actualizar a la última versión, y dando vueltas por la web del programa encontré una página con multitud de scripts actualizados constantemente (21-Febrero-2007 en el caso de IMDb):
http://www.antp.be/temp/scripts/


Espero que sean útiles a alguien.

Sau2
Avatar de Usuario
Zitor
Amante del cine
Amante del cine
 
Mensajes: 157
Registrado: Jue Ago 18, 2005 9:22 pm
Ubicación: Leyenda

Notapor thelion » Lun Mar 05, 2007 8:18 pm

Buenas zitor yo me he bajado esta actualizacion que propones del script del imdb.A ver que tal va...

gracias compañero
Avatar de Usuario
thelion
Director consagrado
Director consagrado
 
Mensajes: 2549
Registrado: Dom Oct 16, 2005 11:20 pm

Notapor cuper » Lun Mar 05, 2007 8:46 pm

Perdón no se si este hilo es el correcto, pero,¿ alguien conoce alguna version de este catalogador para linux?
Avatar de Usuario
cuper
Recién llegad@
Recién llegad@
 
Mensajes: 3
Registrado: Mar Nov 07, 2006 10:03 pm

Notapor TOTEM » Lun Mar 05, 2007 10:38 pm

cuper escribió:Perdón no se si este hilo es el correcto, pero,¿ alguien conoce alguna version de este catalogador para linux?
¡Bienvenido Cuper! Fantástico primer post!!! ¡¡Y en el hilo correcto!!
Te cuento que para Linux el proyecto hermano de AMC es [url=https://savannah.nongnu.org/projects/lmc/]Moviefly[/url]. La página está en inglés y si tienes dificultad me dices que distribución de Linux usas y te diré cual es la descarga que deberás hacer.
En esta otra página tienes las recomendaciones para este tema que hace un ubuntero.
Cuper tienes que venir luego aquí y contarme como te ha ido. ¡Estoy ansioso por saberlo!
¡CIne CLásico se enorgullece de sus usuarios linuxeros! :ci-cl:
Avatar de Usuario
TOTEM
Director consagrado
Director consagrado
 
Mensajes: 3836
Registrado: Dom May 14, 2006 12:51 pm
Ubicación: Eros City

Notapor cuper » Dom Abr 01, 2007 12:15 pm

Perdon por el retraso , gracias por contestar. Uso Ubuntu Feisty amd 64 y he probado instalarlo manualmente y a traves de repositorios de debian. Nada que no hay manera, al hacerlo manualmente me da error al intentar instalarlo y de la forma automatica no me encuentra el programa (el repositorio debe estar obsoleto Tambien me he instalado otros catalogadores para linux y la verdad que no es lo mismo. Es el unico programa windows que hecho de menos en linux. Un saludo
Avatar de Usuario
cuper
Recién llegad@
Recién llegad@
 
Mensajes: 3
Registrado: Mar Nov 07, 2006 10:03 pm

AnteriorSiguiente

Volver a Sobre Cine-Clasico.com

¿Quién está conectado?

Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 1 invitado