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.0.tar.gz
(1.3 MB
view details)
File details
Details for the file noterools-1.0.0.tar.gz.
File metadata
- Download URL: noterools-1.0.0.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 |
65235ab777e8cc69ac874b38fc4f48433178991ab6ba8ba2c5eef3b931070027
|
|
| MD5 |
6826b1d88a5886549ea835a90eea8114
|
|
| BLAKE2b-256 |
516ce863f1849f49f7b820010ad2335714d7802a3182999f46aa4f36adc03e64
|
Provenance
The following attestation bundles were made for noterools-1.0.0.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.0.tar.gz -
Subject digest:
65235ab777e8cc69ac874b38fc4f48433178991ab6ba8ba2c5eef3b931070027 - Sigstore transparency entry: 186483678
- Sigstore integration time:
-
Permalink:
Syize/noterools@4c99e6da9c92ecaf05ed56ae34c5a19cf19c2bb7 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/Syize
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-package.yaml@4c99e6da9c92ecaf05ed56ae34c5a19cf19c2bb7 -
Trigger Event:
release
-
Statement type: