Old 01-13-2004, 02:53 PM   #1
fobban
Senior Member
FlashFXP Registered User
ioFTPD Foundation User
 
Join Date: Jan 2003
Posts: 186
Default SFV cleaning script

This script removes unwanted entries from sfv-files. It removes comments, partitial lines, bad crc lines, duplicates etc. It's also possible to add your own comment.

You find it at the scripts page (if you're lazy click here).

On help to install etc, read the ReadMe , duh
fobban is offline   Reply With Quote
Old 01-13-2004, 04:59 PM   #2
Mr_X
Senior Member
FlashFXP Registered User
ioFTPD Foundation User
 
Join Date: Sep 2003
Posts: 142
Default

a feature you can add is a correcting feature for sfv. I mean correcting SFV that are resumed or badly sent (done before the SFV checking).
I know how to do it but i don't the knoweldge and the time to make it. Here's the idea:
put every line of the sfv in an array and if an element of this array is the end of another, you can delete it.
Example:

ABCD hj12345k
CDBD 1kolgy45
BCD hj12345k

here you can delete the third line. Bad lines are not everytime at the end of the sfv. It can be in the middle or in the start of the sfv. (Sorry for my bad english)
Mr_X is offline   Reply With Quote
Old 01-14-2004, 06:25 AM   #3
fobban
Senior Member
FlashFXP Registered User
ioFTPD Foundation User
 
Join Date: Jan 2003
Posts: 186
Default

Done
fobban is offline   Reply With Quote
Old 01-14-2004, 06:57 AM   #4
DR. GiGa BYTe
Member
ioFTPD Foundation User
 
Join Date: Feb 2003
Posts: 80
Default

I just tested your script... and had a little problem with a sfv file.

Original:
Code:
; File            Size (Bytes)    Time/Date
; ------------    ------------    ---------
; dev-cdht.rar    171.698         00:30:31 14.01.2004
;
dev-cdht.rar B4F27D6A
; End of SFV file.
cleaned:
Code:
;
dev-cdht.rar B4F27D6A
; End
of SFV
Is it possible to fix it?
btw. thanx for this nice script to clean the files...

cu
DR.GB
DR. GiGa BYTe is offline   Reply With Quote
Old 01-14-2004, 07:02 AM   #5
fobban
Senior Member
FlashFXP Registered User
ioFTPD Foundation User
 
Join Date: Jan 2003
Posts: 186
Default

Maybe i should tell how it works

if the fileextension of the uploaded file is sfv

First it scans through the sfv-file and store each line that doesn't start with a ; or is an empty row in an array.

After that it checks for duplicates; i.e. if the filename of row 1 equals the filename of row 2, the row 2 entry in the array is removed.

Now its time for the partitial check
First it compares the fileextention of all files and if 2 or more has the same extension it checks the length of the filename and if one or more entry has a shorter filename, same extension and same crc that entry is removed.

rewriting file with the clean sfv and eventual comments
fobban is offline   Reply With Quote
Old 01-14-2004, 07:12 AM   #6
fobban
Senior Member
FlashFXP Registered User
ioFTPD Foundation User
 
Join Date: Jan 2003
Posts: 186
Default

Quote:
Originally posted by DR. GiGa BYTe
I just tested your script... and had a little problem with a sfv file.

Original:
Code:
; File            Size (Bytes)    Time/Date
; ------------    ------------    ---------
; dev-cdht.rar    171.698         00:30:31 14.01.2004
;
dev-cdht.rar B4F27D6A
; End of SFV file.
cleaned:
Code:
;
dev-cdht.rar B4F27D6A
; End
of SFV
Is it possible to fix it?
btw. thanx for this nice script to clean the files...

cu
DR.GB
Weird: copied your SFV and tested it, my cleaned file was
Quote:
;my comment
;
dev-cdht.rar B4F27D6A
try to download the latest and test again and tell me if its the same, also make sure that ioSFV's line is the last of you OnUploadComplete (shouldnt matter tho, but just in case)
fobban is offline   Reply With Quote
Old 01-14-2004, 07:29 AM   #7
DaPhreak
Junior Member
FlashFXP Registered User
ioFTPD Foundation User
 
Join Date: Dec 2003
Posts: 20
Default

thank ya very much fooban

searchd around for a script like this / to lazy to code it by myself

works just fine, and removes all empty lines and partitial lines :banana:
DaPhreak is offline   Reply With Quote
Old 01-14-2004, 07:51 AM   #8
DR. GiGa BYTe
Member
ioFTPD Foundation User
 
Join Date: Feb 2003
Posts: 80
Default

I made some tests and removed all other OnUploadComplete entries... but nothing changed
I attached the original SFV file... perhaps you can tell me whats wrong with it...
Attached Files
File Type: txt dev-cdht.sfv.txt (197 Bytes, 54 views)
DR. GiGa BYTe is offline   Reply With Quote
Old 01-14-2004, 07:55 AM   #9
DaPhreak
Junior Member
FlashFXP Registered User
ioFTPD Foundation User
 
Join Date: Dec 2003
Posts: 20
Default

Same here with your SFV....

Code:
Cleaned SFV
dev-cdht.rar B4F27D6A
; End
of SFV
DaPhreak is offline   Reply With Quote
Old 01-14-2004, 09:48 AM   #10
fobban
Senior Member
FlashFXP Registered User
ioFTPD Foundation User
 
Join Date: Jan 2003
Posts: 186
Default

fixed now i hope
fobban is offline   Reply With Quote
Old 01-14-2004, 11:57 AM   #11
Mr_X
Senior Member
FlashFXP Registered User
ioFTPD Foundation User
 
Join Date: Sep 2003
Posts: 142
Default

I got a 404 when I try to download your script
Mr_X is offline   Reply With Quote
Old 01-14-2004, 01:24 PM   #12
fobban
Senior Member
FlashFXP Registered User
ioFTPD Foundation User
 
Join Date: Jan 2003
Posts: 186
Default

found another little efvil bug so i removed the file.. gonna fix it when i get time (friday)
fobban is offline   Reply With Quote
Old 01-14-2004, 02:35 PM   #13
DR. GiGa BYTe
Member
ioFTPD Foundation User
 
Join Date: Feb 2003
Posts: 80
Default

thanx for the fast fix :banana:
...looking forward to the next version

Thanx
DR.GB
DR. GiGa BYTe is offline   Reply With Quote
Old 01-14-2004, 06:04 PM   #14
fobban
Senior Member
FlashFXP Registered User
ioFTPD Foundation User
 
Join Date: Jan 2003
Posts: 186
Default

Updated now (early friday this week
Let me know if you find something that doesnt work (haven't had time to test it THAT much)
fobban is offline   Reply With Quote
Old 01-15-2004, 03:17 PM   #15
karmacoma
Junior Member
 
Join Date: Sep 2002
Posts: 27
Default

Funkar kanon än så länge!
Thanks a lot!
karmacoma is offline   Reply With Quote
Reply

Tags
find, lazy, lines, removes, script

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Download grinding to a halt bruceh General Discussion 6 09-07-2004 08:29 AM


All times are GMT -5. The time now is 06:59 AM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)