From c096f63f59a07d808d04b4fc7eb526988d0b6664 Mon Sep 17 00:00:00 2001 From: arvidn Date: Mon, 1 Oct 2018 11:34:06 +0200 Subject: [PATCH] factor out the documentation header into separate rst file --- Makefile.am | 1 + docs/building.rst | 3 +-- docs/client_test.rst | 2 ++ docs/contributing.rst | 3 +-- docs/dht_extensions.rst | 4 ++-- docs/dht_rss.rst | 3 +-- docs/dht_sec.rst | 3 +-- docs/dht_store.rst | 3 +-- docs/examples.rst | 3 +-- docs/features.rst | 3 +-- docs/gen_reference_doc.py | 4 +--- docs/hacking.rst | 3 +-- docs/header.rst | 3 +++ docs/index.rst | 3 +-- docs/manual.rst | 3 +-- docs/python_binding.rst | 2 +- docs/streaming.rst | 2 ++ docs/troubleshooting.rst | 3 +-- docs/tuning.rst | 3 +-- docs/tutorial.rst | 3 +-- docs/upgrade_to_1.2.rst | 1 - docs/utp.rst | 3 +-- 22 files changed, 26 insertions(+), 35 deletions(-) create mode 100644 docs/header.rst diff --git a/Makefile.am b/Makefile.am index 806fa86bb..7b3b1dd7e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -85,6 +85,7 @@ DOCS_PAGES = \ docs/utp.rst \ docs/streaming.rst \ docs/tutorial.rst \ + docs/header.rst \ docs/tutorial.html \ docs/reference-Alerts.html \ docs/reference-Bdecoding.html \ diff --git a/docs/building.rst b/docs/building.rst index 6c3b7d96c..e197161f6 100644 --- a/docs/building.rst +++ b/docs/building.rst @@ -2,8 +2,7 @@ libtorrent manual ================= -:Author: Arvid Norberg, arvid@libtorrent.org -:Version: 1.2.0 +.. include:: header.rst .. contents:: Table of contents :depth: 2 diff --git a/docs/client_test.rst b/docs/client_test.rst index 2f3b9ebb1..2c648cd6c 100644 --- a/docs/client_test.rst +++ b/docs/client_test.rst @@ -2,6 +2,8 @@ client_test example program =========================== +.. include:: header.rst + Client test is a, more or less, complete bittorrent client. It lacks most settings and you can't start or stop torrents once you've started it. All the settings are hardcoded. The commandline arguments are:: diff --git a/docs/contributing.rst b/docs/contributing.rst index b59ddc6d0..2fd59c433 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -2,8 +2,7 @@ libtorrent manual ================= -:Author: Arvid Norberg, arvid@libtorrent.org -:Version: 1.2.0 +.. include:: header.rst .. contents:: Table of contents :depth: 2 diff --git a/docs/dht_extensions.rst b/docs/dht_extensions.rst index 1d5829d13..c5716658e 100644 --- a/docs/dht_extensions.rst +++ b/docs/dht_extensions.rst @@ -1,8 +1,8 @@ -:Author: Arvid Norberg, arvid@libtorrent.org - Mainline DHT extensions ======================= +.. include:: header.rst + libtorrent implements a few extensions to the Mainline DHT protocol. get_peers response diff --git a/docs/dht_rss.rst b/docs/dht_rss.rst index 339b0b446..4ead96f29 100644 --- a/docs/dht_rss.rst +++ b/docs/dht_rss.rst @@ -2,8 +2,7 @@ BitTorrent extension for DHT RSS feeds ====================================== -:Author: Arvid Norberg, arvid@libtorrent.org -:Version: 1.2.0 +.. include:: header.rst .. contents:: Table of contents :depth: 2 diff --git a/docs/dht_sec.rst b/docs/dht_sec.rst index 7ed42de8f..1443434cf 100644 --- a/docs/dht_sec.rst +++ b/docs/dht_sec.rst @@ -2,8 +2,7 @@ BitTorrent DHT security extension ================================= -:Author: Arvid Norberg, arvid@libtorrent.org -:Version: 1.2.0 +.. include:: header.rst .. contents:: Table of contents :depth: 2 diff --git a/docs/dht_store.rst b/docs/dht_store.rst index cfe5edf26..711cdab50 100644 --- a/docs/dht_store.rst +++ b/docs/dht_store.rst @@ -2,8 +2,7 @@ BitTorrent extension for arbitrary DHT store ============================================ -:Author: Arvid Norberg, arvid@libtorrent.org -:Version: 1.2.0 +.. include:: header.rst .. contents:: Table of contents :depth: 2 diff --git a/docs/examples.rst b/docs/examples.rst index a1bf459fd..6bba4d1d5 100644 --- a/docs/examples.rst +++ b/docs/examples.rst @@ -2,8 +2,7 @@ libtorrent Examples =================== -:Author: Arvid Norberg, arvid@libtorrent.org -:Version: 1.2.0 +.. include:: header.rst .. contents:: Table of contents :depth: 2 diff --git a/docs/features.rst b/docs/features.rst index 6f8e3fe2a..fadcd8ce3 100644 --- a/docs/features.rst +++ b/docs/features.rst @@ -2,8 +2,7 @@ libtorrent manual ================= -:Author: Arvid Norberg, arvid@libtorrent.org -:Version: 1.2.0 +.. include:: header.rst .. contents:: Table of contents :depth: 2 diff --git a/docs/gen_reference_doc.py b/docs/gen_reference_doc.py index a6f438d2d..c756f948d 100644 --- a/docs/gen_reference_doc.py +++ b/docs/gen_reference_doc.py @@ -1135,9 +1135,7 @@ for cat in categories: functions = categories[cat]['functions'] enums = categories[cat]['enums'] - out.write(''' -:Author: Arvid Norberg, arvid@libtorrent.org -:Version: 1.2.0 + out.write('''.. include:: header.rst `home`__ diff --git a/docs/hacking.rst b/docs/hacking.rst index cc76ab322..c9072e843 100644 --- a/docs/hacking.rst +++ b/docs/hacking.rst @@ -2,8 +2,7 @@ libtorrent hacking ================== -:Author: Arvid Norberg, arvid@libtorrent.org -:Version: 1.2.0 +.. include:: header.rst .. contents:: Table of contents :depth: 2 diff --git a/docs/header.rst b/docs/header.rst new file mode 100644 index 000000000..b3da2beca --- /dev/null +++ b/docs/header.rst @@ -0,0 +1,3 @@ +:Author: Arvid Norberg, arvid@libtorrent.org +:Version: 1.2.0 + diff --git a/docs/index.rst b/docs/index.rst index bfef5cc01..3b9aa41cf 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,5 +1,4 @@ -:Author: Arvid Norberg, arvid@libtorrent.org -:Version: 1.2.0 +.. include:: header.rst .. raw:: html diff --git a/docs/manual.rst b/docs/manual.rst index 4d9072cd5..f7bb233c2 100644 --- a/docs/manual.rst +++ b/docs/manual.rst @@ -2,8 +2,7 @@ libtorrent API Documentation ============================ -:Author: Arvid Norberg, arvid@libtorrent.org -:Version: 1.2.0 +.. include:: header.rst .. contents:: Table of contents :depth: 1 diff --git a/docs/python_binding.rst b/docs/python_binding.rst index 6940b2bf8..5861055fa 100644 --- a/docs/python_binding.rst +++ b/docs/python_binding.rst @@ -2,7 +2,7 @@ libtorrent python binding ========================= -:Author: Arvid Norberg, arvid@libtorrent.org +.. include:: header.rst .. contents:: Table of contents :depth: 2 diff --git a/docs/streaming.rst b/docs/streaming.rst index 2222507d3..5e7e21eea 100644 --- a/docs/streaming.rst +++ b/docs/streaming.rst @@ -1,6 +1,8 @@ Streaming implementation ======================== +.. include:: header.rst + This documents describes the algorithm libtorrent uses to satisfy time critical piece requests, i.e. streaming. diff --git a/docs/troubleshooting.rst b/docs/troubleshooting.rst index f8d2bdc5f..454dfeda0 100644 --- a/docs/troubleshooting.rst +++ b/docs/troubleshooting.rst @@ -2,8 +2,7 @@ libtorrent manual ================= -:Author: Arvid Norberg, arvid@libtorrent.org -:Version: 1.2.0 +.. include:: header.rst .. contents:: Table of contents :depth: 2 diff --git a/docs/tuning.rst b/docs/tuning.rst index bc15be3f2..9d7ee622e 100644 --- a/docs/tuning.rst +++ b/docs/tuning.rst @@ -2,8 +2,7 @@ libtorrent manual ================= -:Author: Arvid Norberg, arvid@libtorrent.org -:Version: 1.2.0 +.. include:: header.rst .. contents:: Table of contents :depth: 2 diff --git a/docs/tutorial.rst b/docs/tutorial.rst index b521eb625..3b6275f71 100644 --- a/docs/tutorial.rst +++ b/docs/tutorial.rst @@ -2,8 +2,7 @@ libtorrent manual ================= -:Author: Arvid Norberg, arvid@libtorrent.org -:Version: 1.2.0 +.. include:: header.rst .. contents:: Table of contents :depth: 2 diff --git a/docs/upgrade_to_1.2.rst b/docs/upgrade_to_1.2.rst index 1c3c69bac..8f40413fd 100644 --- a/docs/upgrade_to_1.2.rst +++ b/docs/upgrade_to_1.2.rst @@ -3,7 +3,6 @@ Upgrading to libtorrent 1.2 =========================== :Author: Arvid Norberg, arvid@libtorrent.org -:Version: 1.2.0 .. contents:: Table of contents :depth: 1 diff --git a/docs/utp.rst b/docs/utp.rst index d4984aa97..8b1e285b6 100644 --- a/docs/utp.rst +++ b/docs/utp.rst @@ -2,8 +2,7 @@ libtorrent manual ================= -:Author: Arvid Norberg, arvid@libtorrent.org -:Version: 1.2.0 +.. include:: header.rst .. contents:: Table of contents :depth: 2