概要
- 小ネタ
- インターネットな論文を書くとき,ちょくちょくRFCを引用する.
- IETF Draft(RFC)のbibtexをささっと生成するコマンドがあるから紹介したい
本題: rfcbibtex
PyPi: https://pypi.org/project/rfcbibtex/
Github: https://github.com/iluxonchik/rfc-bibtex/
使用例
こんな感じで使える.簡単.
~/
$ rfcbibtex RFC8215
@misc{RFC8215,
series = {Request for Comments},
number = 8215,
howpublished = {RFC 8215},
publisher = {RFC Editor},
doi = {10.17487/RFC8215},
url = {https://rfc-editor.org/rfc/rfc8215.txt},
author = {Tore Anderson},
title = {{Local-Use IPv4/IPv6 Translation Prefix}},
pagetotal = 7,
year = 2017,
month = aug,
abstract = {This document reserves the IPv6 prefix 64:ff9b:1::/48 for local use within domains that enable IPv4/IPv6 translation mechanisms.},
}
生成したいRFCを複数書いたテキストファイルも参照できる
rfc.txt
RFC2765
RFC6145
RFC7915
~/
$ rfcbibtex -f rfc.txt
@misc{RFC2765,
series = {Request for Comments},
number = 2765,
howpublished = {RFC 2765},
publisher = {RFC Editor},
doi = {10.17487/RFC2765},
url = {https://rfc-editor.org/rfc/rfc2765.txt},
author = {Erik Nordmark},
title = {{Stateless IP/ICMP Translation Algorithm (SIIT)}},
pagetotal = 26,
year = 2000,
month = feb,
abstract = {This document specifies a transition mechanism algorithm in addition to the mechanisms already specified. {[}STANDARDS-TRACK{]}},
}
@misc{RFC6145,
series = {Request for Comments},
number = 6145,
howpublished = {RFC 6145},
publisher = {RFC Editor},
doi = {10.17487/RFC6145},
url = {https://rfc-editor.org/rfc/rfc6145.txt},
author = {Xing Li and Fred Baker and Congxiao Bao},
title = {{IP/ICMP Translation Algorithm}},
pagetotal = 33,
year = 2011,
month = apr,
abstract = {This document describes the Stateless IP/ICMP Translation Algorithm (SIIT), which translates between IPv4 and IPv6 packet headers (including ICMP headers). This document obsoletes RFC 2765. {[}STANDARDS-TRACK{]}},
}
@misc{RFC7915,
series = {Request for Comments},
number = 7915,
howpublished = {RFC 7915},
publisher = {RFC Editor},
doi = {10.17487/RFC7915},
url = {https://rfc-editor.org/rfc/rfc7915.txt},
author = {Congxiao Bao and Xing Li and Fred Baker and Tore Anderson and Fernando Gont},
title = {{IP/ICMP Translation Algorithm}},
pagetotal = 34,
year = 2016,
month = jun,
abstract = {This document describes the Stateless IP/ICMP Translation Algorithm (SIIT), which translates between IPv4 and IPv6 packet headers (including ICMP headers). This document obsoletes RFC 6145.},
}
installation
Python 3.x
が必要だそうです.
pip install rfcbibtex
# pip3 install rfcbibtex
追記
最近(2024年頃)のMacでは,パッケージををするのに「venvを使え!!!」って怒ってくるようになりました.
この1コマンドごときのためにvenvを使うのは癪なので,Dockerから使うようにしましょう