diff --git a/app.py b/app.py index e46e95e..4deefe9 100644 --- a/app.py +++ b/app.py @@ -3,6 +3,7 @@ from fastapi.middleware.cors import CORSMiddleware from fastapi.responses import HTMLResponse from fastapi.staticfiles import StaticFiles from fastapi.templating import Jinja2Templates +import os def get_application(): _app = FastAPI(debug=False,title="MyHome",docs_url=None,redoc_url=None) @@ -21,15 +22,19 @@ app=get_application() app.mount("/static",StaticFiles(directory="static"),name="static") templates = Jinja2Templates(directory="templates")\ -## TODO Сделать полноценный микроблок +## TODO Сделать полноценный микроблог @app.get("/") def index(request:Request): return templates.TemplateResponse("index.html",{"request":request}) -@app.get("/resume") +## TODO Сделать вывод через вебсокет +@app.get("/cv") def resume(request:Request): with open("cv.py") as cv: - return templates.TemplateResponse("resume.html",{"request":request,"cv":cv.read()}) + code_result=os.popen("python3 cv.py").read() + return templates.TemplateResponse("cv.html",{"request":request, + "cv":cv.read(), + "code_result":code_result}) @app.get("/pycoral") def index(request:Request): diff --git a/cv.py b/cv.py index 73d2df3..347ef08 100644 --- a/cv.py +++ b/cv.py @@ -1,4 +1,3 @@ - """ Шуточное кодовое представление моего резюме. Enjoy! """ diff --git a/employee/__init__.py b/employee/__init__.py index fa7fce3..e42995b 100644 --- a/employee/__init__.py +++ b/employee/__init__.py @@ -20,7 +20,8 @@ class Employee(AbstractHuman): @property def summary(self): - return "\n".join(self.expirience) + return "\n".join(reversed(self.expirience)) + def represent(self) -> None: self.say(self.about()) self.say(self.summary) if self.summary else self.say("Немного занят, отвечу позднее.") diff --git a/employee/__pycache__/__init__.cpython-310.pyc b/employee/__pycache__/__init__.cpython-310.pyc index b20794c..b3870b0 100644 Binary files a/employee/__pycache__/__init__.cpython-310.pyc and b/employee/__pycache__/__init__.cpython-310.pyc differ diff --git a/static/favicon.png b/static/favicon.png new file mode 100644 index 0000000..0dcfffc Binary files /dev/null and b/static/favicon.png differ diff --git a/templates/cv.html b/templates/cv.html new file mode 100644 index 0000000..efff0b9 --- /dev/null +++ b/templates/cv.html @@ -0,0 +1,45 @@ + +
+
+
+
+ |
+
+
+
+ |
+
-
- def show_my_projects():
- return [project for project in projects if project.sense is not None]
-
-
- `>>> class project Resume``
- `>>> class project PYCORAL_CCTV`
-
+
+
+
+
+ |
+
+
+
+ Игорь Ельпин(говорит): + Игорь Ельпин. Мужчина 1989-11-16 (33 полных лет) + +
+
+ Игорь Ельпин(говорит): +
+
+ Hard Skill: Linux = 85% + +
+
+ Hard Skill: Docker = 55% + +
+
+ Hard Skill: Python = 35% + + |
+
+
+
+ | + `>>> class project Resume`` + `>>> class project PYCORAL_CCTV` + | +
diff --git a/templates/resume.html b/templates/resume.html
deleted file mode 100644
index d15ddf9..0000000
--- a/templates/resume.html
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
- Логово Игоря
-
-
-
-
-
-
-
- Wake up,HR... Follow the white rabbit...
-
-
-
-
- {{cv}}
-
-
-
-
-
\ No newline at end of file