From a0a3fd0be4e77e1faa57aa02992ae3b5305e7a23 Mon Sep 17 00:00:00 2001 From: "nikbel2004@outlook.com" Date: Sun, 15 Sep 2024 23:43:56 +0400 Subject: [PATCH] Laboratory_1 --- Lab 1/library.xml | 34 +++++++++++++++++++++++++++++++++ Lab 1/library.xslt | 47 ++++++++++++++++++++++++++++++++++++++++++++++ Lab 1/run.py | 14 ++++++++++++++ 3 files changed, 95 insertions(+) create mode 100644 Lab 1/library.xml create mode 100644 Lab 1/library.xslt create mode 100644 Lab 1/run.py diff --git a/Lab 1/library.xml b/Lab 1/library.xml new file mode 100644 index 0000000..ce29f60 --- /dev/null +++ b/Lab 1/library.xml @@ -0,0 +1,34 @@ + + + + + War and Peace + Leo Tolstoy + Historical + 1869 + + + The Captain's Daughter + Alexander Pushkin + Novel + 1836 + + + Crime and Punishment + Fyodor Dostoevsky + Philosophical + 1866 + + + The Three Musketeers + Alexandre Dumas + Historical novel + 1844 + + + Fifteen-year-old captain + Jules Verne + Novel + 1878 + + diff --git a/Lab 1/library.xslt b/Lab 1/library.xslt new file mode 100644 index 0000000..1ee2a08 --- /dev/null +++ b/Lab 1/library.xslt @@ -0,0 +1,47 @@ + + + + + + + Library + + + +

Library Books

+ + + + + + + + + + + + + + + + +
TitleAuthorGenreYear
+ + +
+ +
\ No newline at end of file diff --git a/Lab 1/run.py b/Lab 1/run.py new file mode 100644 index 0000000..5755c63 --- /dev/null +++ b/Lab 1/run.py @@ -0,0 +1,14 @@ +import http.server +import socketserver + +PORT = 8000 +DIRECTORY = "." + +class Handler(http.server.SimpleHTTPRequestHandler): + def __init__(self, *args, **kwargs): + super().__init__(*args, directory=DIRECTORY, **kwargs) + +# Запуск сервера на порту 8000 +with socketserver.TCPServer(("", PORT), Handler) as httpd: + print(f"Serving at http://localhost:{PORT}") + httpd.serve_forever() \ No newline at end of file