<commit_before>/*
 * mobile
 * Convert data to the API version as expected by mobile app
 */
'use strict';

var fs = require('fs');
var ent = require('ent');
var YAML = require('yamljs');
var deHtml = function(s) {
  if (s) {
    s = s.replace(/<br>/g, '\n');
    s = s.replace(/<a[- a-zA-Z\"\'=\/:._]*>/g, '');
    s = s.replace(/<\/[a-zA-Z]*>/g, '');
    s = ent.decode(s);
  }
  return s;
};

var src = '_data';
var trg = '_site/api';
// load files from src: speakers.yml, sessions.yml, schedule-data.yml
var speakers = YAML.load(src + '/speakers.yml');
var sessions = YAML.load(src + '/sessions.yml');
var schedule = YAML.load(src + '/schedule.yml');
// give each speaker a unique number
// create output arrays
var i, j, k;
var speakerNum = {};
var speakersOut = [];
var aSpeaker;
for (i=0; i<speakers.length; i++) {
  speakerNum[speakers[i].id] = i+1;
  aSpeaker = {
    'bio': deHtml(speakers[i].bio),
    'id': i+1,
    'name': speakers[i].name + ' ' + speakers[i].surname,
    'photo': 'http://www.devfest.at/img/speakers/' + speakers[i].thumbnailUrl
  }
  if (speakers[i].title && speakers[i].company) {<commit_msg>Remove non-current speakers<commit_after>/*
 * mobile
 * Convert data to the API version as expected by mobile app
 */
'use strict';

var fs = require('fs');
var ent = require('ent');
var YAML = require('yamljs');
var deHtml = function(s) {
  if (s) {
    s = s.replace(/<br>/g, '\n');
    s = s.replace(/<a[- a-zA-Z\"\'=\/:._]*>/g, '');
    s = s.replace(/<\/[a-zA-Z]*>/g, '');
    s = ent.decode(s);
  }
  return s;
};

var src = '_data';
var trg = '_site/api';
// load files from src: speakers.yml, sessions.yml, schedule-data.yml
var speakers = YAML.load(src + '/speakers.yml');
var sessions = YAML.load(src + '/sessions.yml');
var schedule = YAML.load(src + '/schedule.yml');
// give each speaker a unique number
// create output arrays
var i, j, k;
var speakerNum = {};
var speakersOut = [];
var aSpeaker;
for (i=0; i<speakers.length; i++) {
  if (!speakers[i].current) continue;
  speakerNum[speakers[i].id] = i+1;
  aSpeaker = {
    'bio': deHtml(speakers[i].bio),
    'id': i+1,
    'name': speakers[i].name + ' ' + speakers[i].surname,
    'photo': 'http://www.devfest.at/img/speakers/' + speakers[i].thumbnailUrl
  }
  if (speakers[i].title && speakers[i].company) {
{'fraction_non_alphanumeric': 0.21720243266724587, 'fraction_numerical': 0.0026064291920069507, 'mean_word_length': 3.3617424242424243, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, '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': '3795711', 'n_tokens_mistral': 892, 'n_tokens_neox': 865, 'n_words': 215}