<commit_before><?
include("lastRSS.php");

function list_nodes()
{
	global $url, $web;
	$rss = new lastRSS; 

	if ($items = $rss->get($url))
	{
		$nodes = $items['items'];
	}
	else
	{
		$nodes=null;
	}
	include("templates/nodes.php");
}

function googleize($matches)
{
	return("http://wap.google.com/gwt/n?mrestrict=wml&output=wml&u=" .
		urlencode(substr($matches[0], 1, strlen($matches[0])-2)));
}

function display_node($node, $param)
{
	global $web, $url;
	$rss = new lastRSS;

	if(is_numeric($node))
	{
		$raw = file_get_contents("$web/$node");
		// drop header
		$cikk = strstr($raw, '<div class="node  ">');
		if(!($cikk))
			// ez vmi blog lesz
			$cikk = strstr($raw, '<div class="node">');
		$data = substr(strstr($cikk, '<div class="content">'),
			strlen('<div class="content">'));
		// drop footer
		$data = substr($data, 0, strpos($data, '</div>'));
		// internal links
		$data = str_replace("node/", "", $data);
		// external links<commit_msg>ne haljon meg kepek ill. uj ablakban nyilo linkek eseten<commit_after><?
include("lastRSS.php");

function list_nodes()
{
	global $url, $web;
	$rss = new lastRSS; 

	if ($items = $rss->get($url))
	{
		$nodes = $items['items'];
	}
	else
	{
		$nodes=null;
	}
	include("templates/nodes.php");
}

function googleize($matches)
{
	return("http://wap.google.com/gwt/n?mrestrict=wml&output=wml&u=" .
		urlencode(substr($matches[0], 1, strlen($matches[0])-2)));
}

function display_node($node, $param)
{
	global $web, $url;
	$rss = new lastRSS;

	if(is_numeric($node))
	{
		$raw = file_get_contents("$web/$node");
		// drop header
		$cikk = strstr($raw, '<div class="node  ">');
		if(!($cikk))
			// ez vmi blog lesz
			$cikk = strstr($raw, '<div class="node">');
		$data = substr(strstr($cikk, '<div class="content">'),
			strlen('<div class="content">'));
		// drop footer
		$data = substr($data, 0, strpos($data, '</div>'));
		// internal links
		$data = str_replace("node/", "", $data);
		// strip out images
		$data = preg_replace('/<img src="([^"]+)" [^>]+>/', 'kep: $1', $data);
		$data = preg_replace('/<a target="[^"]+"/', '<a', $data);
		// external links
{'fraction_non_alphanumeric': 0.23841059602649006, 'fraction_numerical': 0.005203405865657522, 'mean_word_length': 4.3007518796992485, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '5736955', 'n_tokens_mistral': 886, 'n_tokens_neox': 832, 'n_words': 164}