Scroll to navigation

SReview::Talk(3pm) User Contributed Perl Documentation SReview::Talk(3pm)

NAME

SReview::Talk - Database abstraction for talks in the SReview database

SYNOPSIS

  use SReview::Talk;
  my $talk = SReview::Talk->new(talkid => 1);
  print $talk->nonce;
  my $nonce = $talk->nonce;
  my $talk_alt = SReview::Talk->by_nonce($nonce);
  print $talk_alt->talkid; # 1
  $talk->add_correction(length_adj => 1);
  $talk->done_correcting;

DESCRIPTION

SReview::Talk provides a (Moose-based) object-oriented interface to the data related to a talk that is stored in the SReview database. Although it is not yet used everywhere, the intention is for it to eventually replace all the direct PostgreSQL calls.

PROPERTIES

talkid

The unique ID of the talk. Required attribute at construction time (but see the "by_nonce" method, below). Is used to look up the relevant data in the database.

pathinfo

Helper property to look up information from the database. Should not be used directly.

flags

Flags set on this talk. Setter: "set_flag"; getter: "get_flag". Flags can be deleted with "delete_flag".

apology

The apology note, if any. Predicate: "has_apology".

comment

The comments that the user entered in the "other brokenness" field. Predicate: "has_comment"; clearer: "clear_comment".

first_comment

The most recent comment entered in the "other brokenness" field.

corrected_times

The start- and endtime of the talk, with corrections (if any) applied.

nonce

The talk's unique hex string, used to look it up for review.

date

The date on which the talk happened

readable_date

The date on which the talk happened, in a (somewhat) more human-readable format than the "date" property.

eventname

The name of the event of which this talk is part

event_output

The name of the event as used in output directories, if any.

progress

The current progress value of the talk, as an SReview::Talk::Progress

state

The current state of the talk, as an SReview::Talk::State

title

The title of the talk

subtitle

The subtitle of the talk

workdir

The working directory where the files for this talk should be stored

relative_name

The relative path- and file name under the output directory for this talk.

outname

The output name for this talk

finaldir

The directory in which things are stored

slug

A short, safe representation of the talk; used for filenames.

corrections

The corrections that are set on this talk.

Supports:

check whether a correction exists (by name)
Overwrite a correction with a new value
Remove a correction from the set of corrections
Get a key/value list of corrections

video_fragments

Gets a list of hashes with data on the fragments of video files that are necessary to build the talk, given the schedule and the current corrections.

Each hash contains:

The talk ID for fragments that are part of the main video; -1 for fragments that are part of the pre video; and -2 for fragments that are part of the post video.
The unique ID of the raw file
The filename of the raw file
The offset into the raw file where the interesting content begins.
The length of the entire video (should be the same for each fragment)
The length of the interesting content in this raw file

avs_video_fragments

The same values as the video_fragments attribute, but with every length extended as needed for A/V sync operations.

speakers

The names of the speakers as a single string, in the format 'Firstname Lastname, Firstname Lastname, ..., Firstname Lastname and Firstname Lastname'

speakerlist

An array of speaker names

room

The room in which the talk happened/will happen

roomid

The unique ID of the room

eventurl

The URL for the talk on the event's website. Only contains data if $eventurl_format is set in the config file; if it doesn't, returns the empty string.

output_video_urls

An array of URLs for the output videos, as they will be published. Used by final review.

preview_exten

The file extension of the preview file (.webm or .mp4)

scheduled_length

The length of the talk, as scheduled

METHODS

by_nonce

Looks up (and returns) the talk by nonce, rather than by talk ID

by_slug

Looks up (and returns) the talk by slug, rather than by talk ID

add_correction

Interpret a correction as a number, and add the passed parameter to it. The new value of the correction will be the sum of the parameter and the old correction.

done_correcting

Commit the created corrections to the database. Also commits other things, like the comment and the flags.

set_state

Override the state of the talk to a new state, ignoring the state transitions. Note, does not update the object, so this should be done just before destroying it.

state_done

Set the progress to "done" in the given state. Does nothing if the talk has since moved to another state.

reset_corrections

Clear all corrections, except the serial one. Used when a user requests that the talk be reset to default.

2024-08-16 perl v5.38.2