Filmometer captures data from a file in the specified format (read below) and tells you from the captured data how many films you have seen, how much time you have spent watching films and what film you have watched the most.
I had the idea of programming this when I started to take English seriously. Then I heard from the teacher of the method I was using that you need at least 3000 hours to master a new language. So, I thought that I could watch films in English until I overcome that number. In order to keep track of this information, I started making a file that contained all the data (I didn't know anything about databases). When I learnt how to program in Python, I made a first script that could capture the data I already had collected and process it. Sadly, a couple of weeks ago I lost all the information stored in my hard drive, so I'm afraid that Python script is lost.
Since I've being programming in C lately, I've decided to recode the same program, but this time it will be written in C.
So, here are some screen captures of the program running on Linux:
Help option:
Summary option:
Most watched film option:
There are a few errors that the program can handle without crashing, but if you don't put the file in the correct format, the behaviour will be unpredictable and the error won't be handled.
About the file format:
Empty lines are not allowed. This is the line format:
title_(year) times_viewed durationmin
or if it's the extended version of the film:
title_(year)_(Extended_Version) times_viewed durationmin
or:
title_(Extended_Version)_(year) times_viewed durationmin
- "title" is a word or a few words, if the real title of the film is composed by two words or more, the spaces must be represented with an underscore character in the file format. The "(" symbol is not allowed.
- "year" is an integer number. It's the year in which the film was released on cinemas for the first time. Only possitive integer number are allowed here.
- "Extended_Version". If you want to register an extended version of a film you must put this. It must be written like that; although, it will work if you just write "E" without quotes.
- "times_viewed". An integer number. The number of times you've watched the film.
- "duration". An integer number. The number of minutes the film lasts. It must be right before the word "min", without any spaces between each other.
This is an example of line in the correct format:
A_Night_at_the_Opera_(1935) 1 96min
Download links:
- Source code
- Windows executable (tested on Windows 7)
- Linux executable (tested on Ubuntu 12.04)
- Sample file (with the Windows new line character)
- Sample file (with the Linux new line character)
No comments:
Post a Comment