<commit_before><?php
require_once "Math/BigInteger.php";
require_once "Crypt/RSA.php";
require_once "settings.php";
require_once "lib/exceptions/ParseSpotXmlException.php";
require_once "lib/SpotSigning.php";

class SpotParser {
	function parseFull($xmlStr) {
		# Gebruik een spot template zodat we altijd de velden hebben die we willen
		$tpl_spot = array('category' => '', 'website' => '', 'image' => '', 'sabnzbdurl' => '', 'messageid' => '', 'searchurl' => '', 'description' => '',
						  'sub' => '', 'filesize' => '', 'poster' => '', 'tag' => '', 'nzb' => '', 'title' => '', 'key-id' => '',
						  'subcatlist' => array(), 'subcata' => '', 'subcatb' => '', 'subcatc' => '', 'subcatd' => '', 'imageid' => '');


		/* 
		 * Onderdruk errors bij corrupte messaegeid, bv: <<EMAIL>>
		 */		
		$xml = @(new SimpleXMLElement($xmlStr));
		$xml = $xml->Posting;
		$tpl_spot['category'] = (string) $xml->Category;
		$tpl_spot['website'] = (string) $xml->Website;
		$tpl_spot['description'] = (string) $xml->Description;
		$tpl_spot['filesize'] = (string) $xml->Size;
		$tpl_spot['poster'] = (string) $xml->Poster;
		$tpl_spot['tag'] = (string) $xml->Tag;
		$tpl_spot['title'] = (string) $xml->Title;<commit_msg>Cleanup, die libraries worden enkel nog gebruikt door SpotSigning<commit_after><?php
require_once "settings.php";
require_once "lib/exceptions/ParseSpotXmlException.php";
require_once "lib/SpotSigning.php";

class SpotParser {
	function parseFull($xmlStr) {
		# Gebruik een spot template zodat we altijd de velden hebben die we willen
		$tpl_spot = array('category' => '', 'website' => '', 'image' => '', 'sabnzbdurl' => '', 'messageid' => '', 'searchurl' => '', 'description' => '',
						  'sub' => '', 'filesize' => '', 'poster' => '', 'tag' => '', 'nzb' => '', 'title' => '', 'key-id' => '',
						  'subcatlist' => array(), 'subcata' => '', 'subcatb' => '', 'subcatc' => '', 'subcatd' => '', 'imageid' => '');


		/* 
		 * Onderdruk errors bij corrupte messaegeid, bv: <<EMAIL>>
		 */		
		$xml = @(new SimpleXMLElement($xmlStr));
		$xml = $xml->Posting;
		$tpl_spot['category'] = (string) $xml->Category;
		$tpl_spot['website'] = (string) $xml->Website;
		$tpl_spot['description'] = (string) $xml->Description;
		$tpl_spot['filesize'] = (string) $xml->Size;
		$tpl_spot['poster'] = (string) $xml->Poster;
		$tpl_spot['tag'] = (string) $xml->Tag;
		$tpl_spot['title'] = (string) $xml->Title;
{'fraction_non_alphanumeric': 0.23835274542429286, 'fraction_numerical': 0.0, 'mean_word_length': 4.685579196217494, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 63, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 24}, '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': '4509092', 'n_tokens_mistral': 934, 'n_tokens_neox': 879, 'n_words': 169}