Skip to content

A movie/series database manager written in C/sqlite3

License

Notifications You must be signed in to change notification settings

hackmac89/cMovies

Repository files navigation

cMovies

Coming soon 😃

Table of contents

  1. About
  2. Installation
  3. Structure
  4. TODO-list
  5. Changelog
  6. Examples

1. About

cMovies is a small (in the works) command-line-utility for managing a sqlite3 database to organize your personal movies and series collection. It stores basic informations like title, plot, your rating, entry date & where you stored it inside your collection (e.g DVD, HDD filepath, DVD map "xyz" etc. pp.).
Furthermore, you are able to store the materials´ quality (e.g. DVD, BluRay, Telesync, CAM etc. pp.) alongside with some other information.

cMovies will be running under Unix-based operating systems (when using NCurses/CDK).

2. Installation

Since this is just a little project, there´s not much to do...

Creating the database

Just run the shell script inside the project directory with

./makeDB.sh

This will create the database „movies.db” inside the bin directory.

### Compiling the code

Just run

make

inside the project directory to call the MAKEFILE with make, which will create the binary inside the projects´ bin directory. Alternatively, you can use the included XCode project file if you´re developing under MacOS.

3. Structure

Database structure

database layout

Look into the „movies.sql” file for further information about the layout

Code structure

 [PROJECT-DIR]
  ||
   ==> bin/         (database and executable)
        ||
         ==> - cmovies : the application
             - movies.db : the database
             - cmovies.log : the log file of the application
  ||
   ==> src/         (the C source code)
        ||
         ==> - cmovies.c : main application code (entry point)
             - cmovies.h : header file for the main application (structure & function prototypes)
             - dbutils.c : implementation of database functions (add movie, add series etc. pp.)
             - dbutils.h : header with sql queries & function prototypes
             - log.c : implementation of the logging functionality
             - log.h : header with function prototype for log.c code file
  ||
   ==> tests/       (SQL-tests)
        ||
         ==> valgrind-results/
                ||
                 ==>   valgrind memcheck results of the test cases 
        ||
         ==> executables/
                ||
                 ==> - the binaries of the test cases
        ||
         ==> several code files for testing
  ||                
   ==>              (installation files & other)
       - makefile : compiles the source code with the "make" utility  
       - README.md : The markdown file you´re reading right now :smiley:
       - movies_db_layout.jpg : cheat-picture of the database layout
       - makeDB.sh : the shell script which creates the database out of the sql-statements in "movies.sql"
       - movies.sql : SQL DDL statements which define our database layout

4. TODO-list

  • define DDL
  • prepare code skeleton
  • test the basic underlying sql
  • push the early and working version to a version control system like Git
  • create a TUI with NCurses/CDK
  • switch to GNU-Autotools if the things get more complex (instead of using shell install scripts)
  • patch errors and other stuff
  • adding support for online databases like „rottentomatoes” etc. (???)

5. Changelog

What´s New ?!

09/18/2016:

  • Prepared the implementation for the resuming update functions

09/08/2016:

  • Implemented the remaining functions for series support

  • Added 2 new genres

  • Implemented deletion functions

  • some minor code changes

  • What´s next to come ?

    - implement the UPDATE function
    - semantics error checks & fixes
    - some minor additions (rearrange and add some logging, implement the update functions)
    - TUI
    

09/03/2016:

  • Initial release

6. Examples

Check out the „tests” directory

About

A movie/series database manager written in C/sqlite3

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages