Sie sind auf Seite 1von 13

Accept86 RoMoRDuP - Software functional specification v0.

23 14-08-14
RoMoRDuP Rename or Mirror or Remove Duplicates
and update Playlists
Software functional specification v0.23
1 Usin
1.1 Used Languages/Frameworks
-.et
-!P"
-#$
1.2 Used Existing Code
1.2.1 !as"es
Despertar % Stac&'verflow( )#$*
+ou can ,et a -as- of a file li&e t-is
using System.Security.Cryptography;
static string GetFileHash(string filename)
{
byte[] ata ! File."ea#ll$ytes(filename);
byte[] hash ! %&'.Create().ComputeHash(ata);
return Con(ert.)o$ase*+String(hash);
,
MD. is not t-e /ost secure -as-0 1ut it is still fast w-ic- /a&es it ,oo2 for file c-ec&su/s. 3f t-e
files are lar,e ComputerHash() also ta&es a Stream.
1.2.2 Strin similarity
M. 4essup % Stac&'verflow( )4ava0 -as to 1e translate2*
public static int amerau-e(enshtein&istance(
Pa,e 1 of 13
Accept86 RoMoRDuP - Software functional specification v0.23 14-08-14
String a. String b. int alphabet-ength) {
final int /0F/0/)1 ! a.length() 2 b.length();
int[][] H ! ne3 int[a.length()24][b.length()24];
H[5][5] ! /0F/0/)1;
for(int i ! 5; i6!a.length(); i22) {
H[i27][7] ! i;
H[i27][5] ! /0F/0/)1;
,
for(int 8 ! 5; 86!b.length(); 822) {
H[7][827] ! 8;
H[5][827] ! /0F/0/)1;
,
int[] &# ! ne3 int[alphabet-ength];
#rrays.fill(&#. 5);
for(int i ! 7; i6!a.length(); i22) {
int &$ ! 5;
for(int 8 ! 7; 86!b.length(); 822) {
int i7 ! &#[b.char#t(897)];
int 87 ! &$;
int ! ((a.char#t(i97)!!b.char#t(897)):5;7);
if(!!5) &$ ! 8;
H[i27][827] !
min(H[i][8]2.
H[i27][8] 2 7.
H[i][827]27.
H[i7][87] 2 (i9i797) 2 7 2 (898797));
,
&#[a.char#t(i97)] ! i;
,
return H[a.length()27][b.length()27];
,
Pa,e 2 of 13
Accept86 RoMoRDuP - Software functional specification v0.23 14-08-14
pri(ate static int min(int ... nums) {
int min ! /nteger.%#<=>#-?@;
for (int num ; nums) {
min ! %ath.min(min. num);
,
return min;
,
2 Software arc"itecture
2.1 Multithreading architecture
2.2 Class diagramm
3 Detailed procedure for eac" feature
3.1 All eature categor!"s
-user restore profile )"ilter settin,s0 52ite2 scripts*
-user save profile )after a feature -as 1een use2*
-up2ate2 pla6lists an2 relative7a1solute lin&s(
-create cop6 of ol2 version
-s-ow 2ifferences in win/er,e
-pa6 attention to possi1le /ovin,7rena/in, of t-e pla6list
-Save -istor6 of co/plete2 tas&s )wit- 2ate7ti/e an2 user settin,s*)st2( 2eactivate2 to protect
privac6*
-'ption to revert tas&s 16 -istor6
Pa,e 3 of 13
Accept86 RoMoRDuP - Software functional specification v0.23 14-08-14
-Possi1le tas&s(
cop6 fol2er
2elete fol2er
rena/e file fro/ - to
cop6 file
2elete file
create su1 fol2er
/ove file
#olorin, )in 8as& tree*(
-Delete re2
-#op6 ,reen
-Move 6ellow
-Rena/e 1lue
-'pen files 16 )2ou1le-9*clic& in tree
-#-an,e tar,et pat-7file na/e of file 16 clic&in, in tree tas&
-"ilter files 16 e:tension or file na/e % 'r "ol2ers )e.,. A/a;onMP3 fol2er*
-"ilter(e:clu2e : 1ut inclu2e 6 an6wa6
-Report 1u, feature )via e/ail0 a22s tas& lo,*
3.2 Mirror olders
3.2.1 Step 1
)win2ow*
-user select source7tar,et fol2er
-user set file filters
-user set -ow /an6 &16te to process /a: for -as-es )A22 < - !it- warnin,( =ot enou,- &>6te can
result in i2entif6in, 2ifferent files as 2uplicates*
-user select fol2er)a22 /ultiple pat-s* to searc- file content of ?.pls files an2 up2ate pat-s for
/ove272elete2 files. )st2( sa/e fol2ers* )user select filter for pla6list file t6pes*
-user option( c-ec& lin&s too0 for up2atin, pat-s
3.2.2 Step 2
)win2ow*
-,enerate -as- co2es
-s-ow processin, source fol2er7tar,et fol2er
-s-ow pro,ress 1ar
Pa,e 4 of 13
Accept86 RoMoRDuP - Software functional specification v0.23 14-08-14
-s-ow : M>6te processe2 of 6 M>6te
-s-ow re/ainin, ti/e
-s-ow list 1o: wit- files up to current processin, file
-searc- for pla6lists7lin&s
3.2.3 Step 3
)win2ow9*
-for eac- file(
-structure wit-(
--as- co2e of file
-list of 2uplicates wit-
-pat- of 2uplicate

-,enerate list of 2uplicates for eac- file 16 -as- co2es
-,enerate list of all 2uplicates in ,eneral
3.2.# Step #
)win2ow*
user options:
Duplicates(
-s&ip 2uplicates
-rena/e 2uplicates to source
-rena/e 2uplicates to tar,et
Move2 files(
-Move 1ac& to place li&e in source fol2er
-c-an,e filena/e to source
-onl6 applies if t-eres onl6 one e:a/ple in source)ot-erwise use re/ove 2uplicates first*
#op6in,(
-#op6 /issin, file fro/ source to tar,et
-#op6 /issin, file fro/ tar,et to source
Pa,e . of 13
Accept86 RoMoRDuP - Software functional specification v0.23 14-08-14
Deletin,(
-Delete files t-at are in tar,et 1ut not in source
3.2.$ Step $
)no win2ow*
-,enerate tree view
-rena/e 2ifferent files wit- t-e sa/e na/e t-at are copie2 fro/ source to tar,et )a22 nu/1er*
-onl6 s-ow 2ifferences 1etween source7tar,et
-,enerate new pla6lists7lin&s
3.2.% Step %
)win2ow*
-s-ow tas& tree view
for eac- tas&( active72eactive tas&@ 2uplicate of followin, files% list as une2ita1le co/1o1o:@
-s-ow reAuire27availa1le space
-user option( -1efore view
-after view )files7fol2ers can 1e /ove20 files can 1e rena/e20 - not for files t-at are to
1e 2elete2 - -int wit- 9*
-user save lo,
-user error report
-s-ow ol27new pla6lists7lin&s
-eac- file( 3nfo % c-ec&1o: - file is ,oin, to 1e /ove27rena/e2
3.2.& Step &
)win2ow*
-2ialo,( 2o 6ou reall6 want to procee2
Pa,e 6 of 13
Accept86 RoMoRDuP - Software functional specification v0.23 14-08-14
3.2.' Step '
-e:ecute tas&s
-s-ow pro,ress 1ar
-s-ow re/ainin, ti/e
-s-ow list 1o: wit- files up to current processin, file
3.3 #emo$e du%licates
3.3.1 Step 1
)win2ow*
-user select fol2er
-user set file filters)st2. 3,nore picture files*
-user set -ow /an6 &16te to process /a: for -as-es )A22 < - !it- warnin,( =ot enou,- &>6te can
result in i2entif6in, 2ifferent files as 2uplicates*
-user select fol2er)a22 /ultiple pat-s* to searc- file content of ?.pls files an2 up2ate pat-s to
re/ainin, file. 9 - 3nfo( +ou /i,-t &now t-e pro1le/. +ou -ave a ton of 2uplicates in 6our /usic
fol2er0 1ut if 6ou 2elete one0 6our pla6lists stop wor&in,. !it- t-is 6ou can up2ate 6our pla6lists to
t-e new pat-. )st2( sa/e fol2ers* )user select filter for pla6list file t6pes*
-user option( c-ec& lin&s too0 for up2atin, pat-s
3.3.2 Step 2
)win2ow*
-,enerate -as- co2es
-s-ow pro,ress 1ar
-s-ow M>6te processe2 of 6 M16te
-s-ow re/ainin, ti/e
-s-ow list 1o: wit- files up to current processin, file
-searc- for pla6lists7lin&s
3.3.3 Step 3
)win2ow9*
-,enerate list of 2uplicates for eac- file 16 -as- co2es
Pa,e B of 13
Accept86 RoMoRDuP - Software functional specification v0.23 14-08-14
-,enerate list of all 2uplicates in ,eneral
3.3.# Step #
)win2ow*
-for all t-e files wit- 2uplicates eac- one entr6 to select re/ainin, file )co/1o1o:*
-user option( create relative lin& to re/ainin, file )wit- filter option w-ic- 2uplicates t-is applies
to*
-user option( create a1solute lin& to re/ainin, file )wit- filter option w-ic- 2uplicates t-is applies
to*
3.3.$ Step $
)no win2ow*
-,enerate tree view
3.3.% Step %
)win2ow*
-for eac- tas&( 8ree view( active72eactive tas&@ 2uplicate of followin, files% list as une2ita1le
co/1o1o:@ activate 2eactivate create relative lin& to re/ainin, file@ activate 2eactivate create
a1solute lin&
-user save lo,
-user error report
-user option( -1efore view
-after view )files7fol2ers can 1e /ove20 files can 1e rena/e20 - not for files t-at are to
1e 2elete2 - -int wit- 9*
-s-ow ol27new pla6lists7lin&s
-eac- file( 3nfo % c-ec&1o: - file is ,oin, to 1e /ove27rena/e2
3.3.& Step &
)win2ow*
-2ialo,( 2o 6ou reall6 want to procee2
Pa,e 8 of 13
Accept86 RoMoRDuP - Software functional specification v0.23 14-08-14
3.3.' Step '
-e:ecute tas&s
3.& '%timi(e ile names/Folder structures
3.#.1 Step 1
)win2ow*
-user select fol2er
-user select fol2er)a22 /ultiple pat-s* to searc- file content of pla6list files an2 up2ate pat-s to new
file na/e.)st2( sa/e fol2er* )user select filter for pla6list file t6pes*
-user option( c-ec& lin&s too0 for up2atin, pat-s
3.#.2 Step 2
)win2ow*
user options(
si/ilar7i2entical ter/s in file na/es in t-e sa/e fol2er(
-Croup files wit- si/ilar7i2entical ter/s in file na/es) sli2er to set reAuire2 si/ilarit6*
-At least : i2entical or si/ilar ter/s lon,er t-an 6 c-ars
-"ilter otions )st2( an2 un2 D?E )?** % 'r "ol2ers )e.,. A/a;onMP3 fol2er*
st2 filter( onl6 vi2eo7au2io
-Croup options(
-unif6 si/ilar ter/ to t-e one wit- /ost results
-if less t-an : F are t-e sa/e pro/pt user to select version
-if 2ifferent or2ers of si/ilar ter/s
-if less t-an : F are t-e sa/e pro/pt user to select or2er
-Put /ore t-an : ,roupe2 files into t-eir own su1fol2er
-Move files wit- specific ter/s in file na/es in t-eir own su1-fol2er un2er t-e top-fol2er
-open #SG( )=@H separate20 pa6 attention to e:cel options*
-"ilter otions )st2( an2 un2 D?E )?** % 'r "ol2ers )e.,. A/a;onMP3 fol2er*
-sli2er to select si/ilarit6
Pa,e I of 13
Accept86 RoMoRDuP - Software functional specification v0.23 14-08-14
-option to &eep parent fol2er
-option to ,o 16 fol2er na/es to)1ut 2ont &eep parent fol2er t-en*
3.#.3 Step 3
)win2ow*
-#-ec&in, for si/ilar ter/s in fol2ers i,nore ter/s in "ilter.
-DonJt put ,roupe2 files in su1 fol2er if t-e alrea26 -ave t-eir own su1 fol2er
-3f Croup 'ption -unif6 si/ilar ter/ to t-e one wit- /ost results % selecte2
-select version of si/ilar ter/s
-re/ove si/ilar version of ter/
-3f Croup 'ption -if 2ifferent or2ers of si/ilar ter/s -selecte2
-3f a i2entical or si/ilar ter/ is foun2 ,ive options)#o/1o1o:es in win2ow* select K8er/AK
KA22So/et-in,3n>etweenK select K8er/>K
-Lser 2efine filter for /ovin,
-"unction to /ove all files wit- a )si/ilar*specific ter/ in t-eir na/e )e.,. =/etallicaH* in t-e sa/e
top-fol2er selecte2 16 a user.
-)=@H separate20 pa6 attention to e:cel options*
-"ilter otions )st2( an2 un2 D?E )?** % 'r "ol2ers )e.,. A/a;onMP3 fol2er*
-c-ec& ter/s in #SG for t-eir file t6pes
-if true0 c-ec& if t-ere is a su1 fol2er wit- a si/ilar ter/ un2er t-e top-fol2er0 use t-at
-ot-erwise create fol2er
-if &eep parent fol2er0 create su1-fol2er wit- sa/e na/e
e:a/ple( if file
=Selecte2 8op "ol2erHMNMusic PersonOMPerson+MDistur1e2Mso/et-in,M>elieve
)A2vance*MDistur1e2 - 04 % 1elieve./p3
is foun20 put to
=Selecte2 8op "ol2erHMDistur1e2M>elieve )A2vance*MDistur1e2 - 04 % 1elieve./p3
)in #SG t-ere is a entr6 Distur1e2@/p3@w/a*
Pa,e 10 of 13
Accept86 RoMoRDuP - Software functional specification v0.23 14-08-14
-if option to ,o 16 fol2er na/es to)1ut 2ont &eep parent fol2er t-en*(
3f fol2er wit- )si/ilar*ter/ in #SG is foun20 put files of specifie2 file t6pes to new
pat- un2er top fol2er
e:a/ple( if pat-
=Selecte2 8op "ol2erHMNMusic PersonOMPerson+MS6ste/ of a 2ownM8o:icit6M04 8itel
4.w/a
put to
=Selecte2 8op "ol2erHMS6ste/ of a 2ownM8o:icit6M04 8itel 4.w/a
)in #SG t-ere is a entr6 S6ste/ of a 2own@/p3@w/a*
-if suc- a file alrea26 e:ists0 a nu/1er is a22e2 to t-e file na/e)Duplicates can 1e re/ove2
wit- t-e re/ove 2uplicate feature*
3.#.# Step #
)win2ow*
-s-ow preview win2ow in a si2e1ar to t-e ri,-t
-user options(
-user can select fol2er for preview)stan2ar2 pat- is fol2er fro/ step one*
)save7restore script entr6s*
-A22 script entr6)/a: 10*
-Re/ove script entr6
-Possi1le first options of entr6(
-"in2 ter/ : in filena/e t-en... )option to fin2 1020...: ti/es*)supports wil2car2s*)li/it to
c-ars : to 6*)2eactivates secon2 option*
-su1 option for fin2in, si/ilar ter/s to : ) sli2er to set reAuire2 si/ilarit6*
-su1 option e:clu2e e:tension
-3f c-ars fro/ : to 6 counte2 fro/ 1e,innin, or en2 contain ter/ ; t-en... )/ust 1e true to
e:ecute action*)can 1e ne,ate2*)supports wil2car2s*
-"in2 sa/e c-ar : in a row)2eactivates secon2 option*
-"in2 nu/1er 1etween c-ars : an2 6)2eactivates secon2 option*
Pa,e 11 of 13
Accept86 RoMoRDuP - Software functional specification v0.23 14-08-14
-Possi1le secon2 options of entr6
-"in2 ter/ : in filena/e t-en.. )onl6 possi1le w-en first entr6 P if* )option to fin2 1020...:
ti/es*)supports wil2car2s*)li/it to c-ars : to 6*
-su1 option for fin2in, si/ilar ter/s to : ) sli2er to set reAuire2 si/ilarit6*
-su1 option e:clu2e e:tension
-if c-ars fro/ : to 6 counte2 fro/ 1e,innin, or en2 contain ter/ ; t-en... )if first option is if
1ot- /ust 1e true to e:ecute action*)can 1e ne,ate2*)supports wil2car2s*
-"in2 sa/e c-ar : in a row)onl6 after if*
-"in2 nu/1er 1etween c-ars : an2 6
-Possi1le actions of entr6
3f "in27"in2 sa/e c-ars in a row7"in2 nu/1er 1etween c-ars : an2 6(
-select an2 /ove "in2 result)s* to 1e,innin,7en27c-ar position :
-select an2 replace "in2 result)s* wit- 6
Alwa6s(
-Re/ove c-ars fro/ : to 6 fro/ 1e,innin,7en2
-A22 nu/1er to position :0 increase for eac- result in fol2er
t-e stan2ar2 rules are(
-"in2 all KNK replace wit- K K
-"in2 all KF20K replace wit- K K
-"in2 all K.K replace wit- K K e:clu2e e:tension
-"in2 all K)?)" Move to end
-Find all "[*]K Move to en2
-"in2 K-K in first 3 >6tes replace wit- not-in,
-"in2 /ultiple K K in a row replace wit- one = =
-"in2 K K in first 16te re/ove if foun2
-"in2 K K in last 16te re/ove if foun2
3.#.$ Step $
)win2ow*
-,enerate tree view
Pa,e 12 of 13
Accept86 RoMoRDuP - Software functional specification v0.23 14-08-14
-c-ec& if file na/e alrea26 e:ists0 in t-is case a22 nu/1er
-searc- for pla6lists7lin&s
-,enerate new pla6lists
3.#.% Step %
)win2ow*
-for eac- tas&( 8ree view( active72eactive tas&@ ori,inal na/e :@ rena/e to na/e 6
-user save lo,
-user error report
-user option( -1efore view
-after view )files7fol2ers can 1e /ove20 files can 1e rena/e20 -int wit- 9*
-s-ow ol27new pla6lists7lin&s
-eac- file( 3nfo % c-ec&1o: - file is ,oin, to 1e /ove27rena/e2
3.#.& Step &
)win2ow*
-2ialo,( 2o 6ou reall6 want to procee2
3.#.' Step '
)win2ow*
-e:ecute tas&s
Pa,e 13 of 13

Das könnte Ihnen auch gefallen