<commit_before>#!/usr/bin/env bash
# record.sh

# mencoder compilation snippet taken from
# http://www.bhalash.com/archives/885403473
# I did the rest.

NAME="screenlapser"
VERSION="1.0"
AUTHOR="@f03lipe"
USAGE="Usage: $(basename $0) [-d dir] [-m soundtrack] [-q] [ action ]
Create and compile screenlapses using scrot and mencoder.
where:
	action is among:
		record		Starts taking pictures.
		compile		Uses mencoder to create the video.
		reset		Removes the saved screenshots from the directory specified.
		stats		Shows stats on the number of screenshoots taken.
	-d	Specifies the directory to save the screenshots.
	-m	Specifies the background music for the footage.
		Only used when the action is set to 'compile'.
	-q	Quiet mode.
Attention: please, follow the order specified above."

unset QUIET # Just to make sure.
LOGFILE=".screens"
SOURCE_DIR=`dirname $0`

source $SOURCE_DIR/functions.sh

# Globals in this script.
#	SOUNDTRACK		# The soundtrack file to the video. 
#	LOGFILE			# Keeps track of the screenshot files.
#	FINALFILE		# The destination of the video
#	WORKING_DIR		# 
#	SOURCE_DIR		# 
#	SOUNDTRACK		# Music background for the video
#	SLEEP			# 
#	QUIET			# Quiet mode is on when this is set.



#! add -:
# see http://stackoverflow.com/questions/402377/7680682#7680682

E_BADARGS=85
E_NOTFOUND=86

while getopts ":m:d:q" OPTION
do
	case $OPTION in
		d)
			WORKING_DIR="$OPTARG"
			;;
		m)
			SOUNDTRACK="$OPTARG"
			;;
		q)
			QUIET=1
			;;
		:) # smile
			echo "Option -$OPTARG requires an argument." >&2
			usage_and_die $E_BADARGS
			;;

		?)
			echo "Unknown option -$OPTARG." >&2<commit_msg>Bug fix on sound location.<commit_after>#!/usr/bin/env bash
# record.sh

# mencoder compilation snippet taken from
# http://www.bhalash.com/archives/885403473
# I did the rest.

NAME="screenlapser"
VERSION="1.0"
AUTHOR="@f03lipe"
USAGE="Usage: $(basename $0) [-d dir] [-m soundtrack] [-q] [ action ]
Create and compile screenlapses using scrot and mencoder.
where:
	action is among:
		record		Starts taking pictures.
		compile		Uses mencoder to create the video.
		reset		Removes the saved screenshots from the directory specified.
		stats		Shows stats on the number of screenshoots taken.
	-d	Specifies the directory to save the screenshots.
	-m	Specifies the background music for the footage.
		Only used when the action is set to 'compile'.
	-q	Quiet mode.
Attention: please, follow the order specified above."

unset QUIET # Just to make sure.
LOGFILE=".screens"
SOURCE_DIR=`dirname $0`

source $SOURCE_DIR/functions.sh

# Globals in this script.
#	SOUNDTRACK		# The soundtrack file to the video. 
#	LOGFILE			# Keeps track of the screenshot files.
#	FINALFILE		# The destination of the video
#	WORKING_DIR		# 
#	SOURCE_DIR		# 
#	SOUNDTRACK		# Music background for the video
#	SLEEP			# 
#	QUIET			# Quiet mode is on when this is set.



#! add -:
# see http://stackoverflow.com/questions/402377/7680682#7680682

E_BADARGS=85
E_NOTFOUND=86

while getopts ":m:d:q" OPTION
do
	case $OPTION in
		d)
			WORKING_DIR="$OPTARG"
			;;
		m)
			SOUNDTRACK=$(readlink -e $OPTARG)
			;;
		q)
			QUIET=1
			;;
		:) # smile
			echo "Option -$OPTARG requires an argument." >&2
			usage_and_die $E_BADARGS
			;;

		?)
			echo "Unknown option -$OPTARG." >&2
{'fraction_non_alphanumeric': 0.10208461066830166, 'fraction_numerical': 0.02575107296137339, 'mean_word_length': 3.5636363636363635, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7093029', 'n_tokens_mistral': 1313, 'n_tokens_neox': 1187, 'n_words': 381}