English > Scripts and Templates

Iafd Person e Website link (full)

<< < (9/19) > >>

pra15:
Thanks,
For the moment i use my script to add good url and script genre_people to all database.
After i sort by genre, with two IAFD/IAFD i delete manually all bad URL.

Ivek23:

--- Quote from: pra15 on February 09, 2015, 09:45:27 am ---Thanks,
For the moment i use my script to add good url and script genre_people to all database.
After i sort by genre, with two IAFD/IAFD i delete manually all bad URL.
--- End quote ---

Otherwise it is a bit more work, but currently there is no other, no other variants as already mentioned above.

Ivek23:
iafd_movie (full) script
v 0.2.6.0 on 11.2.2015


--- Quote from: Ivek23 on February 05, 2015, 09:32:28 am ---Change of Studio:

* Studio name only in IAFD Studio multiselect custom field
* The URL link to the Studio name on web pages in IAFD Studio1 memo custom field
--- End quote ---

Change of Studio:

* The URL link to the Studio name on web pages now in IAFD Studio (Distributor)  memo custom field

--- Quote from: Ivek23 on February 05, 2015, 09:32:28 am ---Distributor data can now be transferred only in custom fields, namely:

* Distributor name only in Distributor multiselect custom field
* The URL link to the Distributor name on web pages in IAFD Distributor1 memo custom field
--- End quote ---

Change of Distributor:

* The URL link to the Distributor name on web pages now in IAFD Studio (Distributor) memo custom field
Replace the new changes in the Comments:

--- Quote from: Ivek23 on February 07, 2015, 05:02:28 pm ---Change of Comments:

In addition to the already mentioned here are a few cosmetic changes in the comment box for the transmission of Comments information.
--- End quote ---

New Added:

* IAFDUpdated in the IAFDUpdated long text custom field
* IAFD Compilation in the IAFD Compilation select list or multiselectlist custom field
Also included is a list of custom fields.

CustomField :

IAFDUpdated                        ----> Long Text
IAFD AKA                        ----> Memo
IAFD Studio                      ----> Multiselect List
IAFD Distributor                   ----> Multiselect List
IAFD Studio (Distributor)            ----> Memo
IAFD Compilation                  ----> Select List OR Multiselect List

Script is the attached.

Ivek23:
How would give this code
--- Code: ---// Comments - Released
curPos := Pos('<h3>Comments</h3>', HTML);
if curPos > 0 then begin
LogMessage('Scene readout');
EndPos := curPos;
curPos := PosFrom ('<li style="padding-bottom: 0.5em;">Released:',HTML,curPos);
if curPos > 0 then begin
curPos := PosFrom('">Released:',HTML,curPos);
if curPos > 0 then begin
curPos := curPos + Length('">Released:');
EndPos := PosFrom('</li><',HTML,curPos);
Datanascita := Copy(HTML,curPos,EndPos-curPos); 
LogMessage(Datanascita);
if Datanascita <> '' then begin
ExplodeString(Datanascita, DateParts, ' ');

DateParts[0] := StringReplace(DateParts[0], '01', '1', True, True, False);
DateParts[0] := StringReplace(DateParts[0], '02', '2', True, True, False);
DateParts[0] := StringReplace(DateParts[0], '03', '3', True, True, False);
DateParts[0] := StringReplace(DateParts[0], '05', '5', True, True, False);
DateParts[0] := StringReplace(DateParts[0], '06', '6', True, True, False);
DateParts[0] := StringReplace(DateParts[0], '07', '7', True, True, False);
DateParts[0] := StringReplace(DateParts[0], '08', '8', True, True, False);
DateParts[0] := StringReplace(DateParts[0], '09', '9', True, True, False);

DateParts[1] := StringReplace(DateParts[1],'January','1',true,true,true);
DateParts[1] := StringReplace(DateParts[1],'February','2',true,true,true);
DateParts[1] := StringReplace(DateParts[1],'March','3',true,true,true);
DateParts[1] := StringReplace(DateParts[1],'April','4',true,true,true);
DateParts[1] := StringReplace(DateParts[1],'May','5',true,true,true);
DateParts[1] := StringReplace(DateParts[1],'June','6',true,true,true);
DateParts[1] := StringReplace(DateParts[1],'July','7',true,true,true);
DateParts[1] := StringReplace(DateParts[1],'August','8',true,true,true);
DateParts[1] := StringReplace(DateParts[1],'September','9',true,true,true);
DateParts[1] := StringReplace(DateParts[1],'October','10',true,true,true);
DateParts[1] := StringReplace(DateParts[1],'November','11',true,true,true);
DateParts[1] := StringReplace(DateParts[1],'December','12',true,true,true);

Datanascita:= DateParts[0] +'.'+ DateParts[1] +'.'+ DateParts[2];
LogMessage('release : '+ Datanascita);

AddFieldValueXML('release', Datanascita);

end
else
LogMessage('release not found');
end
else
LogMessage('Data di nascita: NESSUNA');
end;
end;
--- End code ---
to regulate, it would not be necessary always to use this piece of code
--- Code: --- DateParts[0] := StringReplace(DateParts[0], '01', '1', True, True, False);
DateParts[0] := StringReplace(DateParts[0], '02', '2', True, True, False);
DateParts[0] := StringReplace(DateParts[0], '03', '3', True, True, False);
DateParts[0] := StringReplace(DateParts[0], '05', '5', True, True, False);
DateParts[0] := StringReplace(DateParts[0], '06', '6', True, True, False);
DateParts[0] := StringReplace(DateParts[0], '07', '7', True, True, False);
DateParts[0] := StringReplace(DateParts[0], '08', '8', True, True, False);
DateParts[0] := StringReplace(DateParts[0], '09', '9', True, True, False);

DateParts[1] := StringReplace(DateParts[1],'January','1',true,true,true);
DateParts[1] := StringReplace(DateParts[1],'February','2',true,true,true);
DateParts[1] := StringReplace(DateParts[1],'March','3',true,true,true);
DateParts[1] := StringReplace(DateParts[1],'April','4',true,true,true);
DateParts[1] := StringReplace(DateParts[1],'May','5',true,true,true);
DateParts[1] := StringReplace(DateParts[1],'June','6',true,true,true);
DateParts[1] := StringReplace(DateParts[1],'July','7',true,true,true);
DateParts[1] := StringReplace(DateParts[1],'August','8',true,true,true);
DateParts[1] := StringReplace(DateParts[1],'September','9',true,true,true);
DateParts[1] := StringReplace(DateParts[1],'October','10',true,true,true);
DateParts[1] := StringReplace(DateParts[1],'November','11',true,true,true);
DateParts[1] := StringReplace(DateParts[1],'December','12',true,true,true);
--- End code ---
repeatedly used to Released date converted to this format,  for example, as follows
--- Code: ---30.10.2013
--- End code ---

I guess it would be necessary to add to the script similar functions like this, for example,
--- Code: ---// ******** CheckDate ************** Преобразовывает строку с датой в короткий формат ****
function CheckDate(s: String): String;
var
i, j, num        : Integer;
months           : Array [1..12] of AnsiString;
items            : TWideArray;
Day, Month, Year : String;
begin
months[ 1] := 'январ';
months[ 2] := 'феврал';
months[ 3] := 'март';
months[ 4] := 'апрел';
months[ 5] := 'ма';
months[ 6] := 'июн';
months[ 7] := 'июл';
months[ 8] := 'август';
months[ 9] := 'сентябр';
months[10] := 'октябр';
months[11] := 'ноябр';
months[12] := 'декабр';

ExplodeString (s, items, ' ');
for i := 0 to 2 do begin
if i > High (items) then Break;

num := StrToInt (items[i]);
if num > 0 then begin   // День или год
if num <= 31 then    // День
Day := items[i]
else if (num >= 1000) And (num <= 2200) then begin // Год
Year := items[i];
Break;   // Год - последний
end;
end else begin    // Месяц
for j := Low (months) to High (months) do
if Pos (months[j], LowerCase (items[i])) > 0 then Break;
end;
if j <= High (months) then
Month := IntToStr (j);
end;

if Year <> '' then begin
if Day = '' then
Day := '01'
else if length (Day) = 1 then
Day := '0' + Day;
if Month = '' then
Month := '01'
else if length (Month) = 1 then
Month := '0' + Month;
Result := Day + '.' + Month + '.' + Year;
end else
Result := s;
end;


// ******** CheckDates ************** Преобразовывает строку с датами, разделенными запятыми, в короткий формат ****
function CheckDates (s: String): String;
var
Dates  : TWideArray;
i      : integer;
Begin
ExplodeString (Replace (s), Dates, ',');
Result := '';
for i := low (Dates) to high (Dates) do begin
if Result = '' then
Result := Result + CheckDate (Dates[i])
else
Result := Result + ',' + CheckDate (Dates[i]);
end;
End;
--- End code ---
but this I have never used and I admit that I do not know how to do this, so please help, I would be happy with the attached code.

pra15:
Can you give a link where h3 comments is present .

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version