"Directory Watch" script

Want to help out? Need help accessing the AniDB API? This is the place to ask questions.

Moderator: AniDB

Locked
Arny
Posts: 10
Joined: Tue Jan 09, 2007 10:11 am
Location: Sydney, Australia
Contact:

"Directory Watch" script

Post by Arny » Tue Jan 09, 2007 11:50 am

This is just a quick post to hopefully get some suggestions and gauge the interest in a linux script I'm thinking of writing for AniDB. I've just recently finished rebuilding my home file server so that it now has enough space for me to keep all of my anime (among other things) on the server itself, rather than having to grab my archived copies for viewing. However, I've been fairly lazy with regards to putting all of my stuff into AniDB and keeping it up-to-date. This is where the idea of a script running via cron on my server has come from.

For starters I'm thinking of something that will check a specified directory at a predefined interval (once a day perhaps) and see if any new files have been placed there. If so, it will then hash them and add them to my list. Simple, no?

I figure from this basis I can add further features as they seem appropriate to me, and I can also use the local copy of the data for my list in other apps with ease. So does anyone have any pointers/thoughts/ideas? Has this been done before? I had a look through the clients list and I didn't see anything that did exactly what I'm after, although I may well use some of the code there as a basis where permissible.

Anyway, any suggestions and/or constructive criticism is more than welcome, especially for the name of the script :D

PetriW
AniDB Staff
Posts: 1522
Joined: Sat May 24, 2003 2:34 pm

Post by PetriW » Tue Jan 09, 2007 12:44 pm

Aom.5 does this, currently working on getting it to work in linux so maybe there'll be a tcp client which can do this for linux soon.

If not I'm certain there's interest for this, actually I think there'd be interest for this anyway.

Arny
Posts: 10
Joined: Tue Jan 09, 2007 10:11 am
Location: Sydney, Australia
Contact:

Post by Arny » Tue Jan 09, 2007 1:25 pm

Thanks for the reply and encouragement PetriW.

I had a feeling that AOM had this type of functionality, and I did notice the thread on the linux version, however what I'm proposing is something far less complex :)

For one thing, it's intended for a minimal linux server environment, meaning no GUI or anything; I don't even have X installed on my system, it's all command-line. I'm envisioning a simple configuration file where you set your options and then you just leave the script to do it's work. Set and forget sort of thing.

PetriW
AniDB Staff
Posts: 1522
Joined: Sat May 24, 2003 2:34 pm

Post by PetriW » Tue Jan 09, 2007 1:43 pm

Yeah, seemed like that but I just wanted to point the aom thing out. ;)

User avatar
exp
Site Admin
Posts: 2438
Joined: Tue Oct 01, 2002 9:42 pm
Location: Nowhere

Post by exp » Wed Jan 10, 2007 8:18 am

are you sure that there is no UDP client which does this?
I haven't actually tried out most of those, but from their description some seem to be simple, platform independent command line tools.
I'd assume that one of them might actually do exactly what you want.

BYe!
EXP

Arny
Posts: 10
Joined: Tue Jan 09, 2007 10:11 am
Location: Sydney, Australia
Contact:

Post by Arny » Wed Jan 10, 2007 8:34 am

There are some others which seem to do this which I haven't played with yet, but even if they cover what I'm after at this point I've got some other ideas floating around in my head that will almost certainly require some customisation. It's quite likely that whatever I end up with will be based on something else to some extent.

Locked