<commit_before>#!/bin/bash

# <NAME> (<EMAIL>)

# PRINTER CONFIG

key="$1"

install_cmd()
{
	echo "  - Configuring printers"

	# BACKUP
	if [ ! -f /etc/cups/printers.conf.bkp ]; then
		cp /etc/cups/printers.conf /etc/cups/printers.conf.bkp
	fi

	service cups stop 2> /dev/null

	#===========================
	read -r -d '' PRINTERS <<-EOM

	# Printer configuration file for CUPS v1.7.2
	# Written by cupsd
	# DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING

	# Printer configuration file for CUPS v1.7.2
	# Written by cupsd
	# DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING

	<Printer PDF>
	UUID urn:uuid:0888f27b-befd-30c7-5b0a-1ff0aea8a8d2
	Info PDF Printer
	DeviceURI cups-pdf:/
	PPDTimeStamp *
	State Idle
	StateTime 1420820769
	Type 8450124
	Accepting Yes
	Shared No
	ColorManaged Yes
	JobSheets none none
	QuotaPeriod 0
	PageLimit 0
	KLimit 0
	OpPolicy default
	ErrorPolicy retry-job
	</Printer>

	<Printer PUCRS>
	UUID urn:uuid:fd6442e8-b0df-3858-4bb3-d7822efb5286
	AuthInfoRequired username,password
	Info Generic PCL 6
	Location Sistema de Impressão da PUCRS
	DeviceURI smb://10.40.110.105/impressora
	PPDTimeStamp *
	State Idle
	StateTime 1460470876
	Type 12627996
	Accepting Yes
	Shared No
	ColorManaged Yes
	JobSheets none none
	QuotaPeriod 0
	PageLimit 0
	KLimit 0
	OpPolicy authenticated
	ErrorPolicy retry-job
	Option fitplot True
	Option media 1
	Option media-col media-bottom-margin
	Option output-bin 0
	Option print-color-mode monochrome
	Option print-quality 5
	</Printer>

	EOM
	#===========================

	echo "$PRINTERS" > /etc/cups/printers.conf

	service cups start

}

remove_cmd()
{
	echo "  - Reverting printers config"

	service cups stop 2> /dev/null

	if [ -f /etc/cups/printers.conf.bkp ]; then
		mv /etc/cups/printers.conf.bkp /etc/cups/printers.conf
	fi

	service cups start
}

case $key in

	-i|--install)
	install_cmd
	exit 0
	;;

	-r|--remove)
	remove_cmd
	exit 0
	;;

	*)
	echo "Unknonw option"
	exit 1

esac


<commit_msg>Fixing minor issue on printers script<commit_after>#!/bin/bash

# <NAME> (<EMAIL>)

# PRINTER CONFIG

key="$1"

install_cmd()
{
	echo "  - Configuring printers"

	# BACKUP
	if [ ! -f /etc/cups/printers.conf.bkp ]; then
		if [ -f /etc/cups/printers.conf ]; then
			cp /etc/cups/printers.conf /etc/cups/printers.conf.bkp
		fi
	fi

	service cups stop 2> /dev/null

	#===========================
	read -r -d '' PRINTERS <<-EOM

	# Printer configuration file for CUPS v1.7.2
	# Written by cupsd
	# DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING

	# Printer configuration file for CUPS v1.7.2
	# Written by cupsd
	# DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING

	<Printer PDF>
	UUID urn:uuid:0888f27b-befd-30c7-5b0a-1ff0aea8a8d2
	Info PDF Printer
	DeviceURI cups-pdf:/
	PPDTimeStamp *
	State Idle
	StateTime 1420820769
	Type 8450124
	Accepting Yes
	Shared No
	ColorManaged Yes
	JobSheets none none
	QuotaPeriod 0
	PageLimit 0
	KLimit 0
	OpPolicy default
	ErrorPolicy retry-job
	</Printer>

	<Printer PUCRS>
	UUID urn:uuid:fd6442e8-b0df-3858-4bb3-d7822efb5286
	AuthInfoRequired username,password
	Info Generic PCL 6
	Location Sistema de Impressão da PUCRS
	DeviceURI smb://10.40.110.105/impressora
	PPDTimeStamp *
	State Idle
	StateTime 1460470876
	Type 12627996
	Accepting Yes
	Shared No
	ColorManaged Yes
	JobSheets none none
	QuotaPeriod 0
	PageLimit 0
	KLimit 0
	OpPolicy authenticated
	ErrorPolicy retry-job
	Option fitplot True
	Option media 1
	Option media-col media-bottom-margin
	Option output-bin 0
	Option print-color-mode monochrome
	Option print-quality 5
	</Printer>

	EOM
	#===========================

	echo "$PRINTERS" > /etc/cups/printers.conf

	service cups start
}

remove_cmd()
{
	echo "  - Reverting printers config"

	service cups stop 2> /dev/null

	if [ -f /etc/cups/printers.conf.bkp ]; then
		mv /etc/cups/printers.conf.bkp /etc/cups/printers.conf
	fi

	service cups start
}

case $key in

	-i|--install)
	install_cmd
	exit 0
	;;

	-r|--remove)
	remove_cmd
	exit 0
	;;

	*)
	echo "Unknonw option"
	exit 1

esac



{'fraction_non_alphanumeric': 0.11286681715575621, 'fraction_numerical': 0.05166792074241284, 'mean_word_length': 3.51131221719457, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '3190151', 'n_tokens_mistral': 1765, 'n_tokens_neox': 1563, 'n_words': 428}