Author Topic: Script for egafd.com  (Read 32980 times)

0 Members and 1 Guest are viewing this topic.

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 1899
    • View Profile
Re: Script for egafd.com
« Reply #120 on: January 03, 2012, 05:14:29 pm »
egafd_movie
Small  change for Year:

I have found and corrected a small error in the Year code.


Code: [Select]
///// Part <Details> :
  If  Pos('<th>Details</th>', HTML) > 0 then begin
   //Year
   dbgstrg := '';
   CurPos := Pos('<td valign="top">Released: ', HTML);
   endpos := CurPos;
         LogMessage('getting year');
         dbgstrg := TextBetween(HTML, '<td valign="top">Released: </td><td width="100%" class="notes">', '</td>', False, CurPos);
         LogMessage('YEAR:' + dbgstrg);

debug_pos1:=Pos('?',dbgstrg);
if debug_pos1 >0 then
dbgstrg := Copy(dbgstrg,0,debug_pos1-1);
LogMessage(dbgstrg);

debug_pos1:=Pos('s',dbgstrg);
if debug_pos1 >0 then
dbgstrg := Copy(dbgstrg,0,debug_pos1-1);
LogMessage(dbgstrg);

If dbgstrg <> '' then
          AddFieldValue(mfYear,dbgstrg);
   
   //Director
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 1899
    • View Profile
Re: Script for egafd.com
« Reply #121 on: January 03, 2012, 05:35:50 pm »
egafd_movie
Small  change for Notes:

For security reasons,  I fixed a piece of code in the Notes code.


Code: [Select]
     //Notes
//pull ~Notes~ from Part 'Details'
   dbgstrg := '';
   curpos := Pos('<td valign="top">Notes: ' , HTML);
   EndPos := curPos;
         LogMessage('Notes')
         dbgstrg := TextBetween(HTML, '<td valign="top">Notes: </td><td width="100%" class="notes">', '</td>', False, CurPos);
         LogMessage('Notes :' + dbgstrg);
If dbgstrg <> '' then
          {AddFieldValue(mfDescription, dbgstrg);}
          AddFieldValueXML('tagline', dbgstrg);
         
    end;     //// End of Part <Details>
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 1899
    • View Profile
Re: Script for egafd.com
« Reply #122 on: January 03, 2012, 05:37:49 pm »
egafd_movie
Complete Details Code:


Code: [Select]
  ///// Part <Details> :
  If  Pos('<th>Details</th>', HTML) > 0 then begin
   //Year
   //pull ~Year~ from Part 'Details'
   dbgstrg := '';
   CurPos := Pos('<td valign="top">Released: ', HTML);
   endpos := CurPos;
         LogMessage('getting year');
         dbgstrg := TextBetween(HTML, '<td valign="top">Released: </td><td width="100%" class="notes">', '</td>', False, CurPos);
         LogMessage('YEAR:' + dbgstrg);

debug_pos1:=Pos('?',dbgstrg);
if debug_pos1 >0 then
dbgstrg := Copy(dbgstrg,0,debug_pos1-1);
LogMessage(dbgstrg);

debug_pos1:=Pos('s',dbgstrg);
if debug_pos1 >0 then
dbgstrg := Copy(dbgstrg,0,debug_pos1-1);
LogMessage(dbgstrg);

If dbgstrg <> '' then
          AddFieldValue(mfYear,dbgstrg);
   
   //Director
   //pull ~Director~ from Part 'Details'
   dbgstrg := '';
   curPos := Pos('<td valign="top">Director: ', HTML);
   EndPos := curPos;
         LogMessage('getting Director');
         dbgstrg:= TextBetween(HTML, '<td valign="top">Director: </td><td width="100%" class="notes">', '</td>', False, CurPos);
LogMessage('DIRECTOR:' + dbgstrg);

If dbgstrg <> '' then
AddFieldValueXML('comment', ' • • ' + SCRIPT_NAME + ' ' + SCRIPT_VERSION +
' • •   ' + 'Directors:  ' + dbgstrg)
            else
AddFieldValueXML('comment', ' • • ' + SCRIPT_NAME + ' ' + SCRIPT_VERSION +
' • •   ');

         debug_pos1:=Pos('(',dbgstrg);
if debug_pos1 >0 then
dbgstrg := Copy(dbgstrg,0,debug_pos1-1);
LogMessage(dbgstrg);

debug_pos1:=Pos(', ',dbgstrg);
if debug_pos1 >0 then
dbgstrg := Copy(dbgstrg,0,debug_pos1-1);
LogMessage(dbgstrg);

debug_pos1:=Pos(' as ',dbgstrg);
if debug_pos1 >0 then
dbgstrg := Copy(dbgstrg,0,debug_pos1-1);
LogMessage(dbgstrg);

debug_pos1:=Pos(' aas ',dbgstrg);
if debug_pos1 >0 then
dbgstrg := Copy(dbgstrg,0,debug_pos1-1);
LogMessage(dbgstrg);

debug_pos1:=Pos('/',dbgstrg);
if debug_pos1 >0 then
dbgstrg := Copy(dbgstrg,0,debug_pos1-1);
LogMessage(dbgstrg);

debug_pos1:=Pos(' and ',dbgstrg);
if debug_pos1 >0 then
dbgstrg := Copy(dbgstrg,0,debug_pos1-1);
LogMessage(dbgstrg);
     
debug_pos1:=Pos('?',dbgstrg);
if debug_pos1 >0 then
dbgstrg := Copy(dbgstrg,0,debug_pos1-1);
LogMessage(dbgstrg);

debug_pos1:=Pos('or ',dbgstrg);
if debug_pos1 >0 then
dbgstrg := Copy(dbgstrg,0,debug_pos1-1);
LogMessage(dbgstrg);

          If dbgstrg <> '' then
AddMoviePerson(dbgstrg, '', '', '', ctDirectors);

     //Notes
//pull ~Notes~ from Part 'Details'
   dbgstrg := '';
   curpos := Pos('<td valign="top">Notes: ' , HTML);
   EndPos := curPos;
         LogMessage('Notes')
         dbgstrg := TextBetween(HTML, '<td valign="top">Notes: </td><td width="100%" class="notes">', '</td>', False, CurPos);
         LogMessage('Notes :' + dbgstrg);
If dbgstrg <> '' then
          {AddFieldValue(mfDescription, dbgstrg);}
          AddFieldValueXML('tagline', dbgstrg);
         
    end;     //// End of Part <Details>
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 1899
    • View Profile
Re: Script for egafd.com
« Reply #123 on: January 04, 2012, 11:39:55 am »
egafd_movie
Added previously mentioned changes.

egafd_mod13 script attached


[attachment deleted by admin]
« Last Edit: January 05, 2012, 11:51:41 am by Ivek23 »
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 1899
    • View Profile
Re: Script for egafd.com
« Reply #124 on: January 06, 2012, 04:12:00 pm »
egafd_movie
Small  change for Notes:

Added Duration.


Code: [Select]
     //Notes
//pull ~Notes~ from Part 'Details'
   dbgstrg := '';
   curpos := Pos('<td valign="top">Notes: ' , HTML);
   EndPos := curPos;
         LogMessage('Notes')
         dbgstrg := TextBetween(HTML, '<td valign="top">Notes: </td><td width="100%" class="notes">', '</td>', False, CurPos);
         LogMessage('Notes :' + dbgstrg);
If dbgstrg <> '' then
          {AddFieldValue(mfDescription, dbgstrg);}
          AddFieldValueXML('tagline', dbgstrg);


    //pull ~Duration~ from 'Details'
//Duration
        curpos := Pos('<td valign="top">Notes: ' , HTML);
LogMessage('getting durations')
actPosEnd := PosFrom(' mins', HTML, actPosStart);
actPosStart := actPosEnd - 3;
Tmp := IntToStr(StrToInt(Copy(HTML, actPosStart, 3)));
LogMessage('Duration: ' + Tmp);
if Tmp = '0' then Tmp := '';
If Tmp <> '' then AddFieldValue(mfDuration, Tmp);
if Tmp = '' then Tmp := 'duration unknown';
LogMessage(' Parsing: ' + Tmp);

    end;     //// End of Part <Details>
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 1899
    • View Profile
Re: Script for egafd.com
« Reply #125 on: January 07, 2012, 06:57:19 am »
egafd_movie
Small  change for Notes:

Added Duration.


Code: [Select]
     //Notes
//pull ~Notes~ from Part 'Details'
   dbgstrg := '';
   curpos := Pos('<td valign="top">Notes: ' , HTML);
   EndPos := curPos;
         LogMessage('Notes')
         dbgstrg := TextBetween(HTML, '<td valign="top">Notes: </td><td width="100%" class="notes">', '</td>', False, CurPos);
         LogMessage('Notes :' + dbgstrg);
If dbgstrg <> '' then
          {AddFieldValue(mfDescription, dbgstrg);}
          AddFieldValueXML('tagline', dbgstrg);


    //pull ~Duration~ from 'Details'
//Duration
        curpos := Pos('<td valign="top">Notes: ' , HTML);
LogMessage('getting durations')
actPosEnd := PosFrom(' mins', HTML, actPosStart);
actPosStart := actPosEnd - 3;
Tmp := IntToStr(StrToInt(Copy(HTML, actPosStart, 3)));
LogMessage('Duration: ' + Tmp);
if Tmp = '0' then Tmp := '';
If Tmp <> '' then AddFieldValue(mfDuration, Tmp);
if Tmp = '' then Tmp := 'duration unknown';
LogMessage(' Parsing: ' + Tmp);

    end;     //// End of Part <Details>

It works properly only if the length of the movie displayed in minutes (for example: 90 mins, 114 mins ...).
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 1899
    • View Profile
Re: Script for egafd.com
« Reply #126 on: January 07, 2012, 05:48:06 pm »
egafd_movie
egafd_mod13(1)

Added:

  • Added full transfer of data to Director  in Comment field.
  • Added full transfer of data to Countries  in Country field.
  • Added full transfer of data to Studio  in Studio field.
  • Added full transfer of data to Tags(Alternate Titles) in Comment field.
  • Added a version and name of the script.

egafd_mod13(1) script attached

egafd_movie
egafd_mod13(2)

Added:

  • Added full transfer of data to Director  in Comment field.
  • Added full transfer of data to Countries  in Country field.
  • Added full transfer of data to Studio  in Studio field.
  • Added full transfer of data to Tags(Alternate Titles) in Comment field.
  • Added a version and name of the script.

egafd_mod13(2) script attached

[attachment deleted by admin]
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 1899
    • View Profile
Re: Script for egafd.com
« Reply #127 on: January 08, 2012, 07:01:38 am »
I think the time has come when we can say that we have come to the final version egafd_movie script, which will be published also for other users as well as the publication via system for automatic updates.
Here now is the egafd_movie script (Release Candidate), which is also attached.

[attachment deleted by admin]
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 1899
    • View Profile
Re: Script for egafd.com
« Reply #128 on: January 08, 2012, 07:02:10 am »
I think the time has come when we can say that we have come to the final version egafd_people script, which will be published also for other users as well as the publication via system for automatic updates.
Here now is the egafd_people script (Release Candidate), which is also attached.

[attachment deleted by admin]
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 1899
    • View Profile
Re: Script for egafd.com
« Reply #129 on: January 08, 2012, 07:39:42 am »
Of course, if you agree pra15 , then I'll opened a new topic specifically for egafd_movie script and egafd_people script and there published the final version of the script with all the necessary descriptions that go with them, and I will also edited by for the part that this script will also be available through system for automatically updated.
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline pra15

  • Power User
  • ****
  • Posts: 164
    • View Profile
Re: Script for egafd.com
« Reply #130 on: January 08, 2012, 01:46:30 pm »
Hello, sorry i'm not at home, i think i 'll go back the next week end.
But you can post the final script, i can't see it for the moment but no problem and thanks a lot for your works.
« Last Edit: January 08, 2012, 01:49:32 pm by pra15 »

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 1899
    • View Profile
Re: Script for egafd.com
« Reply #131 on: January 08, 2012, 06:48:12 pm »
Hello, sorry i'm not at home, i think i 'll go back the next week end.
But you can post the final script, i can't see it for the moment but no problem and thanks a lot for your works.

OK I will, but first I'll do some tests to make sure that everything is really okay and formalities before Post final Scripts.
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 1899
    • View Profile
Re: Script for egafd.com
« Reply #132 on: January 16, 2012, 11:41:58 am »
egafd_movie final

Now here is the final version of the egafd_movie script

Added:

  • I added a link to download information to a custom field for
    • EGAFD Version
    • EGAFD ID
    • Director
    • AKA
  • Edited by function OPTIONS.
  • Corrections and additions to the ParseMovie
  • Corrections and additions to the Aka

Code: [Select]
CUSTOM FIELD USE:

 EGAFD data: PVD field:            Type:
-------------    --------------   -----------------

EGAFD Version     ~EGAFD Version~ short text
EGAFD ID     ~EGAFD ID~ short text
Director ~EGAFD Director~ memo
AKA ~EGAFD FullAkas~ memo

Code: [Select]
//OPTIONS
 //For Example, Not Work:
 GET_THEMES  = True; //Set to False if you do not want Themes in Category field
                    //For Example, Not Work
 GET_REVIEW  = True; //For Example, Not Work
 GET_CREDITS = True; //For Example, Not Work
 
 //Work:
 GET_DIRECTOR = True; //Set to True if you do want to DIRECTOR in Comment field OR
                    //False if you do not want to DIRECTOR in Comment field
 GET_AKAS = True; //Set to True if you do want to FullAKAS information in Comment field OR
                    //False if you do not want to FullAKAS information in Comment field
 GET_EGAFD = True; //Set to True if you do want to EGAFD in Comment field OR
                    //False if you do not want to EGAFD in Comment field
 GET_EGAFD_ID = False; //Set to True if you do want to EGAFD_ID in Comment field OR
                    //False if you do not want to EGAFD_ID in Comment field
 GET_COMMENT = True; //Set to True if you do want to COMMENT in Comment field OR
                    //False if you do not want to COMMENT in Comment field

egafd_movie(final) script attached

[attachment deleted by admin]
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 1899
    • View Profile
Re: Script for egafd.com
« Reply #133 on: January 16, 2012, 11:43:31 am »
egafd_people final

Now here is the final version of the egafd_people script

Added:

  • Edited by function OPTIONS.
  • Corrections and additions to the ParsePeople

Code: [Select]
//OPTIONS
 //For Example, Not Work:
 GET_THEMES  = True; //Set to False if you do not want Themes in Category field
                    //For Example, Not Work
 GET_REVIEW  = True; //For Example, Not Work
 GET_CREDITS = True; //For Example, Not Work
 
 //Work:
 GET_PRA15 = False;   //Set to True if you do want EGAFD in Genre field OR
                     //Set to False if you do not want EGAFD in Genre field
 GET_TRANSNAME = False;   
//Set to True if you do want TRANSNAME in Transname field OR
                     //Set to False if you do not want TRANSNAME in Transname field
 GET_ROLE = False;   //Set to True if you do want to ROLE in Filmography field OR
                     //False if you do not want ROLE in Filmography field
 GET_PERSONMOVIE = False;   
            //Set to True if you do want to add PERSONMOVIE in Filmography field OR
                     //False if you do not want to add PERSONMOVIE in Filmography field
 GET_PERSONMOVIEROLE = False;   
            //Set to True if you do want to add PERSONMOVIEROLE in Filmography field OR
                     //False if you do not want to add PERSONMOVIEROLE in Filmography field
 GET_FULLINFO = True; //Set to True if you do want to COMMENT in Comment field OR
                     //False if you do not want to COMMENT in Comment field
 GET_COMMENT = True; //Set to True if you do want to COMMENT in Comment field OR
                     //False if you do not want to COMMENT in Comment field

egafd_people(final) script attached

[attachment deleted by admin]
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 1899
    • View Profile
Re: Script for egafd.com
« Reply #134 on: January 16, 2012, 07:06:54 pm »
Egafd_movie script

This script has now been released and is available via the program's auto-update system.
Run Help > Check for updates and choose Egafd movie from the list.

Notice:
Post any comments or questions to the
Egafd movie script.




Egafd_people script

This script has now been released and is available via the program's auto-update system.
Run Help > Check for updates and choose Egafd people from the list.

Notice:
Post any comments or questions to the
Egafd people script.




BTW:
Please be locked topic!
Thank you.
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


 

anything