An open API service indexing awesome lists of open source software.

https://github.com/aggstam/movies_randomizer

Simple utility to get movie suggestions from local PSV files.
https://github.com/aggstam/movies_randomizer

c shell

Last synced: 2 months ago
JSON representation

Simple utility to get movie suggestions from local PSV files.

Awesome Lists containing this project

README

          

# movies_randomizer

Suggest a random movie from the dataset of PSV(Pipe-Separated Values) files.


Filenames act as genre, so user can select one to get a suggestion from.


Records format is the following:
```text
{Name}|{Year}|{Duration}
```

## Usage
Two version have been implemented, one with pure C, and a shell script.


Both can be invocted via the Makefile, or by directly compiling and executing.

### Make usage
#### C code
```shell
$ make
```
To include a genre as parameter:
```shell
$ make GENRE={genre}
```

#### Shell script
```shell
$ make script
```
To include a genre as parameter:
```shell
$ make script GENRE={genre}
```

### Direct usage
#### C code
Compilation:
```shell
$ gcc -o movies_randomizer movies_randomizer.c
```
Execution:
```shell
$ ./movies_randomizer
```
To include a genre as parameter:
```shell
$ ./movies_randomizer {genre}
```

#### Shell script
Mark as executable:
```shell
$ chmod a+x movies_randomizer.sh
```
Execution:
```shell
$ ./movies_randomizer.sh
```
To include a genre as parameter:
```shell
$ ./movies_randomizer.sh {genre}
```