使用python的pyQT5, pyPDF2批量重命名论文的小工具

使用pyQT5, pyPDF2批量重命名论文的小工具

用于处理计算机类的英文文献,默认pdf info中title为空的文献来自于arxiv(arxiv上的文献,属性中只有一个时间戳,因此需要从文档内容中提取论文名,作者)
选择一个路径,之后
批量重命名该路径下的论文格式为:

论文名称[作者][会议/期刊名/arxiv编号]

paper-renamer-qt5.py

#!/usr/bin/python3
# -*- coding: utf-8 -*-

import sys
from PyQt5.QtWidgets import QWidget, QGridLayout, QPushButton, QApplication, QLabel,  QHBoxLayout, QVBoxLayout, QFileDialog, QMessageBox
from PyQt5.QtGui import QIcon

import os
from shutil import copy2
from PyPDF2 import PdfFileReader, PdfFileWriter

import re

class Pdf_Renamer(QWidget):

    def __init__(self):
        super().__init__()
        self.dir = ""
        self.initUI()

    def initUI(self):               
        openButton = QPushButton("打开文件夹")
        openButton.clicked.connect(self.openFolder)
        
        self.pathLabel = QLabel("未选择文件夹", self)

        startButton = QPushButton("开始批量重命名")
        startButton.clicked.connect(self.renamer)

        line1 = QHBoxLayout()
        line1.addWidget(openButton)

        line2 = QHBoxLayout(
  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值