README
Welcome to pmdb, Personal Movie Data Base.
This is my first perl project I have put together.
(The code may not be pretty and may still be an issue with curtain movies)
As it does a job for me, I thought there must be someone else who would appreciate it. It is a small database that catalogues your moive colection with the benifit of recording different formats, so DVDs, Blu-ray and different downloaded formats.
It will keep track of how many times a movie has been watched, if you have borrowed a film from or lent a film to someone.
Like IMDb.com you can list all movies by a director, producer, actor or writer, and by genre or year.
REQUIREMENTS
To use pmdb you will need:
Perl with 'Getopt::Long' 'DBI' 'LWP::Simple' installed in cpan
MySQL
a webserver with php, I use apache and PHP
INSTALL
To install pmdb, place pmdb.pl and pmdb.cfg somewhere you can exec files, pmdb.cfg needs to be in working directory when pmdb.pl is run.
To set up database, create a database and user for pmdb to use, then source pmdb.sql to create necessary tables.
For web based front end, create a sub folder in webserver and put all php files in it, and edit config.php changing MySQL settings to match your created user/password/database/host.
Before running pmdb.pl the first time, pmdb.cfg will need to be updated also to match database settings.
RUNNING
./pmdb.pl [-f/--format "DVD|avi|mp4|Blu-Ray|etc"] [-y/--year "2014"] [--auto] [-i/--imdb "0000000"] [-t/--title "Swordfish"]
pmdb.pl needs one of two options to run, -t/--title or -i/--imdb, where title would be the name of the movie to add if the script has trouble detecting the correct movie, run with the addition of -y/--year, but if there is still an issue, go to www.imdb.com and find the movie in question the copy the code from the address bar (the 7 digit number after the 'tt' (www.imdb.com/tt0000000) and run again with ./pmdb -i 000000.
To stop being asked for format name you can use -f/--format "DVD" when run.
There is also an option to automatically insert into database, skiping the confirmation question, helpfull if running with an imdb code, or a script
./pmdb.pl -f "DVD" -i "0000000"
To view the web frontend, just visit your webhost and subfolder and explore.
When in web frontend, to edit the people to can borrow from/lent to change address to:
http://localhost/pmdb?admin
where http://localhost is your sever address
and pmdb is the subfolder of pmdb
CONFIG
the pmdb.cfg is designed to take options of one word, no spaces if format VAR=STRING
%WEBDIR%/%PMDBDIR%/config.php all options are inclose in double quotes, with each line ending in a semi-colon