Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


I got so lazy of renaming/moving my anime that...
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Random spam
View previous topic :: View next topic  
Author Message
Fafaffy
Cheater
Reputation: 65

Joined: 12 Dec 2007
Posts: 28

PostPosted: Sat Mar 16, 2013 12:57 am    Post subject: I got so lazy of renaming/moving my anime that... Reply with quote

I made a program that would monitor my completed torrent folder (Vuze moves my anime here after it's done downloading)

Once the program detects the file, it will move it to an appropriate folder with an appropriate name.

Here's how my program looks:


and it turns:


into:


and:




Anyway, I'm going on a anime torrenting spree as I'll be gone for most of tomorrow so I can have something to watch when I come back; any suggestions?
Back to top
View user's profile Send private message Send e-mail
Antagonist
Cheater
Reputation: 29

Joined: 24 Nov 2009
Posts: 48
Location: California

PostPosted: Sat Mar 16, 2013 1:34 am    Post subject: Reply with quote

You should watch strong worlds. Its a great anime movie(one piece).
_________________




tough guy talix wrote:
i've had it with your shit. fuck outta here
Back to top
View user's profile Send private message AIM Address
gogodr
I post too much
Reputation: 125

Joined: 19 Dec 2006
Posts: 2041

PostPosted: Sat Mar 16, 2013 1:52 am    Post subject: Reply with quote

it firters the sub group?
also
make it replace _ with " "

I would love to have that app, I got the same problem. I have a 103GB folder unorganized
Back to top
View user's profile Send private message MSN Messenger
Fafaffy
Cheater
Reputation: 65

Joined: 12 Dec 2007
Posts: 28

PostPosted: Sat Mar 16, 2013 1:54 am    Post subject: Reply with quote

gogodr wrote:
it firters the sub group?
also
make it replace _ with " "

I would love to have that app, I got the same problem. I have a 103GB folder unorganized

If you give me the file names, I'll make it compatible with whatever you have.

I'm only using HorribleSubs, so that's the only thing it's finding.
Back to top
View user's profile Send private message Send e-mail
gogodr
I post too much
Reputation: 125

Joined: 19 Dec 2006
Posts: 2041

PostPosted: Sat Mar 16, 2013 2:10 am    Post subject: Reply with quote

oh, what language are you using?
I can make it work automatically.
I could write another one from scratch too..
Back to top
View user's profile Send private message MSN Messenger
Fafaffy
Cheater
Reputation: 65

Joined: 12 Dec 2007
Posts: 28

PostPosted: Sat Mar 16, 2013 2:17 am    Post subject: Reply with quote

gogodr wrote:
oh, what language are you using?
I can make it work automatically.
I could write another one from scratch too..

Using C# atm. Simple to use, yet effective with the FileSystemWatcher
Back to top
View user's profile Send private message Send e-mail
gogodr
I post too much
Reputation: 125

Joined: 19 Dec 2006
Posts: 2041

PostPosted: Sat Mar 16, 2013 2:23 am    Post subject: Reply with quote

blablfy wrote:
gogodr wrote:
oh, what language are you using?
I can make it work automatically.
I could write another one from scratch too..

Using C# atm. Simple to use, yet effective with the FileSystemWatcher

yup.
you can scan all the firles at first, then rename them to fix file names

Parse the name first since files always follow the same format
[subGroup] Anime name - #

if you want it to do and improve your programming search for MSDN C# String
and you can see the functions you can use.

also investigate Lists with C#
Back to top
View user's profile Send private message MSN Messenger
Fafaffy
Cheater
Reputation: 65

Joined: 12 Dec 2007
Posts: 28

PostPosted: Sat Mar 16, 2013 2:28 am    Post subject: Reply with quote

gogodr wrote:
blablfy wrote:
gogodr wrote:
oh, what language are you using?
I can make it work automatically.
I could write another one from scratch too..

Using C# atm. Simple to use, yet effective with the FileSystemWatcher

yup.
you can scan all the firles at first, then rename them to fix file names

Parse the name first since files always follow the same format
[subGroup] Anime name - #

if you want it to do and improve your programming search for MSDN C# String
and you can see the functions you can use.

also investigate Lists with C#

Oh I'm aware of how to edit string and such. I'm only asking for file names because they can very quite heavily.

Like this anime file name:
[AniYoshi]_School_Days_-_01_(h264)_[02F5F33E]

It's quite different as it has the (h264), and the [02F5F33F] which most other animes I download don't. Making it be compatible is easy, it's just I have to see it to find the pattern.
Back to top
View user's profile Send private message Send e-mail
gogodr
I post too much
Reputation: 125

Joined: 19 Dec 2006
Posts: 2041

PostPosted: Sat Mar 16, 2013 2:37 am    Post subject: Reply with quote

blablfy wrote:
gogodr wrote:
blablfy wrote:
gogodr wrote:
oh, what language are you using?
I can make it work automatically.
I could write another one from scratch too..

Using C# atm. Simple to use, yet effective with the FileSystemWatcher

yup.
you can scan all the firles at first, then rename them to fix file names

Parse the name first since files always follow the same format
[subGroup] Anime name - #

if you want it to do and improve your programming search for MSDN C# String
and you can see the functions you can use.

also investigate Lists with C#

Oh I'm aware of how to edit string and such. I'm only asking for file names because they can very quite heavily.

Like this anime file name:
[AniYoshi]_School_Days_-_01_(h264)_[02F5F33E]

It's quite different as it has the (h264), and the [02F5F33F] which most other animes I download don't. Making it be compatible is easy, it's just I have to see it to find the pattern.


do it in steps
1) find first ]
2) delete the first part from the string
3) replace _ for " "
4) check if there is a " " in the first character and if there is detele it
5) search for -
6) you have name and the rest which contains a number which is the episode
7) delete the first " " after - if there is one and split on " " so you have the number and the rest
8) you have now the number
9) search for . so you can get the extension (just if you decided to download a mp4 or avi instead of mkv)
then delete everything between the episode number and the extension.
Back to top
View user's profile Send private message MSN Messenger
Fafaffy
Cheater
Reputation: 65

Joined: 12 Dec 2007
Posts: 28

PostPosted: Sat Mar 16, 2013 2:45 am    Post subject: Reply with quote

gogodr wrote:
blablfy wrote:
gogodr wrote:
blablfy wrote:
gogodr wrote:
oh, what language are you using?
I can make it work automatically.
I could write another one from scratch too..

Using C# atm. Simple to use, yet effective with the FileSystemWatcher

yup.
you can scan all the firles at first, then rename them to fix file names

Parse the name first since files always follow the same format
[subGroup] Anime name - #

if you want it to do and improve your programming search for MSDN C# String
and you can see the functions you can use.

also investigate Lists with C#

Oh I'm aware of how to edit string and such. I'm only asking for file names because they can very quite heavily.

Like this anime file name:
[AniYoshi]_School_Days_-_01_(h264)_[02F5F33E]

It's quite different as it has the (h264), and the [02F5F33F] which most other animes I download don't. Making it be compatible is easy, it's just I have to see it to find the pattern.


do it in steps
1) find first ]
2) delete the first part from the string
3) replace _ for " "
4) check if there is a " " in the first character and if there is detele it
5) search for -
6) you have name and the rest which contains a number which is the episode
7) delete the first " " after - if there is one and split on " " so you have the number and the rest
Cool you have now the number
9) search for . so you can get the extension (just if you decided to download a mp4 or avi instead of mkv)
then delete everything between the episode number and the extension.

Yeah, I'd personally rather use regex
Code:

Regex r = new Regex(@"\[.+\][ |_](?<name>.*)[ |_]-[ |_](?<episode>\d{1,2})");

//other code
if (r.IsMatch(fullpath)) //If the file that was copied/moved to the torrent folder matches with my regex
{
    Match mch = r.Match(fullpath); //Gets the match of the file path
    String name = mch.Groups["name"].Value.Replace("_", " ") ; //Gets the name of the anime
    String episode = mch.Groups["episode"].Value; //Gets the episode of the anime
}

(also, that's not a direct rip of my code, it's a lot more organized, but for reading purposes, that's basically what it's doing)
Back to top
View user's profile Send private message Send e-mail
gogodr
I post too much
Reputation: 125

Joined: 19 Dec 2006
Posts: 2041

PostPosted: Sat Mar 16, 2013 3:18 am    Post subject: Reply with quote

if it works then sure, go ahead.
are you sure your regex is correct?
you need pretty much
replace _ for " "
* ] name - episode * . extension
Back to top
View user's profile Send private message MSN Messenger
Fafaffy
Cheater
Reputation: 65

Joined: 12 Dec 2007
Posts: 28

PostPosted: Sat Mar 16, 2013 3:27 am    Post subject: Reply with quote

gogodr wrote:
if it works then sure, go ahead.
are you sure your regex is correct?
you need pretty much
replace _ for " "
* ] name - episode * . extension

My regex works wonderfully on everything*

*everything I tested, including that school days naming

Anyway, here's an image of a little test file I downloaded:
Back to top
View user's profile Send private message Send e-mail
gogodr
I post too much
Reputation: 125

Joined: 19 Dec 2006
Posts: 2041

PostPosted: Sat Mar 16, 2013 3:32 am    Post subject: Reply with quote

Nice :O
care to share release and/or source?
Back to top
View user's profile Send private message MSN Messenger
Fafaffy
Cheater
Reputation: 65

Joined: 12 Dec 2007
Posts: 28

PostPosted: Sat Mar 16, 2013 3:46 am    Post subject: This post has 1 review(s) Reply with quote

Sure, here's the exe
http://www.mediafire.com/?zaavry1r72rjtmi

After I clean up the code and comment it out a bit, I'll release the source
(I don't like releasing sources without checking over them, and cleaning up)


Also, from testing it's a hit or miss of when the filesystemwatcher works. I'm gonna look into it, but it's 4AM, so I'll do it tomorrow Neutral

You can fix this manually by stop monitoring, and start monitoring again

_________________
Brillia wrote:
I FUCKING FUCK SEX
Back to top
View user's profile Send private message Send e-mail
gogodr
I post too much
Reputation: 125

Joined: 19 Dec 2006
Posts: 2041

PostPosted: Sat Mar 16, 2013 4:50 am    Post subject: Reply with quote

one thing
make it case unsensitive when creating the folders.
it created duplicate folders.

that a side, it worked like a charm, thanks :3

and if you really want to polish it , you can make a little AI that could compare similar names
example
Boku wa tomodachi ga sukunai and Boku ha tomodachi ga sukunai are the same anime, with a little AI you can see that many words match and could even see if there was misspelled words, can launch a popup asking if it is the same anime to change it's file name.


--------
Very Happy everything is nice and tidy now
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Random spam All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites