Code Monkey home page Code Monkey logo

chsi-converter's Introduction

学信网档案英文版转化器 🎓📚

本工具设计用于将学信档案一键转化为可用于GitHub 学生认证的英文版文件。

感谢大家的支持!如果该项目对你有帮助的话,请不吝给予⭐️

如在使用的过程中遇到问题,请在 Issues 中提出,我们一起尽力解决!

本项目不会保留你的隐私信息!!!

如何使用 🛠️

如果无法正常使用麻烦你发起 Issue :)

  • 在线转换(推荐方式):访问网页端进行一键转换并下载即可,排版可以微调;

  • 本地转换:需要具备poppler,在终端输入pdftotext -v即可检查,不同操作系统可在google搜索下载方式,MacOS建议使用brew install poppler

  • 离线转换:GUI版本,同样需要poppler切换到"offline"分支或下载已有的Realse,本地运行即可(不建议下载Release,本人当时并未读过skywind大佬的打包秘籍,最后整出依托答辩)。

或者,你也可以通过 Docker 进行部署。

可以自主排查的问题(务必阅读) 🐛

认证流程 📋

参考知乎用户啦啦啦的回答

第一步. 个人档案 🗂️

  • 在学信网下载学籍验证报告
  • 使用本项目或有道等提供文档翻译的软件,将 pdf 报告转化为 word 文档
  • 打开翻译后的文档,调整至大小合适
  • 若使用校园网环境(没有科学上网),则需要在本项目生成的认证文件中删掉“remote study”的字样。

第二步. GitHub 个人简介 🐙

你可以参考下面的示例:(注意,这里我“@Open-BJUT”只是随便加的,并非必须有这部分,写一遍学校名字就够了。)

此外,只是保险起见才使用的实名,并非必须。

第三步. 申请认证 📱

  • 建议使用手机端进行申请,因为后面需要使用镜头拍照,电脑操作不便。 点击这里进行认证

  • 选择“我是学生”

  • 按照下图进行操作(教育邮箱一般可在学校邮箱中心申请)

第四步. 提交证明 📸

  • 使用手机拍摄电脑上打开的学信网学籍验证报告文档的照片。
  • 需要选择对应的证明类型,如果使用了学信认证报告则选择最后一项,在文本框中输入:
Ministry of Education online verification report

这里要具体情况具体分析,如果验证无法通过,请采用其它方式,这里参考了Napleon的知乎回答

一种可能的方式是在校园网环境下,需要使用“学生证”或“录取通知”进行认证,可以对拍摄的图片进行OCR识别、增强(如某全能王),拖拽到验证材料处。

接下来,就只需要静待消息了,你应该会在几分钟内收到验证结果,如果通过的话,权益一般会在2周内发放。

其它

部分代码使用了用python-docx创建浮动图片中的方法,感谢文章作者!

Star History

Star History Chart

chsi-converter's People

Contributors

esunr avatar nagi-ovo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

chsi-converter's Issues

没有识别到验证码

不知为何,使用在线版的转换之后得到的英文版报告中丢失了在线验证码。
(顺便问一下,在之前的issue中有人提到了部分内容没有翻译为英文,想问一下这样部分没翻译的报告能过申请吗?)

Offline 运行 main.py 报错 缺少 poppler

PS C:\Users\User\Downloads\CHSI-Converter> python .\main.py
Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Users\User\AppData\Roaming\Python\Python312\site-packages\pdf2image\pdf2image.py", line 568, in pdfinfo_from_path
    proc = Popen(command, env=env, stdout=PIPE, stderr=PIPE)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python312\Lib\subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Program Files\Python312\Lib\subprocess.py", line 1538, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [WinError 2] 系统找不到指定的文件。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\Python312\Lib\tkinter\__init__.py", line 1948, in __call__
    return self.func(*args)
           ^^^^^^^^^^^^^^^^
  File "C:\Users\User\Downloads\CHSI-Converter\main.py", line 116, in convert_to_docx
    cropped_image_1 = extract_image_from_pdf(path, 1, 1898, 583, 2230, 1026)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\User\Downloads\CHSI-Converter\extract_img.py", line 5, in extract_image_from_pdf
    images = convert_from_path(path, dpi=300, first_page=page_number, last_page=page_number)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\User\AppData\Roaming\Python\Python312\site-packages\pdf2image\pdf2image.py", line 127, in convert_from_path
    page_count = pdfinfo_from_path(
                 ^^^^^^^^^^^^^^^^^^
  File "C:\Users\User\AppData\Roaming\Python\Python312\site-packages\pdf2image\pdf2image.py", line 594, in pdfinfo_from_path
    raise PDFInfoNotInstalledError(
pdf2image.exceptions.PDFInfoNotInstalledError: Unable to get page count. Is poppler installed and in PATH?

需要额外安装 poppler,文档中并未提及。

转换后空白内容

使用在线网页和本地offline进行转换。中间信息区域全部为空格。
QQ截图20231123100706

转化时报错 AttributeError: module 'PyPDF2' has no attribute 'PdfReader'

完整报错如下,辛苦看下是什么问题:

AttributeError
AttributeError: module 'PyPDF2' has no attribute 'PdfReader'

Traceback (most recent call last)
File "/Users/x/.pyenv/versions/3.10.0/lib/python3.10/site-packages/flask/app.py", line 2548, in __call__
return self.wsgi_app(environ, start_response)
File "/Users/x/.pyenv/versions/3.10.0/lib/python3.10/site-packages/flask/app.py", line 2528, in wsgi_app
response = self.handle_exception(e)
File "/Users/x/.pyenv/versions/3.10.0/lib/python3.10/site-packages/flask/app.py", line 2525, in wsgi_app
response = self.full_dispatch_request()
File "/Users/x/.pyenv/versions/3.10.0/lib/python3.10/site-packages/flask/app.py", line 1822, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/Users/x/.pyenv/versions/3.10.0/lib/python3.10/site-packages/flask/app.py", line 1820, in full_dispatch_request
rv = self.dispatch_request()
File "/Users/x/.pyenv/versions/3.10.0/lib/python3.10/site-packages/flask/app.py", line 1796, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/Users/x/Desktop/CHSI-Converter/app.py", line 84, in convert_file
output_path = convert_to_docx(filepath)
File "/Users/x/Desktop/CHSI-Converter/app.py", line 23, in convert_to_docx
extracted_info = extract_info_from_pdf(path)
File "/Users/x/Desktop/CHSI-Converter/extract_info.py", line 76, in extract_info_from_pdf
text = extract_text_from_pdf(path)
File "/Users/x/Desktop/CHSI-Converter/extract_info.py", line 8, in extract_text_from_pdf
pdf_reader = PyPDF2.PdfReader(pdf_file_obj)
AttributeError: module 'PyPDF2' has no attribute 'PdfReader'
The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error.
To switch between the interactive traceback and the plaintext one, you can click on the "Traceback" headline. From the text traceback you can also create a paste of it. For code execution mouse-over the frame you want to debug and click on the console icon on the right side.

You can execute arbitrary Python code in the stack frames and there are some extra helpers available for introspection:

dump() shows all variables in the frame
dump(obj) dumps all that's known about the object

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.