Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In python 3, develop an interactive app which allows its users to preview and export top-ten lists downloaded from the web. Specific requirements and marking

In python 3, develop an interactive app which allows its users to preview and export top-ten lists downloaded from the web.

Specific requirements and marking guide

To complete this task you are required to produce an application in Python 3 similar to that

above, using the provided the_best.py template file as your starting point. In addition,

you must provide a folder containing (at least) three previously-downloaded web documents

to serve as your archive of old lists and all the GIF images needed to support your GUI. (All

of the images in the exported HTML file must be online images and must not be included in

your submission.)

Your complete solution must support at least the following features.

An intuitive Graphical User Interface. Your application must provide an attractive, easy-to-use GUI. You have a free choice of which Tkinter widgets to do the job, as long as they are effective and clear for the user. This interface must have the following features:

An image which acts as a logo to identify your application. Note that, in general, Python Tkinter implementations only support GIF images. The image file should be included in the same folder as your Python application.

Your GUI must name your application in both the Tkinter windows title and as a large heading in the displayed interface. The name may appear as part of the logo (as it does in our demonstration solution), but if the logo does not contain any text you must separately add a textual label to the GUI to give your application a name.

A widget or widgets that allow the user to select three different top-ten lists, in both old and current forms. It must be possible to easily distinguish the archived old lists from the current live ones.

A widget or widgets that allows the user to choose to preview or export any of the six (or more) lists on offer. Note that this capability could be combined with the one above, depending on which kind of GUI widgets you choose to use.

Previewing old archived top-ten lists in the GUI. Your GUI must be capable of displaying (at least) three distinct archived top-ten lists. For each list you must show

a heading in the GUI (not just the window title) identifying the list,

an image/logo that characterises the list, and

a numbered list with (at least) the top-ten items extracted from the archived web document.

The list items must be extracted from HTML/XML files previously downloaded from online and stored in your archive folder. The documents must be stored in exactly the form they were downloaded from the web server; they cannot be edited or modified in any way. Pattern matching must be used to extract the relevant elements from the documents so that the code would still work if the archived documents were replaced with others in the same format. To keep the size of the archive folder manageable only single HTML/XML source files can be stored. No image files may be stored in the archive.

Previewing live online top-ten lists in the GUI. Your GUI must be capable of displaying (at least) three distinct live top-ten lists, as currently available online at the time the program is run. For each list, you must show

a heading in the GUI (not just the window title) identifying the list,

an image/logo that characterises the list, and

a numbered list with (at least) the top-ten items extracted from the online web document.

The list data must be extracted from HTML/XML files downloaded from online when the program is run. Pattern matching must be used to extract the relevant elements from the documents so that the code still works even after the online documents are updated. The chosen source web sites must be ones that are updated on a regular basis, at least daily or weekly.

Exporting HTML documents containing (old or current) top-ten lists.

Your program must be able to generate an HTML document containing any top-ten list selected by the user, from both the archived lists and the online ones. The data exported must be written as an HTML document in the same local folder as your Python program and must be easy to identify through an appropriate choice of the file name. Each generated file must contain HTML markups that make its contents easily readable in any standard web browser, and it must be self-contained (i.e., not reliant on any other local files). When viewed in a browser, the generated document must be neat and well-presented and must contain (at least) the following features:

A heading identifying the list.

The name of the local HTML file or the URL address of the online web page from which the top-ten data was extracted. This must be sufficient to allow the original source documents to be found easily (so that the markers can compare the original web pages with your displayed lists).

The publication date for the list, extracted from the source document (not just the date when the file was downloaded because they may not be the same).

An image characterising the list, downloaded from online when the generated HTML document is viewed (i.e., not from a local file on the host computer).

A numbered list of (at least) the top-ten items. For each item (at least) the following data must be displayed:

The items position in the top ten.

The items name.

Some other distinguishing attribute of the item. The attribute may be textual or may be an image.

All of this data must be extracted via pattern matching from web documents downloaded from online. Most importantly, each of these sets of items must all belong together, e.g., you cant have the name of one item paired with an attribute of another. Each of the elements must be extracted from the original document separately.

When viewed in a browser the exported document must be neatly laid out and appear well-presented regardless of the browser windows dimensions. The textual parts extracted from the original documents must not contain any visible HTML/XML tags or entities or any other spurious characters. The images must all be links to images found online, not in local files, should be of a size compatible with the rest of the document, and their aspect ratio should be preserved (i.e., they should not be stretched in one direction).

Good Python and HTML code quality and presentation. Both your Python program code and the generated HTML code must be presented in a professional manner. In particular, each significant Python or HTML code segment must be clearly commented to say what it does, e.g., Extract the link to the photo, Show the items number, etc.

You can add other features if you wish, as long as you meet these basic requirements. You must complete the task using only basic Python 3 features and the modules already imported into the provided template. You may not use any Python modules that need to be downloaded and installed separately, such as Beautiful Soup or Pillow. Only modules that are part of a standard Python 3 installation may be used.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Records And Database Management

Authors: Jeffrey R Stewart Ed D, Judith S Greene, Judith A Hickey

4th Edition

0070614741, 9780070614741

More Books

Students also viewed these Databases questions

Question

Detailed note on the contributions of F.W.Taylor

Answered: 1 week ago