Code

Developing a web application for automatic scheduling

Developing a web application for automated scheduling

Python Basics: A free course for all levels, from beginners to experienced programmers. Create 4 impressive projects for your portfolio. Interactive communication with a teacher for effective learning. Find out what skills you can master in this course.

Learn More

Preparing a broadcast can be a complex and grueling task, so a reliable team of supporters is essential behind the scenes, alongside the hosts. Whether it's television or platforms like YouTube, Rutube, VK, and others, producers are the key figures behind the scenes. They find experts, negotiate with potential guests, propose topics for discussion, and coordinate all the details, creating a schedule for everyone involved.

Billions of neurons in the heads of stream producers are exhausted from the effort to find engaging characters, create unique episodes, reconnect with unexpectedly absent guests, and, of course, keep to schedule. Essentially, a broadcast producer is like a rocket man who has burned out his fuses. But how can programming help? Let's try to understand this issue.

What processes can be optimized through automation?

Participating in the creation of news programs and discussing this topic with colleagues from other media led me to think: are there any routine, standardized processes in the work of a producer? If so, then some of these tasks could be entrusted to a computer. This, in turn, will reduce the workload and free up time for other, more creative tasks.

Let's assume that there is a certain algorithm, which, although varying in its versions, can still be implemented. Consider what aspects a hypothetical producer of a stream dedicated to political issues might take into account.

Every day we face a choice regarding the near future - today or tomorrow. The situation changes rapidly, and sometimes it is difficult to make plans for the longer term, although in some cases it is possible.

Let's say it is morning or evening - depending on the target audience. Some people may be focused on watching a live broadcast, while others prefer to listen to it while driving. Someone may turn on the broadcast while cooking in the kitchen, some subscribers will leave it in the background while working, and others will postpone watching the recording until a more free time.

Most often, one or more participants from the permanent lineup act as hosts. However, sometimes one of them may be unavailable due to work, a business trip, vacation, or illness.

This aspect is the most exciting and creative. The main goal is to identify the most significant and contemporary topics, as well as find specialists who will harmoniously fit into the program and are willing to go on air for a short time to discuss.

However, this does not end the matter. It is necessary to pay attention to qualified specialists in order to invite them again, while less successful ones should be excluded.

Once the schedule is prepared in one of the possible formats, it must be approved by the presenters. This means that the presented text must be clear, concise, and look neat, since the presenters are busy people and do not have time to read long texts.

As a result, there are a number of variables that can change over a very short period of time. However, these are the same variables, and the data collection process can be automated to some extent. This is exactly what we intend to do.

The automation process: steps to an effective solution

Our program will be easy to use and intuitive. We will develop a local web page that will contain all the most important elements:

  • user-friendly design;
  • option to select broadcast parameters;
  • a small database of specialists with the option to add new participants;
  • automated schedule creation;
  • forwarding a completed message to a team Telegram chat dedicated to the stream.

The producer working on the broadcast will be able to go to our page, select the necessary elements and participants (if necessary, create profiles for new guests), create a schedule with minimal use of printing, and in one click send a structured plan for approval by the host. For many, this will be more than enough, but additional features can easily be added if desired.

What technologies we plan to use:

  • HTML and CSS to create an attractive design.
  • JavaScript is used to create user interfaces.
  • The IndexedDB API provides the ability to create a local database directly in the browser, and this feature is supported by modern browsers.
  • The Telegram bot API allows you to send schedules to users.

We have uploaded the completed code to pastebin.com:

  • HTML code;
  • JavaScript code.

The visual appearance of our application: what to expect

Let's assume that we are developing an application for the producers of a fictional YouTube program called Skillbox FM, which will feature real hosts and guests, based on the previously released episodes of the People and Code podcast.

Application for automating the preparation of broadcasts - general appearanceScreenshot: Skillbox Media

The application will work on the principle of a news broadcast producer: it will start by determining the date, time and presenters. The system will then match experts with scheduled broadcast times. Ultimately, the application will provide a schedule for all presenters.

Let's look at this situation from a programmer's perspective:

  • Basically, it's necessary to create a set of checkboxes that the administrator can set in the required sequence.
  • The connection time is determined by the "Broadcast Type" section and is set when selecting morning or evening.
  • To schedule experts for a specific time, click on the connection time sequentially, then select the guest's name. They will then take their assigned positions.
  • All options are focused on achieving the desired result, that is, the post text. Based on this, the "Post Preview" section should be placed in the central part.

This is how the program will react if we select arbitrary options.

Options for the morning broadcast have been selected. Screenshot: Skillbox Media
Options for the evening broadcast have been selected. Screenshot: Skillbox Media

When you click the blue button at the top of the screen, we will publish in Next post in Telegram chat.

Morning broadcast schedule - result of sending to chat Screenshot: Skillbox Media
Evening broadcast schedule - result of sending to chatScreenshot: Skillbox Media

Let's consider how to create such a program.

Implementation

The project will consist of two Files: Air Constructor.html and speakersDB.js. The first file is a web page containing HTML, CSS, and some JavaScript. The second file includes all aspects related to the specialist database and contains the JavaScript code we'll integrate into the web page. Let's take a look at how to use these tools. The interface should combine not only aesthetics but also convenience for the producer, so the design should match the media's corporate style. In this context, the primary color will be blue (code #3D3BFF).

We'll keep the layout simple:

  • A simple structure of three
    elements, designed to divide the page into three vertical sections:

,
,
.
  • At the first level, as you can see in the screenshot, there is a heading "Broadcast schedule" and a send button, made on a blue background.
  • The second level includes sections such as "Broadcast date", "Broadcast type" and "Presenters".
  • The third category includes sections "Connection time", "Publication preview" and "Speakers".
  • Since the number of CSS rules is small, we will place them directly on the page using the