<commit_before>package SReview::Schedule::Wafer::Talk;

use Moose;
use Mojo::Util 'slugify';

extends 'SReview::Schedule::Penta::Talk';

sub _load_upstreamid {
	return shift->schedref->attribute('guid');
}

sub _load_slug {
	return shift->xml_helper('slug');
}

sub _load_speakers {
	my $self = shift;

	return [] if (grep(/^persons$/, $self->schedref->children_names) == 0);
	return $self->SUPER::_load_speakers;
}

sub _load_filtered {
	return 0 if defined(shift->xml_helper('type'));
	return 1;
}

no Moose;

package SReview::Schedule::Wafer;

use Moose;
use SReview::Schedule::Penta;

extends 'SReview::Schedule::Penta';

=head1 NAME

SReview::Schedule::Wafer - sreview-import schedule parser for the Pentabarf XML format as created by the Wafer conference management system.

=head1 DESCRIPTION

The Wafer conference management system has the ability to create an XML
version of its schedule that is compatible with the Pentabarf XML
format. However, it is mildly different in the way it creates it, most
significantly in the way it creates unique IDs. As such, importing such
a schedule with the L<SReview::Schedule::Penta> parser will fail to
create a stable schedule in SReview.

This parser uses the L<SReview::Schedule::Penta> parser with the minimal
required changes to make it work with the Wafer schedule parser.
<commit_msg>Unconfuse Wafer penta parser<commit_after>package SReview::Schedule::Wafer::Talk;

use Moose;
use Mojo::Util 'slugify';
use DateTime::Format::ISO8601;

extends 'SReview::Schedule::Penta::Talk';

sub _load_upstreamid {
	return shift->schedref->attribute('guid');
}

sub _load_slug {
	return shift->xml_helper('slug');
}

sub _load_speakers {
	my $self = shift;

	return [] if (grep(/^persons$/, $self->schedref->children_names) == 0);
	return $self->SUPER::_load_speakers;
}

sub _load_filtered {
	return 0 if defined(shift->xml_helper('type'));
	return 1;
}

sub _load_starttime {
	return DateTime::Format::ISO8601->parse_datetime(shift->xml_helper('date'));
}

no Moose;

package SReview::Schedule::Wafer;

use Moose;
use SReview::Schedule::Penta;

extends 'SReview::Schedule::Penta';

=head1 NAME

SReview::Schedule::Wafer - sreview-import schedule parser for the Pentabarf XML format as created by the Wafer conference management system.

=head1 DESCRIPTION

The Wafer conference management system has the ability to create an XML
version of its schedule that is compatible with the Pentabarf XML
format. However, it is mildly different in the way it creates it, most
significantly in the way it creates unique IDs. As such, importing such
a schedule with the L<SReview::Schedule::Penta> parser will fail to
create a stable schedule in SReview.

This parser uses the L<SReview::Schedule::Penta> parser with the minimal
required changes to make it work with the Wafer schedule parser.

{'fraction_non_alphanumeric': 0.10265486725663717, 'fraction_numerical': 0.006371681415929204, 'mean_word_length': 5.728571428571429, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 5}, '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': '3076466', 'n_tokens_mistral': 908, 'n_tokens_neox': 863, 'n_words': 311}