|
||
---|---|---|
LICENSE | ||
README.md | ||
mmc.sh | ||
poster.jpg | ||
screen-cap.png | ||
style.css |
README.md

Mini Movie Catalog
Mini Movie Catalog (mmc.sh) is a simple Bash script used to create a graphical HTML catalog of all your movies. Additional pages are also created for each movie genre and actor.
MMC accesses the Open Movie Database (OMDb) to acquire information about each movie title while poster images are downloaded from Amazon.
CONFIG
All movie folders must be contained in a parent folder, such as 'Movies', or in a dedicated partition. Each video file must then be contained in its own sub-folder where the folder name is formatted as Movie Name (year)
(for example: 28 Days (2000)
).
Be sure to edit the options in the "USER OPTIONS" section before running the script. An OMDb API key is required and may be obtained at no cost and without hassle from https://www.omdbapi.com/. Note that the free OMDb API keys limit queries to 1000 per day.
If you search the script for USER EDIT : ITEM VARS
and USER EDIT : HTML
you will discover what movie information will be displayed in the catalog. Lines preceded with '###' are commented out and thus this information won't appear in the catalog. You may enable or disable any of the lines except those noted. To enable a line, simply remove the preceding '#' character. The lines in the USER EDIT : HTML
section may also be rearranged if you want these items to appear in a different order in the catalog. Be careful to avoid any syntax errors.
Upon making changes to the script it is strongly recommended to check for common errors using the ShellCheck package. If you do not wish to install ShellCheck you may use the on-line tool at https://www.shellcheck.net/, otherwise just cd
to the script directory and issue the following command:
$ shellcheck -o all mmc.sh
USAGE
To run the script, open a terminal, cd
to the script directory, and issue one of the following commands:
$ ./mmc.sh
$ ./mmc.sh -h
When run without arguments, the script will immediately begin building the catalog by downloading the required movie information and poster images. For each movie a JSON file, an HTML file, a movie poster and thumbnail images will be placed in the /catalog/items
folder. This information will be used to create the catalog for your movie library.
Once the script finishes, a /catalog/index.html
file will have been generated which will be opened in your web browser.
If you need to edit data for a movie, you should edit the associated JSON file rather than the HTML files.
If you want to re-acquire data for a movie, delete the files you want to re-download from the /catalog/items
, /catalog/actors
and/or /catalog/genres
folders.
Any errors encountered while running the script will be logged to errors.txt
.
NOTES
After updating the script it is possible that the actors and/or genre pages may not display correctly. In such a case, delete both the /catalog/actors
and /catalog/genres
folders, then run the script again to regenerate the pages.
When OMDb is queried or a movie poster is downloaded, a short delay will occur between queries to OMDb or Amazon in the interest of being server-friendly. This delay will typically not be present when rebuilding the catalog, such as after editing a movie JSON file or deleting titles from your movie library.