Not just zotero tools.
Project description
Noterools: Not just Zotero Tools
中文文档 | English
一开始我只是想依照gwyn-hopkins的代码写一份相应的Python实现,用于为Zotero的引用添加可跳转的超链接。但是随着论文的修改,我发现需要对论文的格式做越来越多的设置,代码实现的功能也越来越多。经过大量的重构以后,noterools诞生。
这是什么?
目前noterools包含以下功能:
- 为Zotero参考文献表中的每个文献创建书签
- 为Zotero的引用设置跳转到相应文献的超链接,并设置超链接是否带下划线
- 为Zotero的引用设置字体颜色
- 将Zotero的参考文献表中,不能被正确设置为斜体的期刊名称和出版商设置为斜体
- 为正文中的交叉引用设置字体颜色和粗细
效果图
注意
- 该脚本仅能在Windows环境下运行
- 为顺序引用格式添加超链接的功能正常,但是暂时不能为期刊名称和出版商设置斜体
如何使用
- 使用pip安装noterools
pip install noterools
- 创建一个Python脚本并运行。以下是一个简单的示例
from noterools import Word, add_citation_cross_ref_hook, add_cross_ref_style_hook
if __name__ == '__main__':
word_file_path = r"E:\Documents\Word\test.docx"
new_file_path = r"E:\Documents\Word\test_new.docx"
with Word(word_file_path, save_path=new_file_path) as word:
# 为Zotero的citation添加超链接
add_citation_cross_ref_hook(word, is_numbered=False, color=16711680, no_under_line=True, set_container_title_italic=True)
# 为正文中以Figure开头的交叉引用设置字体颜色和粗体
add_cross_ref_style_hook(word, color=16711680, bold=True, key_word=["Figure"])
# 执行操作
word.perform()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
noterools-1.0.1.tar.gz
(1.3 MB
view details)
File details
Details for the file noterools-1.0.1.tar.gz.
File metadata
- Download URL: noterools-1.0.1.tar.gz
- Upload date:
- Size: 1.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a413c504d93067ac6101f0eff1566187323bd171469530d0d30452b6bf27dd0d
|
|
| MD5 |
8d1a427dd00cab169b0e40fe6240cce0
|
|
| BLAKE2b-256 |
f8cadd2975032a8eb1d907494ceec8796a0bc77f140764b47127a979e6f8655e
|
Provenance
The following attestation bundles were made for noterools-1.0.1.tar.gz:
Publisher:
python-package.yaml on Syize/noterools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
noterools-1.0.1.tar.gz -
Subject digest:
a413c504d93067ac6101f0eff1566187323bd171469530d0d30452b6bf27dd0d - Sigstore transparency entry: 188885794
- Sigstore integration time:
-
Permalink:
Syize/noterools@5b527d233ad3ab3d18f10b1a2a76a22d31523528 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/Syize
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-package.yaml@5b527d233ad3ab3d18f10b1a2a76a22d31523528 -
Trigger Event:
release
-
Statement type: