From 7c8af83138001ac39e225aff34612cfa28f8b10f Mon Sep 17 00:00:00 2001 From: Pablo Hoffman Date: Fri, 31 Aug 2012 18:39:30 -0300 Subject: [PATCH] added issue role to documentation --- docs/_ext/scrapydocs.py | 7 +++++++ docs/news.rst | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/_ext/scrapydocs.py b/docs/_ext/scrapydocs.py index 995db5095..1fa1c93d6 100644 --- a/docs/_ext/scrapydocs.py +++ b/docs/_ext/scrapydocs.py @@ -24,6 +24,7 @@ def setup(app): ) app.add_role('source', source_role) app.add_role('commit', commit_role) + app.add_role('issue', issue_role) app.add_role('rev', rev_role) def source_role(name, rawtext, text, lineno, inliner, options={}, content=[]): @@ -32,6 +33,12 @@ def source_role(name, rawtext, text, lineno, inliner, options={}, content=[]): node = nodes.reference(rawtext, text, refuri=ref, **options) return [node], [] +def issue_role(name, rawtext, text, lineno, inliner, options={}, content=[]): + ref = 'https://github.com/scrapy/scrapy/issues/' + text + set_classes(options) + node = nodes.reference(rawtext, 'issue ' + text, refuri=ref, **options) + return [node], [] + def commit_role(name, rawtext, text, lineno, inliner, options={}, content=[]): ref = 'https://github.com/scrapy/scrapy/commit/' + text set_classes(options) diff --git a/docs/news.rst b/docs/news.rst index c3546fe1d..1517ed276 100644 --- a/docs/news.rst +++ b/docs/news.rst @@ -6,7 +6,6 @@ Release notes Scrapy changes: -- changed LogFormatter API to support lazy formatting of scraped/dropped items. #164 (:commit:`dcef7b0`) - added :meth:`~scrapy.contrib.spidermiddleware.SpiderMiddleware.process_start_requests` method to spider middlewares - dropped Signals singleton. Signals should now be accesed through the Crawler.signals attribute. See the signals documentation for more info. - dropped Signals singleton. Signals should now be accesed through the Crawler.signals attribute. See the signals documentation for more info. @@ -30,6 +29,7 @@ Scrapy changes: - ``DOWNLOAD_TIMEOUT`` spider attribute will no longer work, use ``download_timeout`` attribute instead - removed ``ENCODING_ALIASES`` setting, as encoding auto-detection has been moved to the `w3lib`_ library - promoted :ref:`topics-djangoitem` to main contrib +- LogFormatter method now return dicts(instead of strings) to support lazy formatting (:issue:`164`, :commit:`dcef7b0`) Scrapyd changes: