11
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

SFC-RGAdvent Calendar 2019

Day 20

RFCのbibtexを生成するコマンドが便利なので全てのX論生に届け

Last updated at Posted at 2019-12-21

概要

  • 小ネタ
  • インターネットな論文を書くとき,ちょくちょく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から使うようにしましょう

11
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?