翼度科技»论坛 编程开发 python 查看内容

告别Word,用Python打造你的专业简历!

3

主题

3

帖子

9

积分

新手上路

Rank: 1

积分
9
今天给大家介绍下一个在纯 python 中构建简历的实用工具,工具的连接地址https://github.com/koek67/resume-builder/blob/main/readme.md
用法介绍

要求

Python 3.7 或更高版本(仅此而已!)
安装

整个库是一个单独的 python 文件 resume_builder.py。下载此文件
用法

要生成简历,只需要执行:python resume.py--out resume.html如果想要转换为 PDF,请在 web 浏览器中打开上一步输出的 html 文件,打印为 PDF。生成的简历已针对 PDF 进行了优化。在浏览器中,您可以放大/缩小 PDF,使其更好地适应页面。
简历定义

简历是在resume.py这个 Python 文件中定义的。这些文件提供了如何配置简历的最佳示例。有关更多详细信息,请参阅resume_builder.py和reference.md。
简历结构


  • 简历包括:

    • 联系人信息
    • 一些章节列表(如工作经历、教育经历)

  • 联系人信息包括:

    • name(你的名字)
    • 详细信息(一些字符串列表,比如电子邮件、地址等)

  • 每个章节包括:

    • 标题(如教育经历)
    • 一些章节内容的列表(如教育经历的详细)

  • 章节内容包括:

    • 标题(粗体大文本)
    • 标题(括号中的文字)
    • 日期:字符串类型描述日期
    • 详细描述:

原始示例

简历定义
  1. # Koushik Krishnan's Resume
  2. from resume_builder import Resume, Section, SectionEntry, ContactInfo, ConcatText, ItalicsText, UnderlinedText, LinkText, BulletedList
  3. resume = Resume(
  4.     contact_info=ContactInfo(
  5.         name="Koushik Krishnan",
  6.         details=[
  7.             "(111) 111-1111",
  8.             "my@email.com",
  9.             LinkText("koushik.bearblog.dev", "https://koushik.bearblog.dev"),
  10.             LinkText(
  11.                 "linkedin.com/in/koushikkrishnan",
  12.                 "https://www.linkedin.com/in/koushikkrishnan/",
  13.             ),
  14.             LinkText("github.com/koek67", "https://www.github.com/koek67"),
  15.         ],
  16.         tag_line="Making software as reliable as the sunrise.",
  17.     ),
  18.     sections = [
  19.         Section(
  20.             title="Experience",
  21.             entries=[
  22.                 SectionEntry(
  23.                     title=LinkText("Microsoft", "https://www.microsoft.com"),
  24.                     caption="Senior Software Engineer",
  25.                     location="Remote",
  26.                     dates="February 2023 - present",
  27.                     description=BulletedList(
  28.                         [
  29.                             "Building reliability improvements into the storage and replication layers of Cosmos DB.",
  30.                             "Technical lead for a team of engineers, ramping them up on distributed systems and database concepts as well as preparing them for incident response.",
  31.                         ]
  32.                     ),
  33.                 ),
  34.                 SectionEntry(
  35.                     title=LinkText("Yugabyte", "https://www.yugabyte.com"),
  36.                     caption="Senior Site Reliability Engineer",
  37.                     location="Seattle, Washington",
  38.                     dates="May 2022 - February 2023",
  39.                     description=BulletedList(
  40.                         [
  41.                             "Managed reliable operation of Kubernetes and Yugabyte database clusters across AWS and GCP for the Yugabyte Managed product."
  42.                         ]
  43.                     ),
  44.                 ),
  45.                 SectionEntry(
  46.                     title=LinkText("Microsoft", "https://www.microsoft.com"),
  47.                     caption="Software Engineer 2, Azure Cosmos DB",
  48.                     location="Redmond, Washington",
  49.                     dates="August 2018 - April 2022",
  50.                     description=BulletedList(
  51.                         [
  52.                             "Worked as a technical lead for a petabyte-scale, globally distributed database. Reduced number of production incidents by 80%.",
  53.                             'Founded a team that built a Python microservice that would perform real-time root cause analysis/mitigation of incidents and eliminate the need for an on-call engineer. Open sourced this work on Github as <a  target="_blank" href="http://github.com/microsoft/jupyrest">Jupyrest</a>',
  54.                         ]
  55.                     ),
  56.                 ),
  57.                 SectionEntry(
  58.                     title=LinkText("Microsoft", "https://www.microsoft.com"),
  59.                     caption="Software Engineering Intern, Azure Cosmos DB",
  60.                     location="Seattle, Washington",
  61.                     dates="May 2017 - August 2017",
  62.                 ),
  63.                 SectionEntry(
  64.                     title=LinkText("Fitbit", "https://fitbit.com"),
  65.                     caption="Software Engineering Intern",
  66.                     location="Boston, Massachusetts",
  67.                     dates="May 2016 - August 2016",
  68.                 ),
  69.                 SectionEntry(
  70.                     title=LinkText("Kayak.com", "https://www.kayak.com"),
  71.                     caption="Software Engineering Intern",
  72.                     location="Concord, Massachusetts",
  73.                     dates="May 2015 - August 2015",
  74.                 )
  75.             ],
  76.         ),
  77.         Section(
  78.             title="Presentations",
  79.             entries=[
  80.                 SectionEntry(
  81.                     title=LinkText(
  82.                         text="PyCon 2024",
  83.                         url="https://us.pycon.org/2024/schedule/presentation/95/",
  84.                         show_icon=True,
  85.                     ),
  86.                     caption="Rest East with Jupyrest: Deploy notebooks as web services",
  87.                     location="Pittsburgh, PA",
  88.                     dates="May 2024",
  89.                 ),
  90.                 SectionEntry(
  91.                     title=LinkText(
  92.                         text="PyTexas",
  93.                         url="https://www.pytexas.org/2024/schedule/talks/#rest-easy-with-jupyrest-deploy-notebooks-as-web-services",
  94.                         show_icon=True,
  95.                     ),
  96.                     caption="Rest East with Jupyrest",
  97.                     location="Austin, TX",
  98.                     dates="April 2024",
  99.                 ),
  100.                 SectionEntry(
  101.                     title=LinkText(
  102.                         text="PyCascades",
  103.                         url="https://2024.pycascades.com/program/talks/jupyrest/",
  104.                         show_icon=True,
  105.                     ),
  106.                     caption="Rest East with Jupyrest: Deploy notebooks as web services",
  107.                     location="Seattle, WA",
  108.                     dates="April 2024",
  109.                 ),
  110.                 SectionEntry(
  111.                     title=LinkText(
  112.                         text="PyOhio 2023",
  113.                         url="https://www.pyohio.org/2023/speakers/koushik-krishnan/",
  114.                         show_icon=True,
  115.                     ),
  116.                     caption=LinkText('Serverless Jupyter Notebook Functions (YouTube)', url="https://youtu.be/hoGJ0c3jIeo?si=srbRtjSxOxETFWN5", show_icon=True),
  117.                     location="Virtual",
  118.                     dates="December 2023",
  119.                 ),
  120.                 SectionEntry(
  121.                     title=LinkText(
  122.                         text="PyData Seattle 2023",
  123.                         url="https://seattle2023.pydata.org/cfp/talk/K8KV8M/",
  124.                         show_icon=True,
  125.                     ),
  126.                     caption=LinkText('Notebooks as Serverless Functions (YouTube)', url="https://youtu.be/hoGJ0c3jIeo?si=srbRtjSxOxETFWN5", show_icon=True),
  127.                     location="Seattle, WA",
  128.                     dates="April 2023",
  129.                 ),
  130.             ],
  131.         ),
  132.         Section(
  133.             title="Volunteering",
  134.             entries=[
  135.                 SectionEntry(
  136.                     title=LinkText(
  137.                         "ASHA Chennai", url="https://chennai.ashanet.org/", show_icon=True
  138.                     ),
  139.                     caption="Spoken English Teacher",
  140.                     location="Remote",
  141.                     dates="December 2020 - March 2022",
  142.                     description=BulletedList(
  143.                         [
  144.                             "Created a curriculum with story-telling, skits, and friendly debates to provide disadvantaged children isolated in quarantine a fun way to learn spoken English.",
  145.                         ]
  146.                     ),
  147.                 )
  148.             ],
  149.         ),
  150.         Section(
  151.             title="Education",
  152.             entries=[
  153.                 SectionEntry(
  154.                     title="Georgia Institute of Technology",
  155.                     location="Atlanta, Georgia",
  156.                     dates="August 2014 - May 2018",
  157.                     description=ItalicsText(
  158.                         "Bachelors of Science in Computer Science and Mathematics"
  159.                     ),
  160.                 )
  161.             ],
  162.         ),
  163.         Section(
  164.             title="Skills",
  165.             entries=[
  166.                 SectionEntry(
  167.                     description=BulletedList(
  168.                         [
  169.                             ConcatText(
  170.                                 UnderlinedText("Languages:"),
  171.                                 " Python, Golang, C/C++, JavaScript, C#, Powershell, Zig",
  172.                             ),
  173.                             ConcatText(
  174.                                 UnderlinedText("Tools:"),
  175.                                 " Kubernetes, PostgreSQL, Linux, Windows, Azure Service Fabric, Distributed Databases, Storage Engines, Docker",
  176.                             ),
  177.                         ]
  178.                     )
  179.                 ),
  180.             ],
  181.         ),
  182.     ]
  183. )
  184. if __name__ == "__main__":
  185.     resume.cli_main()
复制代码
结果预览

 
中文简历定义

针对国人的情况,给出了一个中文模板
简历定义
  1. # 十月狐狸的简历
  2. from resume_builder import Resume, Section, SectionEntry, ContactInfo, ConcatText, ItalicsText, UnderlinedText, LinkText, BulletedList
  3. resume = Resume(
  4.     contact_info=ContactInfo(
  5.         name="十月狐狸",
  6.         details=[
  7.             "134 1234 4321",
  8.             "13412344321@qq.com",
  9.             LinkText("博客园", "https://www.cnblogs.com/sesshoumaru/"),
  10.             LinkText("github", "https://github.com/Sesshoumaru"),
  11.         ],
  12.         tag_line="总要有所坚持...",
  13.     ),
  14.     sections = [
  15.         Section(
  16.             title="工作经历",
  17.             entries=[
  18.                 SectionEntry(
  19.                     title=LinkText("微软中国", "https://www.microsoft.com"),
  20.                     caption="高级开发工程师",
  21.                     location="上海",
  22.                     dates="2023年1月 - 至今",
  23.                     description=BulletedList(
  24.                         [
  25.                             "负责xx系统的数据库的增删改代码的实现",
  26.                             "作为一个工程师团队的技术负责人,带领团队做了很多不怎么牛逼的事情",
  27.                         ]
  28.                     ),
  29.                 ),
  30.                 SectionEntry(
  31.                     title=LinkText("腾讯", "https://www.qq.com"),
  32.                     caption="高级开发工程师",
  33.                     location="深圳",
  34.                     dates="2022年5月 - 2023年1月",
  35.                     description=BulletedList(
  36.                         [
  37.                             "负责xx系统的后台实现,解决了上百规模下的并发场景优化"
  38.                         ]
  39.                     ),
  40.                 ),
  41.                 SectionEntry(
  42.                     title=LinkText("淘宝", "https://www.taobao.com"),
  43.                     caption="中级开发工程师",
  44.                     location="广州",
  45.                     dates="2020年8月 - 2022年5月",
  46.                     description=BulletedList(
  47.                         [
  48.                             "负责手淘千人千面后台推荐算法的实现",
  49.                         ]
  50.                     ),
  51.                 ),
  52.                 SectionEntry(
  53.                     title=LinkText("小米", "https://www.xiaomi.com"),
  54.                     caption="初级开发工程师",
  55.                     location="北京",
  56.                     dates="2018年7月 - 2020年7月",
  57.                     description=BulletedList(
  58.                         [
  59.                             "负责小米商城商品展示系统的开发和设计",
  60.                         ]
  61.                     )
  62.                 )
  63.             ],
  64.         ),
  65.         Section(
  66.             title="获得荣誉",
  67.             entries=[
  68.                 SectionEntry(
  69.                     title=LinkText(
  70.                         "计算机二级证书", url="https://chennai.ashanet.org/", show_icon=True
  71.                     ),
  72.                     caption="计算机二级证书",
  73.                     location="北京",
  74.                     dates="2015年11月",
  75.                     description=BulletedList(
  76.                         [
  77.                             " 全国计算机等级考试(National Computer Rank Examination,简称NCRE),是经原国家教育委员会(现教育部)批准,由教育部教育考试院(原教育部考试中心)主办,面向社会,用于考查应试人员计算机应用知识与技能的全国性计算机水平考试体系",
  78.                         ]
  79.                     ),
  80.                 )
  81.             ],
  82.         ),
  83.         Section(
  84.             title="教育经历",
  85.             entries=[
  86.                 SectionEntry(
  87.                     title="清花大学",
  88.                     location="北京",
  89.                     dates="2014年9月 - 2018年6月",
  90.                     description=ItalicsText(
  91.                         "电子信息工程"
  92.                     ),
  93.                 )
  94.             ],
  95.         ),
  96.         Section(
  97.             title="掌握技能",
  98.             entries=[
  99.                 SectionEntry(
  100.                     description=BulletedList(
  101.                         [
  102.                             ConcatText(
  103.                                 UnderlinedText("语言:"),
  104.                                 " Python, Golang, C/C++, JavaScript, C#, Powershell, Zig",
  105.                             ),
  106.                             ConcatText(
  107.                                 UnderlinedText("工具:"),
  108.                                 " Kubernetes, PostgreSQL, Linux, Windows, Azure Service Fabric, Distributed Databases, Storage Engines, Docker",
  109.                             ),
  110.                         ]
  111.                     )
  112.                 ),
  113.             ],
  114.         ),
  115.     ]
  116. )
  117. if __name__ == "__main__":
  118.     resume.cli_main()
复制代码
结果预览

中文乱码解决

原版生成的html文件,中文出现乱码,只需要修改resume_builder.py文件中的save方法,增加encoding = "utf-8"即可实现中文支持:
  1.     def save(self, filename: str) -> None:
  2.         with open(filename, "w",encoding = "utf-8") as f:
  3.             f.write(self.render())
复制代码
作者:〖十月狐狸〗
出处:http://www.cnblogs.com/sesshoumaru/
欢迎任何形式的转载,但请务必注明出处。
本人水平有限,如果文章和代码有表述不当之处,还请不吝赐教。

来源:https://www.cnblogs.com/sesshoumaru/p/18238377/python-resume
免责声明:由于采集信息均来自互联网,如果侵犯了您的权益,请联系我们【E-Mail:cb@itdo.tech】 我们会及时删除侵权内容,谢谢合作!

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x

举报 回复 使用道具