resume_generator.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:resume 作者: masasin 项目源码 文件源码
def generate_cover_letters(self, context):
        """
        Generate cover letters for all companies in the business YAML file.

        Parameters
        ----------
        context : ContextRenderer
            The renderer to use.

        """
        businesses = load_yaml(
            posixpath.join(config.YAML_DIR,
                           config.YAML_BUSINESSES + ".yaml"))

        if not businesses:
            return

        # Create cover letter directory
        os.makedirs(posixpath.join(config.OUTPUT_DIR, config.LETTERS_DIR),
                    exist_ok=True)

        self.data["pwd"] = posixpath.abspath(".").replace("\\", "/")

        for business in tqdm.tqdm(businesses, desc="Generating cover letters",
                                  unit="letter", leave=True):
            self.data["business"] = businesses[business]
            self.data["business"]["body"] = context.render_template(
                config.LETTER_FILE_NAME, self.data
            )
            self.process_resume(context, base=business)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号