<commit_before><?php
/* This file is part of the XP framework
 *
 * $Id$
 */
 
  require('lang.base.php');
  uses(
    'xml.rdf.RDFNewsFeed',
    'util.Properties',
    'rdbms.ConnectionManager',
    'net.xp-framework.db.caffeine.XPNews'
  );
  
  // {{{ main
  
  // Set up connection manager
  $cm= &ConnectionManager::getInstance();
  $cm->configure(new Properties(dirname(__FILE__).'/connection.ini'));
  
  $rdf= &new RDFNewsFeed();
  $rdf->setChannel(
    'XP News', 
    'http://xp.php3.de/',
    'XP Newsflash',
    NULL,
    'en_US',
    'XP-Team <<EMAIL>>',
    'XP-Team <<EMAIL>>',
    'http://xp.php3.de/copyright.html'
  );
  
  // Get news from database
  try(); {
    $news= &XPNews::getByDateOrdered();
  } if (catch('Exception', $e)) {
    $e->printStackTrace();
    exit(-1);
  }
  
  for ($i= 0, $s= sizeof($news); $i < $s; $i++) {
    $rdf->addItem(
      $news[$i]->getCaption(),
      $news[$i]->getLink(),
      $news[$i]->getBody(),
      $news[$i]->getCreated_at()
    );
  }
  
  // Dump
  echo $rdf->getSource($indent= FALSE);
  exit(0);<commit_msg>- Change links in RDF to new URL<commit_after><?php
/* This file is part of the XP framework
 *
 * $Id$
 */
 
  require('lang.base.php');
  uses(
    'xml.rdf.RDFNewsFeed',
    'util.Properties',
    'rdbms.ConnectionManager',
    'net.xp-framework.db.caffeine.XPNews'
  );
  
  // {{{ main
  
  // Set up connection manager
  $cm= &ConnectionManager::getInstance();
  $cm->configure(new Properties(dirname(__FILE__).'/connection.ini'));
  
  $rdf= &new RDFNewsFeed();
  $rdf->setChannel(
    'XP News', 
    'http://xp-framework.net/',
    'XP Newsflash',
    NULL,
    'en_US',
    'XP-Team <<EMAIL>>',
    'XP-Team <<EMAIL>>',
    'http://xp-framework.net/copyright.html'
  );
  
  // Get news from database
  try(); {
    $news= &XPNews::getByDateOrdered();
  } if (catch('Exception', $e)) {
    $e->printStackTrace();
    exit(-1);
  }
  
  for ($i= 0, $s= sizeof($news); $i < $s; $i++) {
    $rdf->addItem(
      $news[$i]->getCaption(),
      $news[$i]->getLink(),
      $news[$i]->getBody(),
      $news[$i]->getCreated_at()
    );
  }
  
  // Dump
  echo $rdf->getSource($indent= FALSE);
  exit(0);
{'fraction_non_alphanumeric': 0.2185066422354558, 'fraction_numerical': 0.0036646816307833257, 'mean_word_length': 2.7079796264855687, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '1277685', 'n_tokens_mistral': 855, 'n_tokens_neox': 833, 'n_words': 148}