[Pkg-mpd-commits] [python-mpd] 74/91: doc/generate_command_reference.py: switch to github
Simon McVittie
smcv at debian.org
Sat Feb 24 14:55:40 UTC 2018
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch debian/master
in repository python-mpd.
commit 4ac93b569d5e60a7227e1f921294bd8d36ce1974
Author: Jörg Thalheim <joerg at thalheim.io>
Date: Tue Feb 20 00:38:35 2018 +0000
doc/generate_command_reference.py: switch to github
---
doc/generate_command_reference.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/doc/generate_command_reference.py b/doc/generate_command_reference.py
index 87aa56c..3a5cf01 100644
--- a/doc/generate_command_reference.py
+++ b/doc/generate_command_reference.py
@@ -4,6 +4,7 @@ import re
import sys
import os.path
from textwrap import TextWrapper
+import urllib.request
try:
from lxml import etree
except ImportError:
@@ -54,7 +55,8 @@ def main(url):
with open(header_file, 'r') as f:
print(f.read())
- tree = etree.parse(url)
+ r = urllib.request.urlopen(url)
+ tree = etree.parse(r)
chapter = tree.xpath('/book/chapter[@id="command_reference"]')[0]
for section in chapter.xpath("section"):
title = section.xpath("title")[0].text
@@ -109,7 +111,7 @@ def main(url):
print("\n")
if __name__ == "__main__":
- url = "http://git.musicpd.org/cgit/cirrus/mpd.git/plain/doc/protocol.xml"
+ url = "https://raw.githubusercontent.com/MusicPlayerDaemon/MPD/master/doc/protocol.xml"
if len(sys.argv) > 1:
url += "?id=release-" + sys.argv[1]
main(url)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mpd/python-mpd.git
More information about the Pkg-mpd-commits
mailing list