From a99a11d90e0646dadd4d18ed432e227df62978c3 Mon Sep 17 00:00:00 2001
From: Luc Saffre
Date: Mon, 1 Aug 2016 23:50:33 +0300
Subject: [PATCH 01/86] new config value 'feed_field_name'
---
.gitignore | 9 +++++++++
README.rst | 20 ++++++++++++++------
sphinxfeed.py | 35 ++++++++++++++++++-----------------
3 files changed, 41 insertions(+), 23 deletions(-)
create mode 100644 .gitignore
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..485a30b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,9 @@
+# use glob syntax.
+syntax: glob
+
+*.pyc
+*~
+*.egg-info
+.build
+.coverage
+.eggs
diff --git a/README.rst b/README.rst
index c835a8f..45908c4 100644
--- a/README.rst
+++ b/README.rst
@@ -1,11 +1,14 @@
sphinxfeed
==========
-This Sphinx extension is derived from Dan Mackinlay's `sphinxcontrib.feed
- `_ package.
+This Sphinx extension is derived from Dan Mackinlay's
+`sphinxcontrib.feed
+ `_
+package.
-It relies on the `feedformatter `_
-package instead of Django utils to generate the feed.
+It relies on the `feedformatter
+ `_ package instead of Django
+utils to generate the feed.
Usage
-----
@@ -17,9 +20,14 @@ Usage
extensions = [..., 'sphinxfeed']
-#. Customise the necessary configuration options to correctly generate the
- feed::
+#. Customise the necessary configuration options to correctly generate
+ the feed::
feed_base_url = 'http://YOUR_HOST_URL'
feed_author = 'YOUR NAME'
+
+ # optional options
+ feed_description = "A longer description"
+ feed_field_name = 'date' # default value is "Publish Date"
+
diff --git a/sphinxfeed.py b/sphinxfeed.py
index 2e8d202..271c595 100644
--- a/sphinxfeed.py
+++ b/sphinxfeed.py
@@ -3,6 +3,15 @@
import unittest
+import time
+def parse_pubdate(pubdate):
+ try:
+ date = time.strptime(pubdate, '%Y-%m-%d %H:%M')
+ except ValueError:
+ date = time.strptime(pubdate, '%Y-%m-%d')
+ return date
+
+
def setup(app):
""" see: http://sphinx.pocoo.org/ext/appapi.html
this is the primary extension point for Sphinx
@@ -12,6 +21,7 @@ def setup(app):
app.add_config_value('feed_base_url', '', '')
app.add_config_value('feed_description', '', '')
app.add_config_value('feed_author', '', '')
+ app.add_config_value('feed_field_name', 'Publish Date', '')
app.add_config_value('feed_filename', 'rss.xml', 'html')
app.connect('html-page-context', create_feed_item)
@@ -40,30 +50,21 @@ def create_feed_container(app):
def create_feed_item(app, pagename, templatename, ctx, doctree):
""" Here we have access to nice HTML fragments to use in, say, an RSS feed.
"""
- import time
- def parse_pubdate(pubdate):
- try:
- date = time.strptime(pubdate, '%Y-%m-%d %H:%M')
- except ValueError:
- date = time.strptime(pubdate, '%Y-%m-%d')
- return date
env = app.builder.env
metadata = app.builder.env.metadata.get(pagename, {})
-
- if 'Publish Date' not in metadata:
- """ Don't index dateless articles.
- Use the metadata syntax in order to specify the publish data::
-
- :Publish Date: 2010-01-01
- """
- return
-
+
+ pubDate = metadata.get(app.config.feed_field_name, None)
+ if not pubDate:
+ return
+
+ pubDate = parse_pubdate(pubDate)
+
item = {
'title': ctx.get('title'),
'link': app.config.feed_base_url + '/' + ctx['current_page_name'] + ctx['file_suffix'],
'description': ctx.get('body'),
- 'pubDate': parse_pubdate(metadata['Publish Date'])
+ 'pubDate': pubDate
}
if 'author' in metadata:
item['author'] = metadata['author']
From 2c618e1ca8ae22f715b9d8e05735765eee7e35ec Mon Sep 17 00:00:00 2001
From: Luc Saffre
Date: Mon, 5 Feb 2018 03:25:30 +0200
Subject: [PATCH 02/86] avoid problem when bibtex extension is also installed
---
sphinxfeed.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/sphinxfeed.py b/sphinxfeed.py
index 271c595..906a290 100644
--- a/sphinxfeed.py
+++ b/sphinxfeed.py
@@ -86,6 +86,11 @@ def emit_feed(app, exc):
app.config.feed_filename)
feed.format_rss2_file(path)
+ return
+ # 20180204 The following code (pickle the environment and check
+ # consistency at this point) caused an error when also bibtex was
+ # installed. I deactivated it since I don't know why it's needed.
+
from os import path
from sphinx.application import ENV_PICKLE_FILENAME
from sphinx.util.console import bold
From b76b7538536a0d495a457b2eb61ceb26a003375e Mon Sep 17 00:00:00 2001
From: Luc Saffre
Date: Sun, 2 Sep 2018 07:54:59 +0300
Subject: [PATCH 03/86] http://luc.lino-framework.org/blog/2018/0902.html
---
sphinxfeed.py | 9 +++++++--
tasks.py | 8 ++++++++
2 files changed, 15 insertions(+), 2 deletions(-)
create mode 100644 tasks.py
diff --git a/sphinxfeed.py b/sphinxfeed.py
index 906a290..4ae9120 100644
--- a/sphinxfeed.py
+++ b/sphinxfeed.py
@@ -4,11 +4,13 @@
import unittest
import time
+
def parse_pubdate(pubdate):
+ fmt = '%Y-%m-%d %H:%M'
try:
- date = time.strptime(pubdate, '%Y-%m-%d %H:%M')
+ date = time.strptime(pubdate, fmt)
except ValueError:
- date = time.strptime(pubdate, '%Y-%m-%d')
+ date = time.strptime(pubdate + " 23:59", fmt)
return date
@@ -60,6 +62,9 @@ def create_feed_item(app, pagename, templatename, ctx, doctree):
pubDate = parse_pubdate(pubDate)
+ if pubDate > time.gmtime():
+ return
+
item = {
'title': ctx.get('title'),
'link': app.config.feed_base_url + '/' + ctx['current_page_name'] + ctx['file_suffix'],
diff --git a/tasks.py b/tasks.py
new file mode 100644
index 0000000..37ea918
--- /dev/null
+++ b/tasks.py
@@ -0,0 +1,8 @@
+from atelier.invlib import setup_from_tasks
+ns = setup_from_tasks(
+ globals(), "sphinxfeed",
+ blogref_url="http://luc.lino-framework.org",
+ revision_control_system='git',
+ # tolerate_sphinx_warnings=True,
+ cleanable_files=[])
+
From b0d97dc4d37946e421290500fe373d2e692da079 Mon Sep 17 00:00:00 2001
From: Luc Saffre
Date: Sun, 2 Sep 2018 08:57:32 +0300
Subject: [PATCH 04/86] http://luc.lino-framework.org/blog/2018/0902.html
---
README.rst | 20 ++++++++++++++------
setup.py | 45 ++++++++++++++++++++++++++++++++++++++++++---
sphinxfeed.py | 2 ++
3 files changed, 58 insertions(+), 9 deletions(-)
diff --git a/README.rst b/README.rst
index 45908c4..8c1b395 100644
--- a/README.rst
+++ b/README.rst
@@ -1,15 +1,23 @@
-sphinxfeed
-==========
+==========================
+The ``sphinxfeed`` package
+==========================
-This Sphinx extension is derived from Dan Mackinlay's
+
+
+ This Sphinx extension is a fork of Fergus Doye's sphinxfeed
+package which itself is derived from Dan Mackinlay's
`sphinxcontrib.feed
`_
-package.
-
-It relies on the `feedformatter
+package. It relies on the `feedformatter
`_ package instead of Django
utils to generate the feed.
+Features added by Luc:
+
+- new config variable feed_field_name to change the name of the field
+ to use for specifying the publication date.
+- don't publish items whose publication datetime is in the future.
+
Usage
-----
diff --git a/setup.py b/setup.py
index b63b2d5..3fff2c3 100644
--- a/setup.py
+++ b/setup.py
@@ -1,13 +1,48 @@
from distutils.core import setup
-long_desc = open('README.rst').read()
-
requires = [
'Sphinx>=0.6',
'feedformatter',
]
-setup(
+# long_desc = open('README.rst').read()
+long_desc = """ This Sphinx extension is a fork of Fergus Doye's sphinxfeed
+package which itself is derived from Dan Mackinlay's
+`sphinxcontrib.feed
+ `_
+package. It relies on the `feedformatter
+ `_ package instead of Django
+utils to generate the feed.
+
+Features added by Luc:
+
+- new config variable feed_field_name to change the name of the field
+ to use for specifying the publication date.
+- don't publish items whose publication datetime is in the future.
+
+Usage
+-----
+
+#. Install ``sphinxfeed`` using ``easy_install`` / ``pip`` /
+ ``python setup.py install``
+
+#. Add ``sphinxfeed`` to the list of extensions in your ``conf.py``::
+
+ extensions = [..., 'sphinxfeed']
+
+#. Customise the necessary configuration options to correctly generate
+ the feed::
+
+ feed_base_url = 'http://YOUR_HOST_URL'
+ feed_author = 'YOUR NAME'
+
+ # optional options
+ feed_description = "A longer description"
+ feed_field_name = 'date' # default value is "Publish Date"
+
+"""
+
+SETUP_INFO = dict(
name='sphinxfeed',
version='0.3',
license='BSD',
@@ -32,3 +67,7 @@
include_package_data=True,
install_requires=requires,
)
+
+
+if __name__ == '__main__':
+ setup(**SETUP_INFO)
diff --git a/sphinxfeed.py b/sphinxfeed.py
index 4ae9120..6c27b2f 100644
--- a/sphinxfeed.py
+++ b/sphinxfeed.py
@@ -1,6 +1,8 @@
# This application is derived from Dan Mackinlay's sphinxcontrib.feed package.
# The original can be found at http://bitbucket.org/birkenfeld/sphinx-contrib/src/tip/feed/
+doc_trees = [] # for atelier
+
import unittest
import time
From c3c85dd07fe167a8ff4f653a99fd6cf10f7133c0 Mon Sep 17 00:00:00 2001
From: Luc Saffre
Date: Tue, 11 Sep 2018 10:35:46 +0300
Subject: [PATCH 05/86] http://luc.lino-framework.org/blog/2018/0911.html
---
README.rst | 2 +-
setup.py | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/README.rst b/README.rst
index 8c1b395..72ba42a 100644
--- a/README.rst
+++ b/README.rst
@@ -4,7 +4,7 @@ The ``sphinxfeed`` package
- This Sphinx extension is a fork of Fergus Doye's sphinxfeed
+ This Sphinx extension is a fork of Fergus Doyle's sphinxfeed
package which itself is derived from Dan Mackinlay's
`sphinxcontrib.feed
`_
diff --git a/setup.py b/setup.py
index 3fff2c3..0177484 100644
--- a/setup.py
+++ b/setup.py
@@ -1,4 +1,4 @@
-from distutils.core import setup
+from setuptools import setup
requires = [
'Sphinx>=0.6',
@@ -6,7 +6,7 @@
]
# long_desc = open('README.rst').read()
-long_desc = """ This Sphinx extension is a fork of Fergus Doye's sphinxfeed
+long_desc = """ This Sphinx extension is a fork of Fergus Doyle's sphinxfeed
package which itself is derived from Dan Mackinlay's
`sphinxcontrib.feed
`_
From 35b2d4a8d1ce3f5fb967487fd931f6834f064246 Mon Sep 17 00:00:00 2001
From: Luc Saffre
Date: Thu, 13 Sep 2018 13:11:11 +0300
Subject: [PATCH 06/86] http://luc.lino-framework.org/blog/2018/0913.html
---
.gitignore | 20 +--
setup.py | 1 +
sphinxfeed.py | 4 +-
tests/__init__.py | 0
tests/docs1/conf.py | 229 ++++++++++++++++++++++++++++
tests/docs1/expected/first.html | 108 +++++++++++++
tests/docs1/expected/genindex.html | 101 ++++++++++++
tests/docs1/expected/index.html | 111 ++++++++++++++
tests/docs1/expected/rss.xml | 1 +
tests/docs1/expected/search.html | 113 ++++++++++++++
tests/docs1/expected/searchindex.js | 1 +
tests/docs1/expected/second.html | 107 +++++++++++++
tests/docs1/first.rst | 10 ++
tests/docs1/index.rst | 13 ++
tests/docs1/second.rst | 11 ++
tests/test_sphinxfeed.py | 22 +++
16 files changed, 840 insertions(+), 12 deletions(-)
create mode 100644 tests/__init__.py
create mode 100644 tests/docs1/conf.py
create mode 100644 tests/docs1/expected/first.html
create mode 100644 tests/docs1/expected/genindex.html
create mode 100644 tests/docs1/expected/index.html
create mode 100644 tests/docs1/expected/rss.xml
create mode 100644 tests/docs1/expected/search.html
create mode 100644 tests/docs1/expected/searchindex.js
create mode 100644 tests/docs1/expected/second.html
create mode 100644 tests/docs1/first.rst
create mode 100644 tests/docs1/index.rst
create mode 100644 tests/docs1/second.rst
create mode 100644 tests/test_sphinxfeed.py
diff --git a/.gitignore b/.gitignore
index 485a30b..e5e65ff 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,9 +1,11 @@
-# use glob syntax.
-syntax: glob
-
-*.pyc
-*~
-*.egg-info
-.build
-.coverage
-.eggs
+# use glob syntax.
+syntax: glob
+
+*.pyc
+*~
+*.egg-info
+.build
+.coverage
+.eggs
+tmp
+.doctrees
\ No newline at end of file
diff --git a/setup.py b/setup.py
index 0177484..22351e2 100644
--- a/setup.py
+++ b/setup.py
@@ -66,6 +66,7 @@
py_modules=['sphinxfeed'],
include_package_data=True,
install_requires=requires,
+ test_suite='tests'
)
diff --git a/sphinxfeed.py b/sphinxfeed.py
index 6c27b2f..780c790 100644
--- a/sphinxfeed.py
+++ b/sphinxfeed.py
@@ -83,9 +83,7 @@ def emit_feed(app, exc):
import os.path
ordered_items = app.builder.env.feed_items.values()
feed = app.builder.env.feed_feed
- ordered_items.sort(
- cmp=lambda x,y: cmp(x['pubDate'],y['pubDate']),
- reverse=True)
+ ordered_items.sort(key=lambda x: x['pubDate'], reverse=True)
for item in ordered_items:
feed.items.append(item)
diff --git a/tests/__init__.py b/tests/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/tests/docs1/conf.py b/tests/docs1/conf.py
new file mode 100644
index 0000000..91fab8a
--- /dev/null
+++ b/tests/docs1/conf.py
@@ -0,0 +1,229 @@
+# -*- coding: utf-8 -*-
+#
+# build configuration file, created by
+# sphinx-quickstart on Mon Nov 10 16:33:38 2008.
+#
+# This file is execfile()d with the current directory set to its containing dir.
+#
+# The contents of this file are pickled, so don't put values in the namespace
+# that aren't pickleable (module imports are okay, they're removed automatically).
+#
+# All configuration values have a default value; values that are commented out
+# serve to show the default value.
+
+# from __future__ import unicode_literals
+# from atelier.sphinxconf import configure
+
+extensions = []
+templates_path = []
+
+# configure(globals())
+
+
+# If your extensions are in another directory, add it here. If the directory
+# is relative to the documentation root, use os.path.abspath to make it
+# absolute, like shown here.
+#sys.path.append(os.path.abspath('some/directory'))
+
+# General configuration
+# ---------------------
+
+# Add any paths that contain templates here, relative to this directory.
+# templates_path = ['.templates']
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+# The encoding of source files.
+#source_encoding = 'utf-8-sig'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General substitutions.
+project = "First sphinxfeed tester"
+copyright = '2018 Joe Doe'
+
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+version = ''
+# The full version, including alpha/beta/rc tags.
+release = ''
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+language = 'en'
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+# today_fmt = '%d.%B.%Y'
+
+
+# Note 20100703 : unused_docs and exclude_trees replaced by exclude_patterns
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+exclude_patterns = ['.build']
+
+# List of documents that shouldn't be included in the build.
+#unused_docs = []
+
+# List of directories, relative to source directories, that shouldn't be searched
+# for source files.
+exclude_trees = ['old', 'include', '.build']
+
+
+# The reST default role (used for this markup: `text`) to use for all documents.
+#default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# A list of ignored prefixes for module index sorting.
+#modindex_common_prefix = []
+
+# -- Options for HTML output ---------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages. See the documentation for
+# a list of builtin themes.
+# html_theme = 'default'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further. For a list of options available for each theme, see the
+# documentation.
+#html_theme_options = {}
+
+# Add any paths that contain custom themes here, relative to this directory.
+#html_theme_path = []
+
+# The name for this set of Sphinx documents. If None, it defaults to
+# " v documentation".
+html_title = "Joe's website"
+
+# A shorter title for the navigation bar. Default is the same as html_title.
+html_short_title = u"Home"
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+# html_logo = "logo2.jpg"
+# html_logo = "logo.png"
+
+# The name of an image file (within the static path) to use as favicon of the
+# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+#html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['.static']
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+html_last_updated_fmt = '%Y-%m-%d'
+#~ html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = {}
+
+# If false, no module index is generated.
+html_use_modindex = True
+
+# If false, no index is generated.
+html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+#html_split_index = False
+
+# If true, the reST sources are included in the HTML build as _sources/.
+#html_copy_source = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a tag referring to it. The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = ''
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'saffre-rumma'
+
+
+# Options for LaTeX output
+# ------------------------
+
+# The paper size ('letter' or 'a4').
+#latex_paper_size = 'letter'
+
+# The font size ('10pt', '11pt' or '12pt').
+#latex_font_size = '10pt'
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title, author, document class [howto/manual]).
+latex_documents = [
+ ('index', 'saffre-rumma.tex', u'saffre-rumma',
+ u'saffre-rumma', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+#latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#latex_use_parts = False
+
+# Additional stuff for the LaTeX preamble.
+#latex_preamble = ''
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_use_modindex = True
+
+
+# html_sidebars = {
+# '**': ['globaltoc.html', 'searchbox.html', 'links.html'],
+# }
+
+# html_theme = "classic"
+# html_theme_options = dict(collapsiblesidebar=True, externalrefs=True)
+
+# html_theme = "bizstyle"
+# html_theme_options = dict(collapsiblesidebar=True, externalrefs=True)
+
+
+# extensions += ['yasfb']
+# extensions += ['sphinxcontrib.feed']
+extensions += ['sphinxfeed']
+# NB : not the public sphinxfeed but my extended version
+feed_base_url = 'http://news.example.com'
+feed_author = 'Joe Dow'
+feed_title = "Joe's blog"
+feed_field_name = 'date'
+
diff --git a/tests/docs1/expected/first.html b/tests/docs1/expected/first.html
new file mode 100644
index 0000000..f4ca311
--- /dev/null
+++ b/tests/docs1/expected/first.html
@@ -0,0 +1,108 @@
+
+
+
+
+
+
+
+ First day — Joe's website
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
First day
+
Mul seitse pruuti on,
+neid kõiki armastan
+ja iga päev neist üht mina külastan.
+Ikka Emma esmaspäev, …
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/docs1/expected/genindex.html b/tests/docs1/expected/genindex.html
new file mode 100644
index 0000000..7504c09
--- /dev/null
+++ b/tests/docs1/expected/genindex.html
@@ -0,0 +1,101 @@
+
+
+
+
+
+
+
+
+ Index — Joe's website
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/docs1/expected/index.html b/tests/docs1/expected/index.html
new file mode 100644
index 0000000..d8fb8ee
--- /dev/null
+++ b/tests/docs1/expected/index.html
@@ -0,0 +1,111 @@
+
+
+
+
+
+
+
+ Joe’s blog — Joe's website
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/docs1/expected/rss.xml b/tests/docs1/expected/rss.xml
new file mode 100644
index 0000000..b1a7af2
--- /dev/null
+++ b/tests/docs1/expected/rss.xml
@@ -0,0 +1 @@
+First sphinxfeed tester http://news.example.comen 2018 Joe Doe
\ No newline at end of file
diff --git a/tests/docs1/expected/search.html b/tests/docs1/expected/search.html
new file mode 100644
index 0000000..8aacd0f
--- /dev/null
+++ b/tests/docs1/expected/search.html
@@ -0,0 +1,113 @@
+
+
+
+
+
+
+
+ Search — Joe's website
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Search
+
+
+
+ Please activate JavaScript to enable the search
+ functionality.
+
+
+
+ From here you can search these documents. Enter your search
+ words into the box below and click "search". Note that the search
+ function will automatically search for all of the words. Pages
+ containing fewer words won't appear in the result list.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/docs1/expected/searchindex.js b/tests/docs1/expected/searchindex.js
new file mode 100644
index 0000000..3a25cba
--- /dev/null
+++ b/tests/docs1/expected/searchindex.js
@@ -0,0 +1 @@
+Search.setIndex({docnames:["first","index","second"],envversion:{"sphinx.domains.c":1,"sphinx.domains.changeset":1,"sphinx.domains.cpp":1,"sphinx.domains.javascript":1,"sphinx.domains.math":1,"sphinx.domains.python":1,"sphinx.domains.rst":1,"sphinx.domains.std":1,sphinx:54},filenames:["first.rst","index.rst","second.rst"],objects:{},objnames:{},objtypes:{},terms:{"\u00fcht":[0,2],"esmasp\u00e4ev":[0,2],"k\u00f5iki":[0,2],"k\u00fclastan":[0,2],"p\u00e4ev":[0,2],"teisip\u00e4ev":2,about:[],almost:[],armastan:[0,2],dai:1,daili:[],emma:[0,2],especi:[],first:1,framework:[],iga:[0,2],ikka:[0,2],lino:[],mina:[0,2],mul:[0,2],neid:[0,2],neist:[0,2],project:[],pruuti:[0,2],second:1,seits:[0,2],softwar:[],teres:2,thi:[],welcom:[],where:[],write:[]},titles:["First day","Joe\u2019s blog","Second day"],titleterms:{blog:1,dai:[0,2],develop:[],first:0,joe:1,luc:[],second:2,sitemap:1}})
\ No newline at end of file
diff --git a/tests/docs1/expected/second.html b/tests/docs1/expected/second.html
new file mode 100644
index 0000000..77acd85
--- /dev/null
+++ b/tests/docs1/expected/second.html
@@ -0,0 +1,107 @@
+
+
+
+
+
+
+
+ Second day — Joe's website
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Second day
+
Mul seitse pruuti on,
+neid kõiki armastan
+ja iga päev neist üht mina külastan.
+Ikka Emma esmaspäev,
+Terese teisipäev,
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/docs1/first.rst b/tests/docs1/first.rst
new file mode 100644
index 0000000..e0943ca
--- /dev/null
+++ b/tests/docs1/first.rst
@@ -0,0 +1,10 @@
+:date: 2018-09-11
+
+=========
+First day
+=========
+
+Mul seitse pruuti on,
+neid kõiki armastan
+ja iga päev neist üht mina külastan.
+Ikka Emma esmaspäev, ...
diff --git a/tests/docs1/index.rst b/tests/docs1/index.rst
new file mode 100644
index 0000000..8223d2d
--- /dev/null
+++ b/tests/docs1/index.rst
@@ -0,0 +1,13 @@
+==========
+Joe's blog
+==========
+
+
+Sitemap
+-------
+
+.. toctree::
+ :maxdepth: 1
+
+ first
+ second
diff --git a/tests/docs1/second.rst b/tests/docs1/second.rst
new file mode 100644
index 0000000..da1b4ce
--- /dev/null
+++ b/tests/docs1/second.rst
@@ -0,0 +1,11 @@
+:date: 2018-09-12
+
+==========
+Second day
+==========
+
+Mul seitse pruuti on,
+neid kõiki armastan
+ja iga päev neist üht mina külastan.
+Ikka Emma esmaspäev,
+Terese teisipäev,
diff --git a/tests/test_sphinxfeed.py b/tests/test_sphinxfeed.py
new file mode 100644
index 0000000..0588a06
--- /dev/null
+++ b/tests/test_sphinxfeed.py
@@ -0,0 +1,22 @@
+import filecmp
+from atelier.test import TestCase
+
+class AllTests(TestCase):
+ def test_all(self):
+
+ args = ['sphinx-build']
+ args += ["-b"]
+ args += ["html"]
+ args += ["tests/docs1"]
+ args += ["tmp"]
+ self.run_subprocess(args)
+
+ common = ["rss.xml", "index.html", "first.html",
+ "search.html", "genindex.html", "searchindex.js"]
+
+ match, mismatch, errors = filecmp.cmpfiles(
+ "tests/docs1/expected", "tmp", common)
+
+
+
+ self.assertEqual(match, common)
From d98823be4e2555b0aa70ea099a165cb27bde003c Mon Sep 17 00:00:00 2001
From: Luc Saffre
Date: Thu, 13 Sep 2018 13:28:22 +0300
Subject: [PATCH 07/86] http://luc.lino-framework.org/blog/2018/0913.html
---
tests/docs1/expected/first.html | 3 +--
tests/docs1/expected/genindex.html | 3 +--
tests/docs1/expected/index.html | 3 +--
tests/docs1/expected/search.html | 4 +---
tests/docs1/expected/searchindex.js | 2 +-
tests/docs1/expected/second.html | 3 +--
tests/docs1/first.rst | 2 +-
tests/docs1/second.rst | 2 +-
8 files changed, 8 insertions(+), 14 deletions(-)
diff --git a/tests/docs1/expected/first.html b/tests/docs1/expected/first.html
index f4ca311..a7919f3 100644
--- a/tests/docs1/expected/first.html
+++ b/tests/docs1/expected/first.html
@@ -13,7 +13,6 @@
-
@@ -93,7 +92,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 1.8.0
+ Powered by Sphinx 1.7.9
& Alabaster 0.7.11
|
diff --git a/tests/docs1/expected/genindex.html b/tests/docs1/expected/genindex.html
index 7504c09..aec6b50 100644
--- a/tests/docs1/expected/genindex.html
+++ b/tests/docs1/expected/genindex.html
@@ -14,7 +14,6 @@
-
@@ -89,7 +88,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 1.8.0
+ Powered by Sphinx 1.7.9
& Alabaster 0.7.11
diff --git a/tests/docs1/expected/index.html b/tests/docs1/expected/index.html
index d8fb8ee..c9bfa3b 100644
--- a/tests/docs1/expected/index.html
+++ b/tests/docs1/expected/index.html
@@ -13,7 +13,6 @@
-
@@ -96,7 +95,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 1.8.0
+ Powered by Sphinx 1.7.9
& Alabaster 0.7.11
|
diff --git a/tests/docs1/expected/search.html b/tests/docs1/expected/search.html
index 8aacd0f..e33dd99 100644
--- a/tests/docs1/expected/search.html
+++ b/tests/docs1/expected/search.html
@@ -9,12 +9,10 @@
Search — Joe's website
-
-
@@ -101,7 +99,7 @@ Related Topics
©2018 Joe Doe.
|
- Powered by Sphinx 1.8.0
+ Powered by Sphinx 1.7.9
& Alabaster 0.7.11
diff --git a/tests/docs1/expected/searchindex.js b/tests/docs1/expected/searchindex.js
index 3a25cba..2a35bce 100644
--- a/tests/docs1/expected/searchindex.js
+++ b/tests/docs1/expected/searchindex.js
@@ -1 +1 @@
-Search.setIndex({docnames:["first","index","second"],envversion:{"sphinx.domains.c":1,"sphinx.domains.changeset":1,"sphinx.domains.cpp":1,"sphinx.domains.javascript":1,"sphinx.domains.math":1,"sphinx.domains.python":1,"sphinx.domains.rst":1,"sphinx.domains.std":1,sphinx:54},filenames:["first.rst","index.rst","second.rst"],objects:{},objnames:{},objtypes:{},terms:{"\u00fcht":[0,2],"esmasp\u00e4ev":[0,2],"k\u00f5iki":[0,2],"k\u00fclastan":[0,2],"p\u00e4ev":[0,2],"teisip\u00e4ev":2,about:[],almost:[],armastan:[0,2],dai:1,daili:[],emma:[0,2],especi:[],first:1,framework:[],iga:[0,2],ikka:[0,2],lino:[],mina:[0,2],mul:[0,2],neid:[0,2],neist:[0,2],project:[],pruuti:[0,2],second:1,seits:[0,2],softwar:[],teres:2,thi:[],welcom:[],where:[],write:[]},titles:["First day","Joe\u2019s blog","Second day"],titleterms:{blog:1,dai:[0,2],develop:[],first:0,joe:1,luc:[],second:2,sitemap:1}})
\ No newline at end of file
+Search.setIndex({docnames:["first","index","second"],envversion:54,filenames:["first.rst","index.rst","second.rst"],objects:{},objnames:{},objtypes:{},terms:{"\u00fcht":[0,2],"esmasp\u00e4ev":[0,2],"k\u00f5iki":[0,2],"k\u00fclastan":[0,2],"p\u00e4ev":[0,2],"teisip\u00e4ev":2,armastan:[0,2],dai:1,emma:[0,2],first:1,iga:[0,2],ikka:[0,2],mina:[0,2],mul:[0,2],neid:[0,2],neist:[0,2],pruuti:[0,2],second:1,seits:[0,2],teres:2},titles:["First day","Joe\u2019s blog","Second day"],titleterms:{blog:1,dai:[0,2],first:0,joe:1,second:2,sitemap:1}})
\ No newline at end of file
diff --git a/tests/docs1/expected/second.html b/tests/docs1/expected/second.html
index 77acd85..287816d 100644
--- a/tests/docs1/expected/second.html
+++ b/tests/docs1/expected/second.html
@@ -13,7 +13,6 @@
-
@@ -92,7 +91,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 1.8.0
+ Powered by Sphinx 1.7.9
& Alabaster 0.7.11
|
diff --git a/tests/docs1/first.rst b/tests/docs1/first.rst
index e0943ca..e72dd5b 100644
--- a/tests/docs1/first.rst
+++ b/tests/docs1/first.rst
@@ -1,4 +1,4 @@
-:date: 2018-09-11
+:date: 2018-03-11
=========
First day
diff --git a/tests/docs1/second.rst b/tests/docs1/second.rst
index da1b4ce..73d9f5d 100644
--- a/tests/docs1/second.rst
+++ b/tests/docs1/second.rst
@@ -1,4 +1,4 @@
-:date: 2018-09-12
+:date: 2018-03-12
==========
Second day
From 6fcfbba126fce0a0b90d08ca8b0ddb56cdccf6c4 Mon Sep 17 00:00:00 2001
From: Luc Saffre
Date: Thu, 13 Sep 2018 13:33:34 +0300
Subject: [PATCH 08/86] http://luc.lino-framework.org/blog/2018/0913.html
---
setup.py | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/setup.py b/setup.py
index 22351e2..deb5bfd 100644
--- a/setup.py
+++ b/setup.py
@@ -46,9 +46,9 @@
name='sphinxfeed',
version='0.3',
license='BSD',
- author='junkafarian',
- author_email='junkafarian@gmail.com',
- url='https://github.com/junkafarian/sphinxfeed',
+ author='Luc Saffre',
+ author_email='luc.saffre@gmail.com',
+ url='https://github.com/lsaffre/sphinxfeed',
description='Sphinx extension for generating RSS feeds',
long_description=long_desc,
classifiers=[
@@ -66,7 +66,8 @@
py_modules=['sphinxfeed'],
include_package_data=True,
install_requires=requires,
- test_suite='tests'
+ test_suite='tests',
+ tests_require=['atelier']
)
From f4d110602dd1a44494694dc0c4979b54117f803c Mon Sep 17 00:00:00 2001
From: Luc Saffre
Date: Mon, 17 Sep 2018 21:05:55 +0300
Subject: [PATCH 09/86] http://luc.lino-framework.org/blog/2018/0917.html
---
tests/docs1/expected/first.html | 3 ++-
tests/docs1/expected/genindex.html | 3 ++-
tests/docs1/expected/index.html | 3 ++-
tests/docs1/expected/search.html | 4 +++-
tests/docs1/expected/searchindex.js | 2 +-
tests/docs1/expected/second.html | 3 ++-
tests/test_sphinxfeed.py | 3 +--
7 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/tests/docs1/expected/first.html b/tests/docs1/expected/first.html
index a7919f3..f4ca311 100644
--- a/tests/docs1/expected/first.html
+++ b/tests/docs1/expected/first.html
@@ -13,6 +13,7 @@
+
@@ -92,7 +93,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 1.7.9
+ Powered by Sphinx 1.8.0
& Alabaster 0.7.11
|
diff --git a/tests/docs1/expected/genindex.html b/tests/docs1/expected/genindex.html
index aec6b50..7504c09 100644
--- a/tests/docs1/expected/genindex.html
+++ b/tests/docs1/expected/genindex.html
@@ -14,6 +14,7 @@
+
@@ -88,7 +89,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 1.7.9
+ Powered by Sphinx 1.8.0
& Alabaster 0.7.11
diff --git a/tests/docs1/expected/index.html b/tests/docs1/expected/index.html
index c9bfa3b..d8fb8ee 100644
--- a/tests/docs1/expected/index.html
+++ b/tests/docs1/expected/index.html
@@ -13,6 +13,7 @@
+
@@ -95,7 +96,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 1.7.9
+ Powered by Sphinx 1.8.0
& Alabaster 0.7.11
|
diff --git a/tests/docs1/expected/search.html b/tests/docs1/expected/search.html
index e33dd99..8aacd0f 100644
--- a/tests/docs1/expected/search.html
+++ b/tests/docs1/expected/search.html
@@ -9,10 +9,12 @@
Search — Joe's website
+
+
@@ -99,7 +101,7 @@ Related Topics
©2018 Joe Doe.
|
- Powered by Sphinx 1.7.9
+ Powered by Sphinx 1.8.0
& Alabaster 0.7.11
diff --git a/tests/docs1/expected/searchindex.js b/tests/docs1/expected/searchindex.js
index 2a35bce..7483eb5 100644
--- a/tests/docs1/expected/searchindex.js
+++ b/tests/docs1/expected/searchindex.js
@@ -1 +1 @@
-Search.setIndex({docnames:["first","index","second"],envversion:54,filenames:["first.rst","index.rst","second.rst"],objects:{},objnames:{},objtypes:{},terms:{"\u00fcht":[0,2],"esmasp\u00e4ev":[0,2],"k\u00f5iki":[0,2],"k\u00fclastan":[0,2],"p\u00e4ev":[0,2],"teisip\u00e4ev":2,armastan:[0,2],dai:1,emma:[0,2],first:1,iga:[0,2],ikka:[0,2],mina:[0,2],mul:[0,2],neid:[0,2],neist:[0,2],pruuti:[0,2],second:1,seits:[0,2],teres:2},titles:["First day","Joe\u2019s blog","Second day"],titleterms:{blog:1,dai:[0,2],first:0,joe:1,second:2,sitemap:1}})
\ No newline at end of file
+Search.setIndex({docnames:["first","index","second"],envversion:{"sphinx.domains.c":1,"sphinx.domains.changeset":1,"sphinx.domains.cpp":1,"sphinx.domains.javascript":1,"sphinx.domains.math":1,"sphinx.domains.python":1,"sphinx.domains.rst":1,"sphinx.domains.std":1,sphinx:54},filenames:["first.rst","index.rst","second.rst"],objects:{},objnames:{},objtypes:{},terms:{"\u00fcht":[0,2],"esmasp\u00e4ev":[0,2],"k\u00f5iki":[0,2],"k\u00fclastan":[0,2],"p\u00e4ev":[0,2],"teisip\u00e4ev":2,armastan:[0,2],dai:1,emma:[0,2],first:1,iga:[0,2],ikka:[0,2],mina:[0,2],mul:[0,2],neid:[0,2],neist:[0,2],pruuti:[0,2],second:1,seits:[0,2],teres:2},titles:["First day","Joe\u2019s blog","Second day"],titleterms:{blog:1,dai:[0,2],first:0,joe:1,second:2,sitemap:1}})
\ No newline at end of file
diff --git a/tests/docs1/expected/second.html b/tests/docs1/expected/second.html
index 287816d..77acd85 100644
--- a/tests/docs1/expected/second.html
+++ b/tests/docs1/expected/second.html
@@ -13,6 +13,7 @@
+
@@ -91,7 +92,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 1.7.9
+ Powered by Sphinx 1.8.0
& Alabaster 0.7.11
|
diff --git a/tests/test_sphinxfeed.py b/tests/test_sphinxfeed.py
index 0588a06..2f6c313 100644
--- a/tests/test_sphinxfeed.py
+++ b/tests/test_sphinxfeed.py
@@ -17,6 +17,5 @@ def test_all(self):
match, mismatch, errors = filecmp.cmpfiles(
"tests/docs1/expected", "tmp", common)
-
-
+ self.assertEqual(mismatch, [])
self.assertEqual(match, common)
From bd7c48732686ca9b1d1c25637625b39b1eab15e9 Mon Sep 17 00:00:00 2001
From: Luc Saffre
Date: Sun, 4 Nov 2018 15:43:27 +0200
Subject: [PATCH 10/86] adapted to Sphinx 1.8.1
---
tests/docs1/expected/first.html | 2 +-
tests/docs1/expected/genindex.html | 2 +-
tests/docs1/expected/index.html | 2 +-
tests/docs1/expected/search.html | 2 +-
tests/docs1/expected/second.html | 2 +-
tests/test_sphinxfeed.py | 8 +++++++-
6 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/tests/docs1/expected/first.html b/tests/docs1/expected/first.html
index f4ca311..684609a 100644
--- a/tests/docs1/expected/first.html
+++ b/tests/docs1/expected/first.html
@@ -93,7 +93,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 1.8.0
+ Powered by Sphinx 1.8.1
& Alabaster 0.7.11
|
diff --git a/tests/docs1/expected/genindex.html b/tests/docs1/expected/genindex.html
index 7504c09..9f8bfae 100644
--- a/tests/docs1/expected/genindex.html
+++ b/tests/docs1/expected/genindex.html
@@ -89,7 +89,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 1.8.0
+ Powered by Sphinx 1.8.1
& Alabaster 0.7.11
diff --git a/tests/docs1/expected/index.html b/tests/docs1/expected/index.html
index d8fb8ee..1f75914 100644
--- a/tests/docs1/expected/index.html
+++ b/tests/docs1/expected/index.html
@@ -96,7 +96,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 1.8.0
+ Powered by Sphinx 1.8.1
& Alabaster 0.7.11
|
diff --git a/tests/docs1/expected/search.html b/tests/docs1/expected/search.html
index 8aacd0f..28d9343 100644
--- a/tests/docs1/expected/search.html
+++ b/tests/docs1/expected/search.html
@@ -101,7 +101,7 @@ Related Topics
©2018 Joe Doe.
|
- Powered by Sphinx 1.8.0
+ Powered by Sphinx 1.8.1
& Alabaster 0.7.11
diff --git a/tests/docs1/expected/second.html b/tests/docs1/expected/second.html
index 77acd85..cfa6158 100644
--- a/tests/docs1/expected/second.html
+++ b/tests/docs1/expected/second.html
@@ -92,7 +92,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 1.8.0
+ Powered by Sphinx 1.8.1
& Alabaster 0.7.11
|
diff --git a/tests/test_sphinxfeed.py b/tests/test_sphinxfeed.py
index 2f6c313..8b8e7b0 100644
--- a/tests/test_sphinxfeed.py
+++ b/tests/test_sphinxfeed.py
@@ -1,9 +1,15 @@
+# -*- coding: UTF-8 -*-
+# Copyright 2018 Rumma & Ko Ltd
+
import filecmp
from atelier.test import TestCase
class AllTests(TestCase):
def test_all(self):
-
+ """
+ Run a sphinx-build and then check whether the generated files (in
+ `tmp`) are the same as in `expected`.
+ """
args = ['sphinx-build']
args += ["-b"]
args += ["html"]
From 59e0d7ffcaad8985a6f79e2287870ed307a2c07a Mon Sep 17 00:00:00 2001
From: Luc Saffre
Date: Mon, 21 Jan 2019 22:36:02 +0200
Subject: [PATCH 11/86] http://luc.lino-framework.org/blog/2019/0121.html
---
tests/docs1/expected/first.html | 3 +--
tests/docs1/expected/genindex.html | 3 +--
tests/docs1/expected/index.html | 3 +--
tests/docs1/expected/search.html | 3 +--
tests/docs1/expected/searchindex.js | 2 +-
tests/docs1/expected/second.html | 3 +--
tests/test_sphinxfeed.py | 5 ++++-
7 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/tests/docs1/expected/first.html b/tests/docs1/expected/first.html
index 684609a..19f9e08 100644
--- a/tests/docs1/expected/first.html
+++ b/tests/docs1/expected/first.html
@@ -13,7 +13,6 @@
-
@@ -93,7 +92,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 1.8.1
+ Powered by Sphinx 1.8.2
& Alabaster 0.7.11
|
diff --git a/tests/docs1/expected/genindex.html b/tests/docs1/expected/genindex.html
index 9f8bfae..844a46d 100644
--- a/tests/docs1/expected/genindex.html
+++ b/tests/docs1/expected/genindex.html
@@ -14,7 +14,6 @@
-
@@ -89,7 +88,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 1.8.1
+ Powered by Sphinx 1.8.2
& Alabaster 0.7.11
diff --git a/tests/docs1/expected/index.html b/tests/docs1/expected/index.html
index 1f75914..325b472 100644
--- a/tests/docs1/expected/index.html
+++ b/tests/docs1/expected/index.html
@@ -13,7 +13,6 @@
-
@@ -96,7 +95,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 1.8.1
+ Powered by Sphinx 1.8.2
& Alabaster 0.7.11
|
diff --git a/tests/docs1/expected/search.html b/tests/docs1/expected/search.html
index 28d9343..5960b49 100644
--- a/tests/docs1/expected/search.html
+++ b/tests/docs1/expected/search.html
@@ -14,7 +14,6 @@
-
@@ -101,7 +100,7 @@ Related Topics
©2018 Joe Doe.
|
- Powered by Sphinx 1.8.1
+ Powered by Sphinx 1.8.2
& Alabaster 0.7.11
diff --git a/tests/docs1/expected/searchindex.js b/tests/docs1/expected/searchindex.js
index 7483eb5..4d12907 100644
--- a/tests/docs1/expected/searchindex.js
+++ b/tests/docs1/expected/searchindex.js
@@ -1 +1 @@
-Search.setIndex({docnames:["first","index","second"],envversion:{"sphinx.domains.c":1,"sphinx.domains.changeset":1,"sphinx.domains.cpp":1,"sphinx.domains.javascript":1,"sphinx.domains.math":1,"sphinx.domains.python":1,"sphinx.domains.rst":1,"sphinx.domains.std":1,sphinx:54},filenames:["first.rst","index.rst","second.rst"],objects:{},objnames:{},objtypes:{},terms:{"\u00fcht":[0,2],"esmasp\u00e4ev":[0,2],"k\u00f5iki":[0,2],"k\u00fclastan":[0,2],"p\u00e4ev":[0,2],"teisip\u00e4ev":2,armastan:[0,2],dai:1,emma:[0,2],first:1,iga:[0,2],ikka:[0,2],mina:[0,2],mul:[0,2],neid:[0,2],neist:[0,2],pruuti:[0,2],second:1,seits:[0,2],teres:2},titles:["First day","Joe\u2019s blog","Second day"],titleterms:{blog:1,dai:[0,2],first:0,joe:1,second:2,sitemap:1}})
\ No newline at end of file
+Search.setIndex({docnames:["first","index","second"],envversion:{"sphinx.domains.c":1,"sphinx.domains.changeset":1,"sphinx.domains.cpp":1,"sphinx.domains.javascript":1,"sphinx.domains.math":2,"sphinx.domains.python":1,"sphinx.domains.rst":1,"sphinx.domains.std":1,sphinx:54},filenames:["first.rst","index.rst","second.rst"],objects:{},objnames:{},objtypes:{},terms:{"\u00fcht":[0,2],"esmasp\u00e4ev":[0,2],"k\u00f5iki":[0,2],"k\u00fclastan":[0,2],"p\u00e4ev":[0,2],"teisip\u00e4ev":2,armastan:[0,2],dai:1,emma:[0,2],first:1,iga:[0,2],ikka:[0,2],mina:[0,2],mul:[0,2],neid:[0,2],neist:[0,2],pruuti:[0,2],second:1,seits:[0,2],teres:2},titles:["First day","Joe\u2019s blog","Second day"],titleterms:{blog:1,dai:[0,2],first:0,joe:1,second:2,sitemap:1}})
\ No newline at end of file
diff --git a/tests/docs1/expected/second.html b/tests/docs1/expected/second.html
index cfa6158..f567ada 100644
--- a/tests/docs1/expected/second.html
+++ b/tests/docs1/expected/second.html
@@ -13,7 +13,6 @@
-
@@ -92,7 +91,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 1.8.1
+ Powered by Sphinx 1.8.2
& Alabaster 0.7.11
|
diff --git a/tests/test_sphinxfeed.py b/tests/test_sphinxfeed.py
index 8b8e7b0..bec3772 100644
--- a/tests/test_sphinxfeed.py
+++ b/tests/test_sphinxfeed.py
@@ -1,5 +1,5 @@
# -*- coding: UTF-8 -*-
-# Copyright 2018 Rumma & Ko Ltd
+# Copyright 2018-2019 Rumma & Ko Ltd
import filecmp
from atelier.test import TestCase
@@ -9,6 +9,9 @@ def test_all(self):
"""
Run a sphinx-build and then check whether the generated files (in
`tmp`) are the same as in `expected`.
+
+ The tests can fail if the Sphinx version changes.
+
"""
args = ['sphinx-build']
args += ["-b"]
From 1541cff69854b12727518d62985fd6d960485b68 Mon Sep 17 00:00:00 2001
From: Luc Saffre
Date: Mon, 21 Jan 2019 23:50:20 +0200
Subject: [PATCH 12/86] http://luc.lino-framework.org/blog/2019/0121.html
---
tests/test_sphinxfeed.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/test_sphinxfeed.py b/tests/test_sphinxfeed.py
index bec3772..0595d5a 100644
--- a/tests/test_sphinxfeed.py
+++ b/tests/test_sphinxfeed.py
@@ -11,7 +11,7 @@ def test_all(self):
`tmp`) are the same as in `expected`.
The tests can fail if the Sphinx version changes.
-
+
"""
args = ['sphinx-build']
args += ["-b"]
From 8def303de772d7e38671eee07540006441d25ae7 Mon Sep 17 00:00:00 2001
From: Luc Saffre
Date: Fri, 15 Mar 2019 06:16:22 +0200
Subject: [PATCH 13/86] http://luc.lino-framework.org/blog/2019/0315.html
---
README.rst | 25 +++++++++-------
setup.py | 5 +++-
sphinxfeed.py | 80 +++++++++++++++++++++++++++++++++------------------
3 files changed, 71 insertions(+), 39 deletions(-)
diff --git a/README.rst b/README.rst
index 72ba42a..9defeb0 100644
--- a/README.rst
+++ b/README.rst
@@ -1,19 +1,24 @@
-==========================
-The ``sphinxfeed`` package
-==========================
+=============================================
+The ``sphinxfeed`` package fork by Luc Saffre
+=============================================
-
- This Sphinx extension is a fork of Fergus Doyle's sphinxfeed
-package which itself is derived from Dan Mackinlay's
+This Sphinx extension is a fork of Fergus Doyle's `sphinxfeed
+package `__
+which itself is derived from Dan Mackinlay's
`sphinxcontrib.feed
`_
-package. It relies on the `feedformatter
- `_ package instead of Django
+package. It relies on
+Lars Kiesow's `python-feedgen `__ package
+instead of the defunct `feedformatter
+ `_ package or of Django
utils to generate the feed.
Features added by Luc:
+- 20190315 : Support Python 3 (by using feedgen instead of feedformatter).
+ feed_description is no longer optional.
+
- new config variable feed_field_name to change the name of the field
to use for specifying the publication date.
- don't publish items whose publication datetime is in the future.
@@ -33,9 +38,9 @@ Usage
feed_base_url = 'http://YOUR_HOST_URL'
feed_author = 'YOUR NAME'
-
- # optional options
feed_description = "A longer description"
+
+ # optional options
feed_field_name = 'date' # default value is "Publish Date"
diff --git a/setup.py b/setup.py
index deb5bfd..26752dd 100644
--- a/setup.py
+++ b/setup.py
@@ -1,10 +1,12 @@
from setuptools import setup
+
requires = [
'Sphinx>=0.6',
- 'feedformatter',
+ 'feedgen', 'dateutil'
]
+
# long_desc = open('README.rst').read()
long_desc = """ This Sphinx extension is a fork of Fergus Doyle's sphinxfeed
package which itself is derived from Dan Mackinlay's
@@ -19,6 +21,7 @@
- new config variable feed_field_name to change the name of the field
to use for specifying the publication date.
- don't publish items whose publication datetime is in the future.
+- Support Python 3 (by using feedgen instead of feedformatter)
Usage
-----
diff --git a/sphinxfeed.py b/sphinxfeed.py
index 780c790..ea63f1c 100644
--- a/sphinxfeed.py
+++ b/sphinxfeed.py
@@ -1,13 +1,26 @@
# This application is derived from Dan Mackinlay's sphinxcontrib.feed package.
# The original can be found at http://bitbucket.org/birkenfeld/sphinx-contrib/src/tip/feed/
-doc_trees = [] # for atelier
+import os.path
+import time
+from datetime import datetime
+from dateutil.tz import tzlocal
-import unittest
+from feedgen.feed import FeedGenerator
+from feedgen.feed import FeedEntry
+
+doc_trees = [] # for atelier
-import time
def parse_pubdate(pubdate):
+ # tz = "+0002"
+ # chunks = pubdate.split()
+ # if len(chunks) == 1:
+ # chunks.append("23:59")
+ # if len(chunks) == 2:
+ # chunks.append(tz)
+ # fmt = '%Y-%m-%d %H:%M %Z'
+ # return time.strptime(' '.join(chunks), fmt)
fmt = '%Y-%m-%d %H:%M'
try:
date = time.strptime(pubdate, fmt)
@@ -22,10 +35,10 @@ def setup(app):
"""
from sphinx.application import Sphinx
if not isinstance(app, Sphinx): return
- app.add_config_value('feed_base_url', '', '')
- app.add_config_value('feed_description', '', '')
- app.add_config_value('feed_author', '', '')
- app.add_config_value('feed_field_name', 'Publish Date', '')
+ app.add_config_value('feed_base_url', '', 'html')
+ app.add_config_value('feed_description', '', 'html')
+ app.add_config_value('feed_author', '', 'html')
+ app.add_config_value('feed_field_name', 'Publish Date', 'env')
app.add_config_value('feed_filename', 'rss.xml', 'html')
app.connect('html-page-context', create_feed_item)
@@ -36,17 +49,17 @@ def setup(app):
#in particular.
def create_feed_container(app):
- from feedformatter import Feed
- feed = Feed()
- feed.feed['title'] = app.config.project
- feed.feed['link'] = app.config.feed_base_url
- feed.feed['author'] = app.config.feed_author
- feed.feed['description'] = app.config.feed_description
+ #from feedformatter import Feed
+ feed = FeedGenerator()
+ feed.title(app.config.project)
+ feed.link(href=app.config.feed_base_url)
+ feed.author(dict(name=app.config.feed_author))
+ feed.description(app.config.feed_description)
if app.config.language:
- feed.feed['language'] = app.config.language
+ feed.language(app.config.language)
if app.config.copyright:
- feed.feed['copyright'] = app.config.copyright
+ feed.copyright(app.config.copyright)
app.builder.env.feed_feed = feed
if not hasattr(app.builder.env, 'feed_items'):
app.builder.env.feed_items = {}
@@ -67,32 +80,42 @@ def create_feed_item(app, pagename, templatename, ctx, doctree):
if pubDate > time.gmtime():
return
- item = {
- 'title': ctx.get('title'),
- 'link': app.config.feed_base_url + '/' + ctx['current_page_name'] + ctx['file_suffix'],
- 'description': ctx.get('body'),
- 'pubDate': pubDate
- }
+ if not ctx.get('body') or not ctx.get('title'):
+ return
+
+ pubDate = datetime.fromtimestamp(time.mktime(pubDate))
+ pubDate = pubDate.replace(tzinfo=tzlocal())
+
+ item = FeedEntry()
+ item.title(ctx.get('title'))
+ item.link(href=app.config.feed_base_url + '/' + ctx['current_page_name'] + ctx['file_suffix'])
+ item.description(ctx.get('body'))
+ item.published(pubDate)
+
if 'author' in metadata:
- item['author'] = metadata['author']
+ item.author(metadata['author'])
env.feed_items[pagename] = item
+
#Additionally, we might like to provide our templates with a way to link to the rss output file
ctx['rss_link'] = app.config.feed_base_url + '/' + app.config.feed_filename
def emit_feed(app, exc):
- import os.path
- ordered_items = app.builder.env.feed_items.values()
+ ordered_items = list(app.builder.env.feed_items.values())
feed = app.builder.env.feed_feed
- ordered_items.sort(key=lambda x: x['pubDate'], reverse=True)
+ # ordered_items.sort(key=lambda x: x['pubDate'], reverse=True)
+ ordered_items.sort(key=lambda x: x.published())
for item in ordered_items:
- feed.items.append(item)
+ feed.add_entry(item) # prepends the item
+ # for k, v in item.items():
+ # getattr(e, k)(v)
path = os.path.join(app.builder.outdir,
app.config.feed_filename)
- feed.format_rss2_file(path)
+ # print(20190315, path)
+ feed.rss_file(path)
return
- # 20180204 The following code (pickle the environment and check
+ # LS 20180204 The following code (pickle the environment and check
# consistency at this point) caused an error when also bibtex was
# installed. I deactivated it since I don't know why it's needed.
@@ -115,4 +138,5 @@ def emit_feed(app, exc):
# ... TODO
if __name__ == '__main__':
+ import unittest
unittest.main()
From edd05bb90f66a0dc3c928b410ece77b13d9897d7 Mon Sep 17 00:00:00 2001
From: Luc Saffre
Date: Fri, 15 Mar 2019 20:17:02 +0200
Subject: [PATCH 14/86] http://luc.lino-framework.org/blog/2019/0315.html
---
setup.py | 2 +-
tests/docs1/.static/dummy | 0
tests/docs1/conf.py | 2 ++
tests/docs1/expected/first.html | 3 ++-
tests/docs1/expected/genindex.html | 3 ++-
tests/docs1/expected/index.html | 3 ++-
tests/docs1/expected/rss.xml | 3 ++-
tests/docs1/expected/search.html | 3 ++-
tests/docs1/expected/searchindex.js | 2 +-
tests/docs1/expected/second.html | 3 ++-
tests/test_sphinxfeed.py | 5 +++--
11 files changed, 19 insertions(+), 10 deletions(-)
create mode 100644 tests/docs1/.static/dummy
diff --git a/setup.py b/setup.py
index 26752dd..6dd1f4e 100644
--- a/setup.py
+++ b/setup.py
@@ -3,7 +3,7 @@
requires = [
'Sphinx>=0.6',
- 'feedgen', 'dateutil'
+ 'feedgen', 'python-dateutil'
]
diff --git a/tests/docs1/.static/dummy b/tests/docs1/.static/dummy
new file mode 100644
index 0000000..e69de29
diff --git a/tests/docs1/conf.py b/tests/docs1/conf.py
index 91fab8a..509b8b1 100644
--- a/tests/docs1/conf.py
+++ b/tests/docs1/conf.py
@@ -226,4 +226,6 @@
feed_author = 'Joe Dow'
feed_title = "Joe's blog"
feed_field_name = 'date'
+feed_description = "Joe's blog"
+
diff --git a/tests/docs1/expected/first.html b/tests/docs1/expected/first.html
index 19f9e08..93a0ccb 100644
--- a/tests/docs1/expected/first.html
+++ b/tests/docs1/expected/first.html
@@ -13,6 +13,7 @@
+
@@ -92,7 +93,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 1.8.2
+ Powered by Sphinx 1.8.5+/8def303
& Alabaster 0.7.11
|
diff --git a/tests/docs1/expected/genindex.html b/tests/docs1/expected/genindex.html
index 844a46d..b1164c7 100644
--- a/tests/docs1/expected/genindex.html
+++ b/tests/docs1/expected/genindex.html
@@ -14,6 +14,7 @@
+
@@ -88,7 +89,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 1.8.2
+ Powered by Sphinx 1.8.5+/8def303
& Alabaster 0.7.11
diff --git a/tests/docs1/expected/index.html b/tests/docs1/expected/index.html
index 325b472..3b95a79 100644
--- a/tests/docs1/expected/index.html
+++ b/tests/docs1/expected/index.html
@@ -13,6 +13,7 @@
+
@@ -95,7 +96,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 1.8.2
+ Powered by Sphinx 1.8.5+/8def303
& Alabaster 0.7.11
|
diff --git a/tests/docs1/expected/rss.xml b/tests/docs1/expected/rss.xml
index b1a7af2..5dbbe83 100644
--- a/tests/docs1/expected/rss.xml
+++ b/tests/docs1/expected/rss.xml
@@ -1 +1,2 @@
-First sphinxfeed tester http://news.example.comen 2018 Joe Doe
\ No newline at end of file
+
+First sphinxfeed tester http://news.example.comJoe's blog 2018 Joe Doe http://www.rssboard.org/rss-specification python-feedgen en Fri, 15 Mar 2019 17:25:39 +0000
\ No newline at end of file
diff --git a/tests/docs1/expected/search.html b/tests/docs1/expected/search.html
index 5960b49..e8f876e 100644
--- a/tests/docs1/expected/search.html
+++ b/tests/docs1/expected/search.html
@@ -14,6 +14,7 @@
+
@@ -100,7 +101,7 @@ Related Topics
©2018 Joe Doe.
|
- Powered by Sphinx 1.8.2
+ Powered by Sphinx 1.8.5+/8def303
& Alabaster 0.7.11
diff --git a/tests/docs1/expected/searchindex.js b/tests/docs1/expected/searchindex.js
index 4d12907..9fbbb6b 100644
--- a/tests/docs1/expected/searchindex.js
+++ b/tests/docs1/expected/searchindex.js
@@ -1 +1 @@
-Search.setIndex({docnames:["first","index","second"],envversion:{"sphinx.domains.c":1,"sphinx.domains.changeset":1,"sphinx.domains.cpp":1,"sphinx.domains.javascript":1,"sphinx.domains.math":2,"sphinx.domains.python":1,"sphinx.domains.rst":1,"sphinx.domains.std":1,sphinx:54},filenames:["first.rst","index.rst","second.rst"],objects:{},objnames:{},objtypes:{},terms:{"\u00fcht":[0,2],"esmasp\u00e4ev":[0,2],"k\u00f5iki":[0,2],"k\u00fclastan":[0,2],"p\u00e4ev":[0,2],"teisip\u00e4ev":2,armastan:[0,2],dai:1,emma:[0,2],first:1,iga:[0,2],ikka:[0,2],mina:[0,2],mul:[0,2],neid:[0,2],neist:[0,2],pruuti:[0,2],second:1,seits:[0,2],teres:2},titles:["First day","Joe\u2019s blog","Second day"],titleterms:{blog:1,dai:[0,2],first:0,joe:1,second:2,sitemap:1}})
\ No newline at end of file
+Search.setIndex({docnames:["first","index","second"],envversion:{"sphinx.domains.c":1,"sphinx.domains.changeset":1,"sphinx.domains.cpp":1,"sphinx.domains.javascript":1,"sphinx.domains.math":2,"sphinx.domains.python":1,"sphinx.domains.rst":1,"sphinx.domains.std":1,sphinx:55},filenames:["first.rst","index.rst","second.rst"],objects:{},objnames:{},objtypes:{},terms:{"\u00fcht":[0,2],"esmasp\u00e4ev":[0,2],"k\u00f5iki":[0,2],"k\u00fclastan":[0,2],"p\u00e4ev":[0,2],"teisip\u00e4ev":2,armastan:[0,2],dai:1,emma:[0,2],first:1,iga:[0,2],ikka:[0,2],mina:[0,2],mul:[0,2],neid:[0,2],neist:[0,2],pruuti:[0,2],second:1,seits:[0,2],teres:2},titles:["First day","Joe\u2019s blog","Second day"],titleterms:{blog:1,dai:[0,2],first:0,joe:1,second:2,sitemap:1}})
\ No newline at end of file
diff --git a/tests/docs1/expected/second.html b/tests/docs1/expected/second.html
index f567ada..1be13b3 100644
--- a/tests/docs1/expected/second.html
+++ b/tests/docs1/expected/second.html
@@ -13,6 +13,7 @@
+
@@ -91,7 +92,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 1.8.2
+ Powered by Sphinx 1.8.5+/8def303
& Alabaster 0.7.11
|
diff --git a/tests/test_sphinxfeed.py b/tests/test_sphinxfeed.py
index 0595d5a..cf0770b 100644
--- a/tests/test_sphinxfeed.py
+++ b/tests/test_sphinxfeed.py
@@ -20,9 +20,10 @@ def test_all(self):
args += ["tmp"]
self.run_subprocess(args)
- common = ["rss.xml", "index.html", "first.html",
+ common = ["index.html", "first.html",
"search.html", "genindex.html", "searchindex.js"]
-
+ # common.append("rss.xml")
+
match, mismatch, errors = filecmp.cmpfiles(
"tests/docs1/expected", "tmp", common)
From 6e5bcbd31f6143b00e18fa284a695903debea0f6 Mon Sep 17 00:00:00 2001
From: Luc Saffre
Date: Tue, 26 Mar 2019 23:09:56 +0200
Subject: [PATCH 15/86] http://luc.lino-framework.org/blog/2019/0326.html
---
README.rst | 9 +++++----
setup.py | 21 +++++++++++++--------
2 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/README.rst b/README.rst
index 9defeb0..6166f42 100644
--- a/README.rst
+++ b/README.rst
@@ -1,6 +1,7 @@
-=============================================
-The ``sphinxfeed`` package fork by Luc Saffre
-=============================================
+==========================
+The ``sphinxfeed`` package
+==========================
+
This Sphinx extension is a fork of Fergus Doyle's `sphinxfeed
@@ -14,7 +15,7 @@ instead of the defunct `feedformatter
`_ package or of Django
utils to generate the feed.
-Features added by Luc:
+Features added by Luc Saffre:
- 20190315 : Support Python 3 (by using feedgen instead of feedformatter).
feed_description is no longer optional.
diff --git a/setup.py b/setup.py
index 6dd1f4e..c750213 100644
--- a/setup.py
+++ b/setup.py
@@ -8,20 +8,25 @@
# long_desc = open('README.rst').read()
-long_desc = """ This Sphinx extension is a fork of Fergus Doyle's sphinxfeed
-package which itself is derived from Dan Mackinlay's
+long_desc = """This Sphinx extension is a fork of Fergus Doyle's `sphinxfeed
+package `__
+which itself is derived from Dan Mackinlay's
`sphinxcontrib.feed
`_
-package. It relies on the `feedformatter
- `_ package instead of Django
+package. It relies on
+Lars Kiesow's `python-feedgen `__ package
+instead of the defunct `feedformatter
+ `_ package or of Django
utils to generate the feed.
-Features added by Luc:
+Features added by Luc Saffre:
+
+- 20190315 : Support Python 3 (by using feedgen instead of feedformatter).
+ feed_description is no longer optional.
- new config variable feed_field_name to change the name of the field
to use for specifying the publication date.
- don't publish items whose publication datetime is in the future.
-- Support Python 3 (by using feedgen instead of feedformatter)
Usage
-----
@@ -38,9 +43,9 @@
feed_base_url = 'http://YOUR_HOST_URL'
feed_author = 'YOUR NAME'
-
- # optional options
feed_description = "A longer description"
+
+ # optional options
feed_field_name = 'date' # default value is "Publish Date"
"""
From 0dc0fc0e4617e0cfd09f78e1a5ba431fa2ab6f05 Mon Sep 17 00:00:00 2001
From: Luc Saffre
Date: Tue, 9 Apr 2019 19:30:51 +0300
Subject: [PATCH 16/86] http://luc.lino-framework.org/blog/2019/0409.html
---
tests/docs1/expected/first.html | 20 ++++++++++++--------
tests/docs1/expected/genindex.html | 20 ++++++++++++--------
tests/docs1/expected/index.html | 20 ++++++++++++--------
tests/docs1/expected/search.html | 24 +++++++++++++-----------
tests/docs1/expected/searchindex.js | 2 +-
tests/docs1/expected/second.html | 20 ++++++++++++--------
tests/test_sphinxfeed.py | 8 +++++++-
7 files changed, 69 insertions(+), 45 deletions(-)
diff --git a/tests/docs1/expected/first.html b/tests/docs1/expected/first.html
index 93a0ccb..6fa211c 100644
--- a/tests/docs1/expected/first.html
+++ b/tests/docs1/expected/first.html
@@ -1,11 +1,9 @@
-
+
-
-
+
First day — Joe's website
@@ -79,12 +77,18 @@ Quick search
+
+
+
+
+
+
+
+
@@ -93,8 +97,8 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 1.8.5+/8def303
- & Alabaster 0.7.11
+ Powered by Sphinx 2.0.0
+ & Alabaster 0.7.12
|
+
-
-
+
Index — Joe's website
@@ -75,12 +73,18 @@ Quick search
+
+
+
+
+
+
+
+
@@ -89,8 +93,8 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 1.8.5+/8def303
- & Alabaster 0.7.11
+ Powered by Sphinx 2.0.0
+ & Alabaster 0.7.12
diff --git a/tests/docs1/expected/index.html b/tests/docs1/expected/index.html
index 3b95a79..144eeb0 100644
--- a/tests/docs1/expected/index.html
+++ b/tests/docs1/expected/index.html
@@ -1,11 +1,9 @@
-
+
-
-
+
Joe’s blog — Joe's website
@@ -82,12 +80,18 @@ Quick search
+
+
+
+
+
+
+
+
@@ -96,8 +100,8 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 1.8.5+/8def303
- & Alabaster 0.7.11
+ Powered by Sphinx 2.0.0
+ & Alabaster 0.7.12
|
+
-
-
+
Search — Joe's website
@@ -18,11 +16,7 @@
-
-
-
+
@@ -93,6 +87,14 @@ Related Topics
+
+
+
+
+
+
+
+
@@ -101,8 +103,8 @@ Related Topics
©2018 Joe Doe.
|
- Powered by Sphinx 1.8.5+/8def303
- & Alabaster 0.7.11
+ Powered by Sphinx 2.0.0
+ & Alabaster 0.7.12
diff --git a/tests/docs1/expected/searchindex.js b/tests/docs1/expected/searchindex.js
index 9fbbb6b..d2fd767 100644
--- a/tests/docs1/expected/searchindex.js
+++ b/tests/docs1/expected/searchindex.js
@@ -1 +1 @@
-Search.setIndex({docnames:["first","index","second"],envversion:{"sphinx.domains.c":1,"sphinx.domains.changeset":1,"sphinx.domains.cpp":1,"sphinx.domains.javascript":1,"sphinx.domains.math":2,"sphinx.domains.python":1,"sphinx.domains.rst":1,"sphinx.domains.std":1,sphinx:55},filenames:["first.rst","index.rst","second.rst"],objects:{},objnames:{},objtypes:{},terms:{"\u00fcht":[0,2],"esmasp\u00e4ev":[0,2],"k\u00f5iki":[0,2],"k\u00fclastan":[0,2],"p\u00e4ev":[0,2],"teisip\u00e4ev":2,armastan:[0,2],dai:1,emma:[0,2],first:1,iga:[0,2],ikka:[0,2],mina:[0,2],mul:[0,2],neid:[0,2],neist:[0,2],pruuti:[0,2],second:1,seits:[0,2],teres:2},titles:["First day","Joe\u2019s blog","Second day"],titleterms:{blog:1,dai:[0,2],first:0,joe:1,second:2,sitemap:1}})
\ No newline at end of file
+Search.setIndex({docnames:["first","index","second"],envversion:{"sphinx.domains.c":1,"sphinx.domains.changeset":1,"sphinx.domains.cpp":1,"sphinx.domains.javascript":1,"sphinx.domains.math":2,"sphinx.domains.python":1,"sphinx.domains.rst":1,"sphinx.domains.std":1,sphinx:56},filenames:["first.rst","index.rst","second.rst"],objects:{},objnames:{},objtypes:{},terms:{"\u00fcht":[0,2],"esmasp\u00e4ev":[0,2],"k\u00f5iki":[0,2],"k\u00fclastan":[0,2],"p\u00e4ev":[0,2],"teisip\u00e4ev":2,armastan:[0,2],dai:1,emma:[0,2],first:1,iga:[0,2],ikka:[0,2],mina:[0,2],mul:[0,2],neid:[0,2],neist:[0,2],pruuti:[0,2],second:1,seits:[0,2],teres:2},titles:["First day","Joe\u2019s blog","Second day"],titleterms:{blog:1,dai:[0,2],first:0,joe:1,second:2,sitemap:1}})
\ No newline at end of file
diff --git a/tests/docs1/expected/second.html b/tests/docs1/expected/second.html
index 1be13b3..fcf4ed7 100644
--- a/tests/docs1/expected/second.html
+++ b/tests/docs1/expected/second.html
@@ -1,11 +1,9 @@
-
+
-
-
+
Second day — Joe's website
@@ -78,12 +76,18 @@ Quick search
+
+
+
+
+
+
+
+
@@ -92,8 +96,8 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 1.8.5+/8def303
- & Alabaster 0.7.11
+ Powered by Sphinx 2.0.0
+ & Alabaster 0.7.12
|
Date: Tue, 11 Jun 2019 14:50:58 +0300
Subject: [PATCH 17/86] Adapt to new Sphinx version
---
tests/docs1/expected/first.html | 6 +++---
tests/docs1/expected/genindex.html | 6 +++---
tests/docs1/expected/index.html | 6 +++---
tests/docs1/expected/search.html | 2 +-
tests/docs1/expected/searchindex.js | 2 +-
tests/docs1/expected/second.html | 6 +++---
tests/test_sphinxfeed.py | 2 +-
7 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/tests/docs1/expected/first.html b/tests/docs1/expected/first.html
index 6fa211c..ef67ea7 100644
--- a/tests/docs1/expected/first.html
+++ b/tests/docs1/expected/first.html
@@ -72,10 +72,10 @@ Related Topics
-
Quick search
+
Quick search
@@ -97,7 +97,7 @@
Quick search
©2018 Joe Doe.
|
- Powered by
Sphinx 2.0.0
+ Powered by
Sphinx 2.1.0
&
Alabaster 0.7.12
|
diff --git a/tests/docs1/expected/genindex.html b/tests/docs1/expected/genindex.html
index c5ffbdd..0484d08 100644
--- a/tests/docs1/expected/genindex.html
+++ b/tests/docs1/expected/genindex.html
@@ -68,10 +68,10 @@
Related Topics
diff --git a/tests/docs1/expected/index.html b/tests/docs1/expected/index.html
index 144eeb0..16fd650 100644
--- a/tests/docs1/expected/index.html
+++ b/tests/docs1/expected/index.html
@@ -75,10 +75,10 @@ Related Topics
-
Quick search
+
Quick search
@@ -100,7 +100,7 @@
Quick search
©2018 Joe Doe.
|
- Powered by
Sphinx 2.0.0
+ Powered by
Sphinx 2.1.0
&
Alabaster 0.7.12
|
diff --git a/tests/docs1/expected/search.html b/tests/docs1/expected/search.html
index b863ba3..bdf04cf 100644
--- a/tests/docs1/expected/search.html
+++ b/tests/docs1/expected/search.html
@@ -103,7 +103,7 @@
Related Topics
©2018 Joe Doe.
|
- Powered by
Sphinx 2.0.0
+ Powered by
Sphinx 2.1.0
&
Alabaster 0.7.12
diff --git a/tests/docs1/expected/searchindex.js b/tests/docs1/expected/searchindex.js
index d2fd767..7ce8e70 100644
--- a/tests/docs1/expected/searchindex.js
+++ b/tests/docs1/expected/searchindex.js
@@ -1 +1 @@
-Search.setIndex({docnames:["first","index","second"],envversion:{"sphinx.domains.c":1,"sphinx.domains.changeset":1,"sphinx.domains.cpp":1,"sphinx.domains.javascript":1,"sphinx.domains.math":2,"sphinx.domains.python":1,"sphinx.domains.rst":1,"sphinx.domains.std":1,sphinx:56},filenames:["first.rst","index.rst","second.rst"],objects:{},objnames:{},objtypes:{},terms:{"\u00fcht":[0,2],"esmasp\u00e4ev":[0,2],"k\u00f5iki":[0,2],"k\u00fclastan":[0,2],"p\u00e4ev":[0,2],"teisip\u00e4ev":2,armastan:[0,2],dai:1,emma:[0,2],first:1,iga:[0,2],ikka:[0,2],mina:[0,2],mul:[0,2],neid:[0,2],neist:[0,2],pruuti:[0,2],second:1,seits:[0,2],teres:2},titles:["First day","Joe\u2019s blog","Second day"],titleterms:{blog:1,dai:[0,2],first:0,joe:1,second:2,sitemap:1}})
\ No newline at end of file
+Search.setIndex({docnames:["first","index","second"],envversion:{"sphinx.domains.c":1,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":1,"sphinx.domains.javascript":1,"sphinx.domains.math":2,"sphinx.domains.python":1,"sphinx.domains.rst":1,"sphinx.domains.std":1,sphinx:56},filenames:["first.rst","index.rst","second.rst"],objects:{},objnames:{},objtypes:{},terms:{"\u00fcht":[0,2],"esmasp\u00e4ev":[0,2],"k\u00f5iki":[0,2],"k\u00fclastan":[0,2],"p\u00e4ev":[0,2],"teisip\u00e4ev":2,armastan:[0,2],dai:1,emma:[0,2],first:1,iga:[0,2],ikka:[0,2],mina:[0,2],mul:[0,2],neid:[0,2],neist:[0,2],pruuti:[0,2],second:1,seits:[0,2],teres:2},titles:["First day","Joe\u2019s blog","Second day"],titleterms:{blog:1,dai:[0,2],first:0,joe:1,second:2,sitemap:1}})
\ No newline at end of file
diff --git a/tests/docs1/expected/second.html b/tests/docs1/expected/second.html
index fcf4ed7..a028671 100644
--- a/tests/docs1/expected/second.html
+++ b/tests/docs1/expected/second.html
@@ -71,10 +71,10 @@ Related Topics
-
Quick search
+
Quick search
@@ -96,7 +96,7 @@
Quick search
©2018 Joe Doe.
|
- Powered by
Sphinx 2.0.0
+ Powered by
Sphinx 2.1.0
&
Alabaster 0.7.12
|
diff --git a/tests/test_sphinxfeed.py b/tests/test_sphinxfeed.py
index adb8b7d..2f28e48 100644
--- a/tests/test_sphinxfeed.py
+++ b/tests/test_sphinxfeed.py
@@ -16,7 +16,7 @@ def test_all(self):
and if there is no other changes, update the expected files::
- $ cp tmp/*.html *.js tests/docs1/expected
+ $ cp tmp/*.html tmp/*.js tests/docs1/expected
"""
args = ['sphinx-build']
From 0af23b4e0c13bbb0a9396382cc70d834438b3728 Mon Sep 17 00:00:00 2001
From: Luc Saffre
Date: Mon, 1 Jul 2019 03:30:52 +0300
Subject: [PATCH 18/86] http://luc.lino-framework.org/blog/2019/0701.html
---
setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index c750213..8614a96 100644
--- a/setup.py
+++ b/setup.py
@@ -53,7 +53,7 @@
SETUP_INFO = dict(
name='sphinxfeed',
version='0.3',
- license='BSD',
+ license='BSD-2-Clause',
author='Luc Saffre',
author_email='luc.saffre@gmail.com',
url='https://github.com/lsaffre/sphinxfeed',
From 357f0df5d285550114083bb56e0313a4d665f52a Mon Sep 17 00:00:00 2001
From: Luc Saffre
Date: Thu, 19 Sep 2019 11:28:25 +0300
Subject: [PATCH 19/86] Sphinx version 2.2 is out
---
tests/docs1/expected/first.html | 2 +-
tests/docs1/expected/genindex.html | 2 +-
tests/docs1/expected/index.html | 2 +-
tests/docs1/expected/search.html | 4 ++--
tests/docs1/expected/second.html | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/tests/docs1/expected/first.html b/tests/docs1/expected/first.html
index ef67ea7..0da3204 100644
--- a/tests/docs1/expected/first.html
+++ b/tests/docs1/expected/first.html
@@ -97,7 +97,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 2.1.0
+ Powered by Sphinx 2.2.0
& Alabaster 0.7.12
|
diff --git a/tests/docs1/expected/genindex.html b/tests/docs1/expected/genindex.html
index 0484d08..3679688 100644
--- a/tests/docs1/expected/genindex.html
+++ b/tests/docs1/expected/genindex.html
@@ -93,7 +93,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 2.1.0
+ Powered by Sphinx 2.2.0
& Alabaster 0.7.12
diff --git a/tests/docs1/expected/index.html b/tests/docs1/expected/index.html
index 16fd650..ca599e0 100644
--- a/tests/docs1/expected/index.html
+++ b/tests/docs1/expected/index.html
@@ -100,7 +100,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 2.1.0
+ Powered by Sphinx 2.2.0
& Alabaster 0.7.12
|
diff --git a/tests/docs1/expected/search.html b/tests/docs1/expected/search.html
index bdf04cf..a2c7593 100644
--- a/tests/docs1/expected/search.html
+++ b/tests/docs1/expected/search.html
@@ -50,7 +50,7 @@ Search
containing fewer words won't appear in the result list.
@@ -103,7 +103,7 @@ Related Topics
©2018 Joe Doe.
|
- Powered by Sphinx 2.1.0
+ Powered by Sphinx 2.2.0
& Alabaster 0.7.12
diff --git a/tests/docs1/expected/second.html b/tests/docs1/expected/second.html
index a028671..4a97bef 100644
--- a/tests/docs1/expected/second.html
+++ b/tests/docs1/expected/second.html
@@ -96,7 +96,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 2.1.0
+ Powered by Sphinx 2.2.0
& Alabaster 0.7.12
|
From f3000b0dc08458eea38dcd20a4118246a8e0e152 Mon Sep 17 00:00:00 2001
From: Luc Saffre
Date: Sat, 7 Mar 2020 17:28:43 +0200
Subject: [PATCH 20/86] pubDate now localtime()
---
sphinxfeed.py | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/sphinxfeed.py b/sphinxfeed.py
index ea63f1c..50794a7 100644
--- a/sphinxfeed.py
+++ b/sphinxfeed.py
@@ -40,11 +40,11 @@ def setup(app):
app.add_config_value('feed_author', '', 'html')
app.add_config_value('feed_field_name', 'Publish Date', 'env')
app.add_config_value('feed_filename', 'rss.xml', 'html')
-
+
app.connect('html-page-context', create_feed_item)
app.connect('build-finished', emit_feed)
app.connect('builder-inited', create_feed_container)
-
+
#env.process_metadata deletes most of the docinfo, and dates
#in particular.
@@ -55,7 +55,7 @@ def create_feed_container(app):
feed.link(href=app.config.feed_base_url)
feed.author(dict(name=app.config.feed_author))
feed.description(app.config.feed_description)
-
+
if app.config.language:
feed.language(app.config.language)
if app.config.copyright:
@@ -67,7 +67,7 @@ def create_feed_container(app):
def create_feed_item(app, pagename, templatename, ctx, doctree):
""" Here we have access to nice HTML fragments to use in, say, an RSS feed.
"""
-
+
env = app.builder.env
metadata = app.builder.env.metadata.get(pagename, {})
@@ -77,7 +77,8 @@ def create_feed_item(app, pagename, templatename, ctx, doctree):
pubDate = parse_pubdate(pubDate)
- if pubDate > time.gmtime():
+ if pubDate > time.localtime():
+ # raise Exception("20200131 {} > {}".format(pubDate, time.gmtime()))
return
if not ctx.get('body') or not ctx.get('title'):
@@ -98,7 +99,7 @@ def create_feed_item(app, pagename, templatename, ctx, doctree):
#Additionally, we might like to provide our templates with a way to link to the rss output file
ctx['rss_link'] = app.config.feed_base_url + '/' + app.config.feed_filename
-
+
def emit_feed(app, exc):
ordered_items = list(app.builder.env.feed_items.values())
feed = app.builder.env.feed_feed
@@ -108,17 +109,17 @@ def emit_feed(app, exc):
feed.add_entry(item) # prepends the item
# for k, v in item.items():
# getattr(e, k)(v)
-
+
path = os.path.join(app.builder.outdir,
app.config.feed_filename)
# print(20190315, path)
feed.rss_file(path)
-
+
return
# LS 20180204 The following code (pickle the environment and check
# consistency at this point) caused an error when also bibtex was
# installed. I deactivated it since I don't know why it's needed.
-
+
from os import path
from sphinx.application import ENV_PICKLE_FILENAME
from sphinx.util.console import bold
@@ -127,7 +128,7 @@ def emit_feed(app, exc):
builder.info(bold('pickling environment... '), nonl=True)
builder.env.topickle(path.join(builder.doctreedir, ENV_PICKLE_FILENAME))
builder.info('done')
-
+
# global actions
builder.info(bold('checking consistency... '), nonl=True)
builder.env.check_consistency()
From 354c9416c54976f031ccdc17c80d61da4e48a474 Mon Sep 17 00:00:00 2001
From: Luc Saffre
Date: Tue, 21 Apr 2020 20:21:34 +0300
Subject: [PATCH 21/86] adapted tests to new sphinx version
---
tests/docs1/expected/first.html | 16 ++++++++--------
tests/docs1/expected/genindex.html | 16 ++++++++--------
tests/docs1/expected/index.html | 16 ++++++++--------
tests/docs1/expected/search.html | 26 ++++++++++++--------------
tests/docs1/expected/searchindex.js | 2 +-
tests/docs1/expected/second.html | 16 ++++++++--------
6 files changed, 45 insertions(+), 47 deletions(-)
diff --git a/tests/docs1/expected/first.html b/tests/docs1/expected/first.html
index 0da3204..0b10002 100644
--- a/tests/docs1/expected/first.html
+++ b/tests/docs1/expected/first.html
@@ -1,17 +1,17 @@
-
+
First day — Joe's website
-
-
-
-
-
+
+
+
+
+
@@ -80,7 +80,7 @@ Quick search
-
+
@@ -97,7 +97,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 2.2.0
+ Powered by Sphinx 3.0.1
& Alabaster 0.7.12
|
diff --git a/tests/docs1/expected/genindex.html b/tests/docs1/expected/genindex.html
index 3679688..411d967 100644
--- a/tests/docs1/expected/genindex.html
+++ b/tests/docs1/expected/genindex.html
@@ -2,17 +2,17 @@
-
+
Index — Joe's website
-
-
-
-
-
+
+
+
+
+
@@ -76,7 +76,7 @@ Quick search
-
+
@@ -93,7 +93,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 2.2.0
+ Powered by Sphinx 3.0.1
& Alabaster 0.7.12
diff --git a/tests/docs1/expected/index.html b/tests/docs1/expected/index.html
index ca599e0..b7546b5 100644
--- a/tests/docs1/expected/index.html
+++ b/tests/docs1/expected/index.html
@@ -1,17 +1,17 @@
-
+
Joe’s blog — Joe's website
-
-
-
-
-
+
+
+
+
+
@@ -83,7 +83,7 @@ Quick search
-
+
@@ -100,7 +100,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 2.2.0
+ Powered by Sphinx 3.0.1
& Alabaster 0.7.12
|
diff --git a/tests/docs1/expected/search.html b/tests/docs1/expected/search.html
index a2c7593..0b8a9a9 100644
--- a/tests/docs1/expected/search.html
+++ b/tests/docs1/expected/search.html
@@ -1,22 +1,22 @@
-
+
Search — Joe's website
-
-
-
-
-
-
+
+
+
+
+
+
-
+
@@ -37,17 +37,15 @@
Search
-
+
Please activate JavaScript to enable the search
functionality.
- From here you can search these documents. Enter your search
- words into the box below and click "search". Note that the search
- function will automatically search for all of the words. Pages
- containing fewer words won't appear in the result list.
+ Searching for multiple words only shows matches that contain
+ all words.
-
+
@@ -96,7 +96,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 2.2.0
+ Powered by Sphinx 3.0.1
& Alabaster 0.7.12
|
From 0a0ffe3d28292b08db2e48ebfe5a5e87d1073a8d Mon Sep 17 00:00:00 2001
From: Luc Saffre
Date: Fri, 1 May 2020 02:50:05 +0300
Subject: [PATCH 22/86] adapt tests to Sphinx 3.0.3
---
tests/docs1/expected/first.html | 2 +-
tests/docs1/expected/genindex.html | 2 +-
tests/docs1/expected/index.html | 2 +-
tests/docs1/expected/search.html | 2 +-
tests/docs1/expected/second.html | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/tests/docs1/expected/first.html b/tests/docs1/expected/first.html
index 0b10002..6e87bc3 100644
--- a/tests/docs1/expected/first.html
+++ b/tests/docs1/expected/first.html
@@ -97,7 +97,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 3.0.1
+ Powered by Sphinx 3.0.3
& Alabaster 0.7.12
|
diff --git a/tests/docs1/expected/genindex.html b/tests/docs1/expected/genindex.html
index 411d967..88197b3 100644
--- a/tests/docs1/expected/genindex.html
+++ b/tests/docs1/expected/genindex.html
@@ -93,7 +93,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 3.0.1
+ Powered by Sphinx 3.0.3
& Alabaster 0.7.12
diff --git a/tests/docs1/expected/index.html b/tests/docs1/expected/index.html
index b7546b5..0107d79 100644
--- a/tests/docs1/expected/index.html
+++ b/tests/docs1/expected/index.html
@@ -100,7 +100,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 3.0.1
+ Powered by Sphinx 3.0.3
& Alabaster 0.7.12
|
diff --git a/tests/docs1/expected/search.html b/tests/docs1/expected/search.html
index 0b8a9a9..2a7149f 100644
--- a/tests/docs1/expected/search.html
+++ b/tests/docs1/expected/search.html
@@ -101,7 +101,7 @@ Related Topics
©2018 Joe Doe.
|
- Powered by Sphinx 3.0.1
+ Powered by Sphinx 3.0.3
& Alabaster 0.7.12
diff --git a/tests/docs1/expected/second.html b/tests/docs1/expected/second.html
index 144970f..3e25740 100644
--- a/tests/docs1/expected/second.html
+++ b/tests/docs1/expected/second.html
@@ -96,7 +96,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 3.0.1
+ Powered by Sphinx 3.0.3
& Alabaster 0.7.12
|
From 3256f7b3d2cec297ae43cde71766dc318ca07710 Mon Sep 17 00:00:00 2001
From: Luc Saffre
Date: Tue, 25 Aug 2020 23:01:08 +0300
Subject: [PATCH 23/86] adapt tests to new Sphinx version number
---
tests/docs1/expected/first.html | 3 ++-
tests/docs1/expected/genindex.html | 4 ++--
tests/docs1/expected/index.html | 3 ++-
tests/docs1/expected/search.html | 3 ++-
tests/docs1/expected/searchindex.js | 2 +-
tests/docs1/expected/second.html | 3 ++-
6 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/tests/docs1/expected/first.html b/tests/docs1/expected/first.html
index 6e87bc3..c06b981 100644
--- a/tests/docs1/expected/first.html
+++ b/tests/docs1/expected/first.html
@@ -4,6 +4,7 @@
+
First day — Joe's website
@@ -97,7 +98,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 3.0.3
+ Powered by Sphinx 3.2.1
& Alabaster 0.7.12
|
diff --git a/tests/docs1/expected/genindex.html b/tests/docs1/expected/genindex.html
index 88197b3..50f70ff 100644
--- a/tests/docs1/expected/genindex.html
+++ b/tests/docs1/expected/genindex.html
@@ -1,10 +1,10 @@
-
+
Index — Joe's website
@@ -93,7 +93,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 3.0.3
+ Powered by Sphinx 3.2.1
& Alabaster 0.7.12
diff --git a/tests/docs1/expected/index.html b/tests/docs1/expected/index.html
index 0107d79..fad6011 100644
--- a/tests/docs1/expected/index.html
+++ b/tests/docs1/expected/index.html
@@ -4,6 +4,7 @@
+
Joe’s blog — Joe's website
@@ -100,7 +101,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 3.0.3
+ Powered by Sphinx 3.2.1
& Alabaster 0.7.12
|
diff --git a/tests/docs1/expected/search.html b/tests/docs1/expected/search.html
index 2a7149f..a676726 100644
--- a/tests/docs1/expected/search.html
+++ b/tests/docs1/expected/search.html
@@ -4,6 +4,7 @@
+
Search — Joe's website
@@ -101,7 +102,7 @@ Related Topics
©2018 Joe Doe.
|
- Powered by Sphinx 3.0.3
+ Powered by Sphinx 3.2.1
& Alabaster 0.7.12
diff --git a/tests/docs1/expected/searchindex.js b/tests/docs1/expected/searchindex.js
index 3bfb233..e507215 100644
--- a/tests/docs1/expected/searchindex.js
+++ b/tests/docs1/expected/searchindex.js
@@ -1 +1 @@
-Search.setIndex({docnames:["first","index","second"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":2,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":1,sphinx:56},filenames:["first.rst","index.rst","second.rst"],objects:{},objnames:{},objtypes:{},terms:{"\u00fcht":[0,2],"esmasp\u00e4ev":[0,2],"k\u00f5iki":[0,2],"k\u00fclastan":[0,2],"p\u00e4ev":[0,2],"teisip\u00e4ev":2,armastan:[0,2],dai:1,emma:[0,2],first:1,iga:[0,2],ikka:[0,2],mina:[0,2],mul:[0,2],neid:[0,2],neist:[0,2],pruuti:[0,2],second:1,seits:[0,2],teres:2},titles:["First day","Joe\u2019s blog","Second day"],titleterms:{blog:1,dai:[0,2],first:0,joe:1,second:2,sitemap:1}})
\ No newline at end of file
+Search.setIndex({docnames:["first","index","second"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":1,sphinx:56},filenames:["first.rst","index.rst","second.rst"],objects:{},objnames:{},objtypes:{},terms:{"\u00fcht":[0,2],"esmasp\u00e4ev":[0,2],"k\u00f5iki":[0,2],"k\u00fclastan":[0,2],"p\u00e4ev":[0,2],"teisip\u00e4ev":2,armastan:[0,2],dai:1,emma:[0,2],first:1,iga:[0,2],ikka:[0,2],mina:[0,2],mul:[0,2],neid:[0,2],neist:[0,2],pruuti:[0,2],second:1,seits:[0,2],teres:2},titles:["First day","Joe\u2019s blog","Second day"],titleterms:{blog:1,dai:[0,2],first:0,joe:1,second:2,sitemap:1}})
\ No newline at end of file
diff --git a/tests/docs1/expected/second.html b/tests/docs1/expected/second.html
index 3e25740..15fa300 100644
--- a/tests/docs1/expected/second.html
+++ b/tests/docs1/expected/second.html
@@ -4,6 +4,7 @@
+
Second day — Joe's website
@@ -96,7 +97,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 3.0.3
+ Powered by Sphinx 3.2.1
& Alabaster 0.7.12
|
From b12851abbb6c3a1ca013a043aba5b88de6071eba Mon Sep 17 00:00:00 2001
From: Luc Saffre
Date: Sun, 3 Jan 2021 12:35:40 +0200
Subject: [PATCH 24/86] adapt test to new sphinx version
---
tests/docs1/expected/first.html | 5 ++---
tests/docs1/expected/genindex.html | 5 ++---
tests/docs1/expected/index.html | 5 ++---
tests/docs1/expected/search.html | 6 +++---
tests/docs1/expected/second.html | 5 ++---
5 files changed, 11 insertions(+), 15 deletions(-)
diff --git a/tests/docs1/expected/first.html b/tests/docs1/expected/first.html
index c06b981..86fcfc0 100644
--- a/tests/docs1/expected/first.html
+++ b/tests/docs1/expected/first.html
@@ -6,13 +6,12 @@
First day — Joe's website
-
+
-
@@ -98,7 +97,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 3.2.1
+ Powered by Sphinx 3.4.1
& Alabaster 0.7.12
|
diff --git a/tests/docs1/expected/genindex.html b/tests/docs1/expected/genindex.html
index 50f70ff..d2b29f0 100644
--- a/tests/docs1/expected/genindex.html
+++ b/tests/docs1/expected/genindex.html
@@ -6,13 +6,12 @@
Index — Joe's website
-
+
-
@@ -93,7 +92,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 3.2.1
+ Powered by Sphinx 3.4.1
& Alabaster 0.7.12
diff --git a/tests/docs1/expected/index.html b/tests/docs1/expected/index.html
index fad6011..ed3f4bc 100644
--- a/tests/docs1/expected/index.html
+++ b/tests/docs1/expected/index.html
@@ -6,13 +6,12 @@
Joe’s blog — Joe's website
-
+
-
@@ -101,7 +100,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 3.2.1
+ Powered by Sphinx 3.4.1
& Alabaster 0.7.12
|
diff --git a/tests/docs1/expected/search.html b/tests/docs1/expected/search.html
index a676726..8c7f64e 100644
--- a/tests/docs1/expected/search.html
+++ b/tests/docs1/expected/search.html
@@ -6,15 +6,15 @@
Search — Joe's website
-
+
-
+
@@ -102,7 +102,7 @@ Related Topics
©2018 Joe Doe.
|
- Powered by Sphinx 3.2.1
+ Powered by Sphinx 3.4.1
& Alabaster 0.7.12
diff --git a/tests/docs1/expected/second.html b/tests/docs1/expected/second.html
index 15fa300..f247933 100644
--- a/tests/docs1/expected/second.html
+++ b/tests/docs1/expected/second.html
@@ -6,13 +6,12 @@
Second day — Joe's website
-
+
-
@@ -97,7 +96,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 3.2.1
+ Powered by Sphinx 3.4.1
& Alabaster 0.7.12
|
From 94efdce8946d179fe558dcc19b072031ceee0abb Mon Sep 17 00:00:00 2001
From: Luc Saffre
Date: Wed, 6 Jan 2021 01:16:53 +0200
Subject: [PATCH 25/86] adapt for sphinx 3.4.2
---
tests/docs1/expected/first.html | 2 +-
tests/docs1/expected/genindex.html | 2 +-
tests/docs1/expected/index.html | 2 +-
tests/docs1/expected/search.html | 2 +-
tests/docs1/expected/second.html | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/tests/docs1/expected/first.html b/tests/docs1/expected/first.html
index 86fcfc0..ebc1df1 100644
--- a/tests/docs1/expected/first.html
+++ b/tests/docs1/expected/first.html
@@ -97,7 +97,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 3.4.1
+ Powered by Sphinx 3.4.2
& Alabaster 0.7.12
|
diff --git a/tests/docs1/expected/genindex.html b/tests/docs1/expected/genindex.html
index d2b29f0..f4e381d 100644
--- a/tests/docs1/expected/genindex.html
+++ b/tests/docs1/expected/genindex.html
@@ -92,7 +92,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 3.4.1
+ Powered by Sphinx 3.4.2
& Alabaster 0.7.12
diff --git a/tests/docs1/expected/index.html b/tests/docs1/expected/index.html
index ed3f4bc..949677f 100644
--- a/tests/docs1/expected/index.html
+++ b/tests/docs1/expected/index.html
@@ -100,7 +100,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 3.4.1
+ Powered by Sphinx 3.4.2
& Alabaster 0.7.12
|
diff --git a/tests/docs1/expected/search.html b/tests/docs1/expected/search.html
index 8c7f64e..c174358 100644
--- a/tests/docs1/expected/search.html
+++ b/tests/docs1/expected/search.html
@@ -102,7 +102,7 @@ Related Topics
©2018 Joe Doe.
|
- Powered by Sphinx 3.4.1
+ Powered by Sphinx 3.4.2
& Alabaster 0.7.12
diff --git a/tests/docs1/expected/second.html b/tests/docs1/expected/second.html
index f247933..33aca79 100644
--- a/tests/docs1/expected/second.html
+++ b/tests/docs1/expected/second.html
@@ -96,7 +96,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 3.4.1
+ Powered by Sphinx 3.4.2
& Alabaster 0.7.12
|
From 89893adadf1a74e1a3143967a9131d3998178226 Mon Sep 17 00:00:00 2001
From: Luc Saffre
Date: Sun, 25 Apr 2021 19:11:48 +0300
Subject: [PATCH 26/86] fix redirected urls
---
tasks.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tasks.py b/tasks.py
index 37ea918..5aed377 100644
--- a/tasks.py
+++ b/tasks.py
@@ -1,7 +1,7 @@
from atelier.invlib import setup_from_tasks
ns = setup_from_tasks(
globals(), "sphinxfeed",
- blogref_url="http://luc.lino-framework.org",
+ blogref_url="https://luc.lino-framework.org",
revision_control_system='git',
# tolerate_sphinx_warnings=True,
cleanable_files=[])
From 4f1ac13508d00928717a7f37b02dc9cde10e7960 Mon Sep 17 00:00:00 2001
From: Luc Saffre
Date: Sun, 13 Jun 2021 03:51:47 +0300
Subject: [PATCH 27/86] adapt to new Sphinx version
---
tests/docs1/expected/first.html | 8 ++++----
tests/docs1/expected/genindex.html | 8 ++++----
tests/docs1/expected/index.html | 8 ++++----
tests/docs1/expected/search.html | 16 ++++++++++++----
tests/docs1/expected/searchindex.js | 2 +-
tests/docs1/expected/second.html | 8 ++++----
tests/test_sphinxfeed.py | 28 +++++++++++++++-------------
7 files changed, 44 insertions(+), 34 deletions(-)
diff --git a/tests/docs1/expected/first.html b/tests/docs1/expected/first.html
index ebc1df1..71b3143 100644
--- a/tests/docs1/expected/first.html
+++ b/tests/docs1/expected/first.html
@@ -6,9 +6,9 @@
First day — Joe's website
-
-
-
+
+
+
@@ -97,7 +97,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 3.4.2
+ Powered by Sphinx 4.0.2
& Alabaster 0.7.12
|
diff --git a/tests/docs1/expected/genindex.html b/tests/docs1/expected/genindex.html
index f4e381d..7924887 100644
--- a/tests/docs1/expected/genindex.html
+++ b/tests/docs1/expected/genindex.html
@@ -6,9 +6,9 @@
Index — Joe's website
-
-
-
+
+
+
@@ -92,7 +92,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 3.4.2
+ Powered by Sphinx 4.0.2
& Alabaster 0.7.12
diff --git a/tests/docs1/expected/index.html b/tests/docs1/expected/index.html
index 949677f..44e8f8d 100644
--- a/tests/docs1/expected/index.html
+++ b/tests/docs1/expected/index.html
@@ -6,9 +6,9 @@
Joe’s blog — Joe's website
-
-
-
+
+
+
@@ -100,7 +100,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 3.4.2
+ Powered by Sphinx 4.0.2
& Alabaster 0.7.12
|
diff --git a/tests/docs1/expected/search.html b/tests/docs1/expected/search.html
index c174358..c141977 100644
--- a/tests/docs1/expected/search.html
+++ b/tests/docs1/expected/search.html
@@ -6,10 +6,10 @@
Search — Joe's website
-
-
+
+
-
+
@@ -37,6 +37,7 @@
Search
+
@@ -44,19 +45,26 @@
Search
functionality.
+
+
Searching for multiple words only shows matches that contain
all words.
+
+
+
+
+
@@ -102,7 +110,7 @@ Related Topics
©2018 Joe Doe.
|
- Powered by Sphinx 3.4.2
+ Powered by Sphinx 4.0.2
& Alabaster 0.7.12
diff --git a/tests/docs1/expected/searchindex.js b/tests/docs1/expected/searchindex.js
index e507215..d21512e 100644
--- a/tests/docs1/expected/searchindex.js
+++ b/tests/docs1/expected/searchindex.js
@@ -1 +1 @@
-Search.setIndex({docnames:["first","index","second"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":1,sphinx:56},filenames:["first.rst","index.rst","second.rst"],objects:{},objnames:{},objtypes:{},terms:{"\u00fcht":[0,2],"esmasp\u00e4ev":[0,2],"k\u00f5iki":[0,2],"k\u00fclastan":[0,2],"p\u00e4ev":[0,2],"teisip\u00e4ev":2,armastan:[0,2],dai:1,emma:[0,2],first:1,iga:[0,2],ikka:[0,2],mina:[0,2],mul:[0,2],neid:[0,2],neist:[0,2],pruuti:[0,2],second:1,seits:[0,2],teres:2},titles:["First day","Joe\u2019s blog","Second day"],titleterms:{blog:1,dai:[0,2],first:0,joe:1,second:2,sitemap:1}})
\ No newline at end of file
+Search.setIndex({docnames:["first","index","second"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":3,"sphinx.domains.rst":2,"sphinx.domains.std":2,sphinx:56},filenames:["first.rst","index.rst","second.rst"],objects:{},objnames:{},objtypes:{},terms:{"\u00fcht":[0,2],"esmasp\u00e4ev":[0,2],"k\u00f5iki":[0,2],"k\u00fclastan":[0,2],"p\u00e4ev":[0,2],"teisip\u00e4ev":2,armastan:[0,2],dai:1,emma:[0,2],first:1,iga:[0,2],ikka:[0,2],ja:[0,2],mina:[0,2],mul:[0,2],neid:[0,2],neist:[0,2],pruuti:[0,2],second:1,seits:[0,2],teres:2},titles:["First day","Joe\u2019s blog","Second day"],titleterms:{blog:1,dai:[0,2],first:0,joe:1,s:1,second:2,sitemap:1}})
\ No newline at end of file
diff --git a/tests/docs1/expected/second.html b/tests/docs1/expected/second.html
index 33aca79..5ae8ee6 100644
--- a/tests/docs1/expected/second.html
+++ b/tests/docs1/expected/second.html
@@ -6,9 +6,9 @@
Second day — Joe's website
-
-
-
+
+
+
@@ -96,7 +96,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 3.4.2
+ Powered by Sphinx 4.0.2
& Alabaster 0.7.12
|
diff --git a/tests/test_sphinxfeed.py b/tests/test_sphinxfeed.py
index 2f28e48..f4803f2 100644
--- a/tests/test_sphinxfeed.py
+++ b/tests/test_sphinxfeed.py
@@ -1,24 +1,26 @@
# -*- coding: UTF-8 -*-
-# Copyright 2018-2019 Rumma & Ko Ltd
+# Copyright 2018-2021 Rumma & Ko Ltd
-import filecmp
-from atelier.test import TestCase
+"""
+Run a sphinx-build and then check whether the generated files (in
+`tmp`) are the same as in `expected`.
-class AllTests(TestCase):
- def test_all(self):
- """
- Run a sphinx-build and then check whether the generated files (in
- `tmp`) are the same as in `expected`.
+The tests fail when the Sphinx version has changed. In that case::
+
+ $ diff tmp/ tests/docs1/expected
- The tests fail when the Sphinx version has changed. In that case::
+and if there is no other changes, update the expected files::
- $ diff tmp/ tests/docs1/expected
+ $ cp tmp/*.html tmp/*.js tests/docs1/expected
- and if there is no other changes, update the expected files::
+"""
- $ cp tmp/*.html tmp/*.js tests/docs1/expected
- """
+import filecmp
+from atelier.test import TestCase
+
+class AllTests(TestCase):
+ def test_all(self):
args = ['sphinx-build']
args += ["-b"]
args += ["html"]
From 4389e5442d73e345a9d682d20d7d594063b9d019 Mon Sep 17 00:00:00 2001
From: Luc Saffre
Date: Tue, 24 May 2022 14:29:24 +0300
Subject: [PATCH 28/86] sphinxconf moved from atelier to rstgen
---
tests/docs1/conf.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/docs1/conf.py b/tests/docs1/conf.py
index 509b8b1..925cf09 100644
--- a/tests/docs1/conf.py
+++ b/tests/docs1/conf.py
@@ -12,7 +12,7 @@
# serve to show the default value.
# from __future__ import unicode_literals
-# from atelier.sphinxconf import configure
+# from rstgen.sphinxconf import configure
extensions = []
templates_path = []
From 54fb10a5585d44b6a55f6370b8cd1f0dd062a37b Mon Sep 17 00:00:00 2001
From: Luc Saffre
Date: Sun, 10 Jul 2022 19:02:45 +0300
Subject: [PATCH 29/86] respect use_dirhtml option from rstgen when calculating
the url
---
sphinxfeed.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/sphinxfeed.py b/sphinxfeed.py
index 50794a7..5d4db7d 100644
--- a/sphinxfeed.py
+++ b/sphinxfeed.py
@@ -9,6 +9,8 @@
from feedgen.feed import FeedGenerator
from feedgen.feed import FeedEntry
+import rstgen
+
doc_trees = [] # for atelier
@@ -40,6 +42,7 @@ def setup(app):
app.add_config_value('feed_author', '', 'html')
app.add_config_value('feed_field_name', 'Publish Date', 'env')
app.add_config_value('feed_filename', 'rss.xml', 'html')
+ # app.add_config_value('use_dirhtml', False, 'html')
app.connect('html-page-context', create_feed_item)
app.connect('build-finished', emit_feed)
@@ -89,7 +92,10 @@ def create_feed_item(app, pagename, templatename, ctx, doctree):
item = FeedEntry()
item.title(ctx.get('title'))
- item.link(href=app.config.feed_base_url + '/' + ctx['current_page_name'] + ctx['file_suffix'])
+ href = app.config.feed_base_url + '/' + ctx['current_page_name']
+ if not rstgen.get_config_var('use_dirhtml'):
+ href += ctx['file_suffix']
+ item.link(href=href)
item.description(ctx.get('body'))
item.published(pubDate)
From 1f00ad0fac983bae43d1719ca1b71410e8079e8f Mon Sep 17 00:00:00 2001
From: Luc Saffre
Date: Sun, 10 Jul 2022 19:07:10 +0300
Subject: [PATCH 30/86] optimize docs
---
README.rst | 4 +++-
setup.py | 4 +++-
sphinxfeed.py | 3 +++
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/README.rst b/README.rst
index 6166f42..b2b5b49 100644
--- a/README.rst
+++ b/README.rst
@@ -23,6 +23,8 @@ Features added by Luc Saffre:
- new config variable feed_field_name to change the name of the field
to use for specifying the publication date.
- don't publish items whose publication datetime is in the future.
+- respect use_dirhtml option from rstgen when calculating the url
+
Usage
-----
@@ -31,7 +33,7 @@ Usage
``python setup.py install``
#. Add ``sphinxfeed`` to the list of extensions in your ``conf.py``::
-
+
extensions = [..., 'sphinxfeed']
#. Customise the necessary configuration options to correctly generate
diff --git a/setup.py b/setup.py
index 8614a96..2601cef 100644
--- a/setup.py
+++ b/setup.py
@@ -27,6 +27,8 @@
- new config variable feed_field_name to change the name of the field
to use for specifying the publication date.
- don't publish items whose publication datetime is in the future.
+- respect use_dirhtml option from rstgen when calculating the url
+
Usage
-----
@@ -35,7 +37,7 @@
``python setup.py install``
#. Add ``sphinxfeed`` to the list of extensions in your ``conf.py``::
-
+
extensions = [..., 'sphinxfeed']
#. Customise the necessary configuration options to correctly generate
diff --git a/sphinxfeed.py b/sphinxfeed.py
index 5d4db7d..a20a1a8 100644
--- a/sphinxfeed.py
+++ b/sphinxfeed.py
@@ -1,5 +1,8 @@
# This application is derived from Dan Mackinlay's sphinxcontrib.feed package.
# The original can be found at http://bitbucket.org/birkenfeld/sphinx-contrib/src/tip/feed/
+"""
+See https://github.com/lsaffre/sphinxfeed
+"""
import os.path
import time
From 26ce81045b5a72d59161129ba500a57488609aa9 Mon Sep 17 00:00:00 2001
From: Luc Saffre
Date: Tue, 6 Sep 2022 11:49:56 +0300
Subject: [PATCH 31/86] adapt test suite to new Sphinx version
---
tests/docs1/expected/first.html | 16 +++++++++-------
tests/docs1/expected/genindex.html | 7 ++++---
tests/docs1/expected/index.html | 22 ++++++++++++----------
tests/docs1/expected/search.html | 10 ++++++----
tests/docs1/expected/searchindex.js | 2 +-
tests/docs1/expected/second.html | 16 +++++++++-------
6 files changed, 41 insertions(+), 32 deletions(-)
diff --git a/tests/docs1/expected/first.html b/tests/docs1/expected/first.html
index 71b3143..bc3502c 100644
--- a/tests/docs1/expected/first.html
+++ b/tests/docs1/expected/first.html
@@ -4,13 +4,15 @@
-
+
+
First day — Joe's website
+
@@ -32,13 +34,13 @@
-
-
First day
+
+First day
Mul seitse pruuti on,
neid kõiki armastan
ja iga päev neist üht mina külastan.
Ikka Emma esmaspäev, …
-
+
@@ -75,12 +77,12 @@ Related Topics
Quick search
-
+
@@ -97,7 +99,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 4.0.2
+ Powered by Sphinx 5.1.1
& Alabaster 0.7.12
|
diff --git a/tests/docs1/expected/genindex.html b/tests/docs1/expected/genindex.html
index 7924887..5abfa38 100644
--- a/tests/docs1/expected/genindex.html
+++ b/tests/docs1/expected/genindex.html
@@ -11,6 +11,7 @@
+
@@ -70,12 +71,12 @@ Related Topics
Quick search
-
+
@@ -92,7 +93,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 4.0.2
+ Powered by Sphinx 5.1.1
& Alabaster 0.7.12
diff --git a/tests/docs1/expected/index.html b/tests/docs1/expected/index.html
index 44e8f8d..4829c10 100644
--- a/tests/docs1/expected/index.html
+++ b/tests/docs1/expected/index.html
@@ -4,13 +4,15 @@
-
+
+
Joe’s blog — Joe's website
+
@@ -31,18 +33,18 @@
@@ -78,12 +80,12 @@ Related Topics
Quick search
-
+
@@ -100,7 +102,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 4.0.2
+ Powered by Sphinx 5.1.1
& Alabaster 0.7.12
|
diff --git a/tests/docs1/expected/search.html b/tests/docs1/expected/search.html
index c141977..86f764e 100644
--- a/tests/docs1/expected/search.html
+++ b/tests/docs1/expected/search.html
@@ -12,6 +12,7 @@
+
@@ -38,13 +39,14 @@
Search
-
-
+
+
Please activate JavaScript to enable the search
functionality.
+
@@ -54,7 +56,7 @@
Search
@@ -110,7 +112,7 @@
Related Topics
©2018 Joe Doe.
|
- Powered by
Sphinx 4.0.2
+ Powered by
Sphinx 5.1.1
&
Alabaster 0.7.12
diff --git a/tests/docs1/expected/searchindex.js b/tests/docs1/expected/searchindex.js
index d21512e..11513c1 100644
--- a/tests/docs1/expected/searchindex.js
+++ b/tests/docs1/expected/searchindex.js
@@ -1 +1 @@
-Search.setIndex({docnames:["first","index","second"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":3,"sphinx.domains.rst":2,"sphinx.domains.std":2,sphinx:56},filenames:["first.rst","index.rst","second.rst"],objects:{},objnames:{},objtypes:{},terms:{"\u00fcht":[0,2],"esmasp\u00e4ev":[0,2],"k\u00f5iki":[0,2],"k\u00fclastan":[0,2],"p\u00e4ev":[0,2],"teisip\u00e4ev":2,armastan:[0,2],dai:1,emma:[0,2],first:1,iga:[0,2],ikka:[0,2],ja:[0,2],mina:[0,2],mul:[0,2],neid:[0,2],neist:[0,2],pruuti:[0,2],second:1,seits:[0,2],teres:2},titles:["First day","Joe\u2019s blog","Second day"],titleterms:{blog:1,dai:[0,2],first:0,joe:1,s:1,second:2,sitemap:1}})
\ No newline at end of file
+Search.setIndex({"docnames": ["first", "index", "second"], "filenames": ["first.rst", "index.rst", "second.rst"], "titles": ["First day", "Joe\u2019s blog", "Second day"], "terms": {"mul": [0, 2], "seits": [0, 2], "pruuti": [0, 2], "neid": [0, 2], "k\u00f5iki": [0, 2], "armastan": [0, 2], "ja": [0, 2], "iga": [0, 2], "p\u00e4ev": [0, 2], "neist": [0, 2], "\u00fcht": [0, 2], "mina": [0, 2], "k\u00fclastan": [0, 2], "ikka": [0, 2], "emma": [0, 2], "esmasp\u00e4ev": [0, 2], "first": 1, "dai": 1, "second": 1, "teres": 2, "teisip\u00e4ev": 2}, "objects": {}, "objtypes": {}, "objnames": {}, "titleterms": {"first": 0, "dai": [0, 2], "joe": 1, "": 1, "blog": 1, "sitemap": 1, "second": 2}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 6, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 56}})
\ No newline at end of file
diff --git a/tests/docs1/expected/second.html b/tests/docs1/expected/second.html
index 5ae8ee6..c75322b 100644
--- a/tests/docs1/expected/second.html
+++ b/tests/docs1/expected/second.html
@@ -4,13 +4,15 @@
-
+
+
Second day — Joe's website
+
@@ -31,14 +33,14 @@
-
-
Second day
+
+Second day
Mul seitse pruuti on,
neid kõiki armastan
ja iga päev neist üht mina külastan.
Ikka Emma esmaspäev,
Terese teisipäev,
-
+
@@ -74,12 +76,12 @@ Related Topics
Quick search
-
+
@@ -96,7 +98,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 4.0.2
+ Powered by Sphinx 5.1.1
& Alabaster 0.7.12
|
From 5bec28e26d67bab5d8b8eedddb77ab4d73940309 Mon Sep 17 00:00:00 2001
From: Luc Saffre
Date: Sun, 19 Feb 2023 20:12:13 +0100
Subject: [PATCH 32/86] adapt to Sphinx 5.3.0
---
tests/docs1/expected/first.html | 3 ++-
tests/docs1/expected/genindex.html | 3 ++-
tests/docs1/expected/index.html | 3 ++-
tests/docs1/expected/search.html | 3 ++-
tests/docs1/expected/searchindex.js | 2 +-
tests/docs1/expected/second.html | 3 ++-
6 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/tests/docs1/expected/first.html b/tests/docs1/expected/first.html
index bc3502c..58c0009 100644
--- a/tests/docs1/expected/first.html
+++ b/tests/docs1/expected/first.html
@@ -14,6 +14,7 @@
+
@@ -99,7 +100,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 5.1.1
+ Powered by Sphinx 5.3.0
& Alabaster 0.7.12
|
diff --git a/tests/docs1/expected/genindex.html b/tests/docs1/expected/genindex.html
index 5abfa38..51b4c08 100644
--- a/tests/docs1/expected/genindex.html
+++ b/tests/docs1/expected/genindex.html
@@ -13,6 +13,7 @@
+
@@ -93,7 +94,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 5.1.1
+ Powered by Sphinx 5.3.0
& Alabaster 0.7.12
diff --git a/tests/docs1/expected/index.html b/tests/docs1/expected/index.html
index 4829c10..4297adb 100644
--- a/tests/docs1/expected/index.html
+++ b/tests/docs1/expected/index.html
@@ -14,6 +14,7 @@
+
@@ -102,7 +103,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 5.1.1
+ Powered by Sphinx 5.3.0
& Alabaster 0.7.12
|
diff --git a/tests/docs1/expected/search.html b/tests/docs1/expected/search.html
index 86f764e..c0c99cc 100644
--- a/tests/docs1/expected/search.html
+++ b/tests/docs1/expected/search.html
@@ -14,6 +14,7 @@
+
@@ -112,7 +113,7 @@ Related Topics
©2018 Joe Doe.
|
- Powered by Sphinx 5.1.1
+ Powered by Sphinx 5.3.0
& Alabaster 0.7.12
diff --git a/tests/docs1/expected/searchindex.js b/tests/docs1/expected/searchindex.js
index 11513c1..f5a595a 100644
--- a/tests/docs1/expected/searchindex.js
+++ b/tests/docs1/expected/searchindex.js
@@ -1 +1 @@
-Search.setIndex({"docnames": ["first", "index", "second"], "filenames": ["first.rst", "index.rst", "second.rst"], "titles": ["First day", "Joe\u2019s blog", "Second day"], "terms": {"mul": [0, 2], "seits": [0, 2], "pruuti": [0, 2], "neid": [0, 2], "k\u00f5iki": [0, 2], "armastan": [0, 2], "ja": [0, 2], "iga": [0, 2], "p\u00e4ev": [0, 2], "neist": [0, 2], "\u00fcht": [0, 2], "mina": [0, 2], "k\u00fclastan": [0, 2], "ikka": [0, 2], "emma": [0, 2], "esmasp\u00e4ev": [0, 2], "first": 1, "dai": 1, "second": 1, "teres": 2, "teisip\u00e4ev": 2}, "objects": {}, "objtypes": {}, "objnames": {}, "titleterms": {"first": 0, "dai": [0, 2], "joe": 1, "": 1, "blog": 1, "sitemap": 1, "second": 2}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 6, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 56}})
\ No newline at end of file
+Search.setIndex({"docnames": ["first", "index", "second"], "filenames": ["first.rst", "index.rst", "second.rst"], "titles": ["First day", "Joe\u2019s blog", "Second day"], "terms": {"mul": [0, 2], "seits": [0, 2], "pruuti": [0, 2], "neid": [0, 2], "k\u00f5iki": [0, 2], "armastan": [0, 2], "ja": [0, 2], "iga": [0, 2], "p\u00e4ev": [0, 2], "neist": [0, 2], "\u00fcht": [0, 2], "mina": [0, 2], "k\u00fclastan": [0, 2], "ikka": [0, 2], "emma": [0, 2], "esmasp\u00e4ev": [0, 2], "first": 1, "dai": 1, "second": 1, "teres": 2, "teisip\u00e4ev": 2}, "objects": {}, "objtypes": {}, "objnames": {}, "titleterms": {"first": 0, "dai": [0, 2], "joe": 1, "": 1, "blog": 1, "sitemap": 1, "second": 2}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 8, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 57}, "alltitles": {"First day": [[0, "first-day"]], "Joe\u2019s blog": [[1, "joe-s-blog"]], "Sitemap": [[1, "sitemap"]], "Second day": [[2, "second-day"]]}, "indexentries": {}})
\ No newline at end of file
diff --git a/tests/docs1/expected/second.html b/tests/docs1/expected/second.html
index c75322b..6f4304e 100644
--- a/tests/docs1/expected/second.html
+++ b/tests/docs1/expected/second.html
@@ -14,6 +14,7 @@
+
@@ -98,7 +99,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 5.1.1
+ Powered by Sphinx 5.3.0
& Alabaster 0.7.12
|
From c0c5665fd7e14b656a770934d7a66af201532e97 Mon Sep 17 00:00:00 2001
From: Luc Saffre
Date: Wed, 11 Oct 2023 08:13:58 +0200
Subject: [PATCH 33/86] adapted to new Sphinx version
---
tests/docs1/expected/first.html | 5 +----
tests/docs1/expected/genindex.html | 5 +----
tests/docs1/expected/index.html | 5 +----
tests/docs1/expected/search.html | 5 +----
tests/docs1/expected/second.html | 5 +----
5 files changed, 5 insertions(+), 20 deletions(-)
diff --git a/tests/docs1/expected/first.html b/tests/docs1/expected/first.html
index 58c0009..7e21a12 100644
--- a/tests/docs1/expected/first.html
+++ b/tests/docs1/expected/first.html
@@ -10,9 +10,6 @@
-
-
-
@@ -100,7 +97,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 5.3.0
+ Powered by Sphinx 6.2.1
& Alabaster 0.7.12
|
diff --git a/tests/docs1/expected/genindex.html b/tests/docs1/expected/genindex.html
index 51b4c08..337bd0d 100644
--- a/tests/docs1/expected/genindex.html
+++ b/tests/docs1/expected/genindex.html
@@ -9,9 +9,6 @@
-
-
-
@@ -94,7 +91,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 5.3.0
+ Powered by Sphinx 6.2.1
& Alabaster 0.7.12
diff --git a/tests/docs1/expected/index.html b/tests/docs1/expected/index.html
index 4297adb..1c538ca 100644
--- a/tests/docs1/expected/index.html
+++ b/tests/docs1/expected/index.html
@@ -10,9 +10,6 @@
-
-
-
@@ -103,7 +100,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 5.3.0
+ Powered by Sphinx 6.2.1
& Alabaster 0.7.12
|
diff --git a/tests/docs1/expected/search.html b/tests/docs1/expected/search.html
index c0c99cc..2b9f815 100644
--- a/tests/docs1/expected/search.html
+++ b/tests/docs1/expected/search.html
@@ -10,9 +10,6 @@
-
-
-
@@ -113,7 +110,7 @@ Related Topics
©2018 Joe Doe.
|
- Powered by Sphinx 5.3.0
+ Powered by Sphinx 6.2.1
& Alabaster 0.7.12
diff --git a/tests/docs1/expected/second.html b/tests/docs1/expected/second.html
index 6f4304e..cb09c23 100644
--- a/tests/docs1/expected/second.html
+++ b/tests/docs1/expected/second.html
@@ -10,9 +10,6 @@
-
-
-
@@ -99,7 +96,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 5.3.0
+ Powered by Sphinx 6.2.1
& Alabaster 0.7.12
|
From b34b5fdc5e99dc5c9d76533fb1c609aa82281b6f Mon Sep 17 00:00:00 2001
From: Luc Saffre
Date: Sat, 16 Dec 2023 07:45:13 +0200
Subject: [PATCH 34/86] support the newest Sphinx version
---
tests/docs1/expected/first.html | 17 ++++++++---------
tests/docs1/expected/genindex.html | 15 +++++++--------
tests/docs1/expected/index.html | 19 +++++++++----------
tests/docs1/expected/search.html | 15 +++++++--------
tests/docs1/expected/searchindex.js | 2 +-
tests/docs1/expected/second.html | 17 ++++++++---------
6 files changed, 40 insertions(+), 45 deletions(-)
diff --git a/tests/docs1/expected/first.html b/tests/docs1/expected/first.html
index 7e21a12..f640d41 100644
--- a/tests/docs1/expected/first.html
+++ b/tests/docs1/expected/first.html
@@ -1,17 +1,16 @@
-
-
+
First day — Joe's website
-
-
-
-
-
+
+
+
+
+
@@ -33,7 +32,7 @@
-First day
+First day
Mul seitse pruuti on,
neid kõiki armastan
ja iga päev neist üht mina külastan.
@@ -97,7 +96,7 @@
Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 6.2.1
+ Powered by Sphinx 7.2.6
& Alabaster 0.7.12
|
diff --git a/tests/docs1/expected/genindex.html b/tests/docs1/expected/genindex.html
index 337bd0d..1ffdfff 100644
--- a/tests/docs1/expected/genindex.html
+++ b/tests/docs1/expected/genindex.html
@@ -1,16 +1,15 @@
-
-
+
Index — Joe's website
-
-
-
-
-
+
+
+
+
+
@@ -91,7 +90,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 6.2.1
+ Powered by Sphinx 7.2.6
& Alabaster 0.7.12
diff --git a/tests/docs1/expected/index.html b/tests/docs1/expected/index.html
index 1c538ca..38d4b02 100644
--- a/tests/docs1/expected/index.html
+++ b/tests/docs1/expected/index.html
@@ -1,17 +1,16 @@
-
-
+
Joe’s blog — Joe's website
-
-
-
-
-
+
+
+
+
+
@@ -32,9 +31,9 @@
-Joe’s blog
+Joe’s blog
-Sitemap
+Sitemap
First day
@@ -100,7 +99,7 @@ Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 6.2.1
+ Powered by Sphinx 7.2.6
& Alabaster 0.7.12
|
diff --git a/tests/docs1/expected/search.html b/tests/docs1/expected/search.html
index 2b9f815..bdc7e1f 100644
--- a/tests/docs1/expected/search.html
+++ b/tests/docs1/expected/search.html
@@ -1,17 +1,16 @@
-
-
+
Search — Joe's website
-
-
+
+
-
-
-
+
+
+
@@ -110,7 +109,7 @@ Related Topics
©2018 Joe Doe.
|
- Powered by Sphinx 6.2.1
+ Powered by Sphinx 7.2.6
& Alabaster 0.7.12
diff --git a/tests/docs1/expected/searchindex.js b/tests/docs1/expected/searchindex.js
index f5a595a..95731fa 100644
--- a/tests/docs1/expected/searchindex.js
+++ b/tests/docs1/expected/searchindex.js
@@ -1 +1 @@
-Search.setIndex({"docnames": ["first", "index", "second"], "filenames": ["first.rst", "index.rst", "second.rst"], "titles": ["First day", "Joe\u2019s blog", "Second day"], "terms": {"mul": [0, 2], "seits": [0, 2], "pruuti": [0, 2], "neid": [0, 2], "k\u00f5iki": [0, 2], "armastan": [0, 2], "ja": [0, 2], "iga": [0, 2], "p\u00e4ev": [0, 2], "neist": [0, 2], "\u00fcht": [0, 2], "mina": [0, 2], "k\u00fclastan": [0, 2], "ikka": [0, 2], "emma": [0, 2], "esmasp\u00e4ev": [0, 2], "first": 1, "dai": 1, "second": 1, "teres": 2, "teisip\u00e4ev": 2}, "objects": {}, "objtypes": {}, "objnames": {}, "titleterms": {"first": 0, "dai": [0, 2], "joe": 1, "": 1, "blog": 1, "sitemap": 1, "second": 2}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 8, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 57}, "alltitles": {"First day": [[0, "first-day"]], "Joe\u2019s blog": [[1, "joe-s-blog"]], "Sitemap": [[1, "sitemap"]], "Second day": [[2, "second-day"]]}, "indexentries": {}})
\ No newline at end of file
+Search.setIndex({"docnames": ["first", "index", "second"], "filenames": ["first.rst", "index.rst", "second.rst"], "titles": ["First day", "Joe\u2019s blog", "Second day"], "terms": {"mul": [0, 2], "seits": [0, 2], "pruuti": [0, 2], "neid": [0, 2], "k\u00f5iki": [0, 2], "armastan": [0, 2], "ja": [0, 2], "iga": [0, 2], "p\u00e4ev": [0, 2], "neist": [0, 2], "\u00fcht": [0, 2], "mina": [0, 2], "k\u00fclastan": [0, 2], "ikka": [0, 2], "emma": [0, 2], "esmasp\u00e4ev": [0, 2], "first": 1, "dai": 1, "second": 1, "teres": 2, "teisip\u00e4ev": 2}, "objects": {}, "objtypes": {}, "objnames": {}, "titleterms": {"first": 0, "dai": [0, 2], "joe": 1, "": 1, "blog": 1, "sitemap": 1, "second": 2}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 60}, "alltitles": {"First day": [[0, "first-day"]], "Joe\u2019s blog": [[1, "joe-s-blog"]], "Sitemap": [[1, "sitemap"]], "Second day": [[2, "second-day"]]}, "indexentries": {}})
\ No newline at end of file
diff --git a/tests/docs1/expected/second.html b/tests/docs1/expected/second.html
index cb09c23..7483948 100644
--- a/tests/docs1/expected/second.html
+++ b/tests/docs1/expected/second.html
@@ -1,17 +1,16 @@
-
-
+
Second day — Joe's website
-
-
-
-
-
+
+
+
+
+
@@ -32,7 +31,7 @@
-Second day
+Second day
Mul seitse pruuti on,
neid kõiki armastan
ja iga päev neist üht mina külastan.
@@ -96,7 +95,7 @@
Quick search
©2018 Joe Doe.
|
- Powered by Sphinx 6.2.1
+ Powered by Sphinx 7.2.6
& Alabaster 0.7.12
|
From 04a7333a6d34a1042a5d2f8594b0818bdf932dc9 Mon Sep 17 00:00:00 2001
From: Luc Saffre
Date: Wed, 14 Feb 2024 20:26:26 +0200
Subject: [PATCH 35/86] code reformatted using yapf
---
setup.py | 60 +++++++++++++++++-----------------------
sphinxfeed.py | 7 +++--
tasks.py | 5 ++--
tests/docs1/conf.py | 13 +--------
tests/test_sphinxfeed.py | 14 ++++++----
5 files changed, 43 insertions(+), 56 deletions(-)
diff --git a/setup.py b/setup.py
index 2601cef..96daf15 100644
--- a/setup.py
+++ b/setup.py
@@ -1,11 +1,6 @@
from setuptools import setup
-
-requires = [
- 'Sphinx>=0.6',
- 'feedgen', 'python-dateutil'
- ]
-
+requires = ['Sphinx>=0.6', 'feedgen', 'python-dateutil']
# long_desc = open('README.rst').read()
long_desc = """This Sphinx extension is a fork of Fergus Doyle's `sphinxfeed
@@ -52,34 +47,31 @@
"""
-SETUP_INFO = dict(
- name='sphinxfeed',
- version='0.3',
- license='BSD-2-Clause',
- author='Luc Saffre',
- author_email='luc.saffre@gmail.com',
- url='https://github.com/lsaffre/sphinxfeed',
- description='Sphinx extension for generating RSS feeds',
- long_description=long_desc,
- classifiers=[
- 'Development Status :: 4 - Beta',
- 'Environment :: Console',
- 'Environment :: Web Environment',
- 'Intended Audience :: Developers',
- 'License :: OSI Approved :: BSD License',
- 'Operating System :: OS Independent',
- 'Programming Language :: Python',
- 'Topic :: Documentation',
- 'Topic :: Utilities',
- ],
- platforms='any',
- py_modules=['sphinxfeed'],
- include_package_data=True,
- install_requires=requires,
- test_suite='tests',
- tests_require=['atelier']
-)
-
+SETUP_INFO = dict(name='sphinxfeed',
+ version='0.3',
+ license='BSD-2-Clause',
+ author='Luc Saffre',
+ author_email='luc.saffre@gmail.com',
+ url='https://github.com/lsaffre/sphinxfeed',
+ description='Sphinx extension for generating RSS feeds',
+ long_description=long_desc,
+ classifiers=[
+ 'Development Status :: 4 - Beta',
+ 'Environment :: Console',
+ 'Environment :: Web Environment',
+ 'Intended Audience :: Developers',
+ 'License :: OSI Approved :: BSD License',
+ 'Operating System :: OS Independent',
+ 'Programming Language :: Python',
+ 'Topic :: Documentation',
+ 'Topic :: Utilities',
+ ],
+ platforms='any',
+ py_modules=['sphinxfeed'],
+ include_package_data=True,
+ install_requires=requires,
+ test_suite='tests',
+ tests_require=['atelier'])
if __name__ == '__main__':
setup(**SETUP_INFO)
diff --git a/sphinxfeed.py b/sphinxfeed.py
index a20a1a8..df5f6f2 100644
--- a/sphinxfeed.py
+++ b/sphinxfeed.py
@@ -54,6 +54,7 @@ def setup(app):
#env.process_metadata deletes most of the docinfo, and dates
#in particular.
+
def create_feed_container(app):
#from feedformatter import Feed
feed = FeedGenerator()
@@ -70,6 +71,7 @@ def create_feed_container(app):
if not hasattr(app.builder.env, 'feed_items'):
app.builder.env.feed_items = {}
+
def create_feed_item(app, pagename, templatename, ctx, doctree):
""" Here we have access to nice HTML fragments to use in, say, an RSS feed.
"""
@@ -109,6 +111,7 @@ def create_feed_item(app, pagename, templatename, ctx, doctree):
#Additionally, we might like to provide our templates with a way to link to the rss output file
ctx['rss_link'] = app.config.feed_base_url + '/' + app.config.feed_filename
+
def emit_feed(app, exc):
ordered_items = list(app.builder.env.feed_items.values())
feed = app.builder.env.feed_feed
@@ -119,8 +122,7 @@ def emit_feed(app, exc):
# for k, v in item.items():
# getattr(e, k)(v)
- path = os.path.join(app.builder.outdir,
- app.config.feed_filename)
+ path = os.path.join(app.builder.outdir, app.config.feed_filename)
# print(20190315, path)
feed.rss_file(path)
@@ -143,6 +145,7 @@ def emit_feed(app, exc):
builder.env.check_consistency()
builder.info('done')
+
## Tests
# ... TODO
diff --git a/tasks.py b/tasks.py
index 5aed377..d3ff647 100644
--- a/tasks.py
+++ b/tasks.py
@@ -1,8 +1,9 @@
from atelier.invlib import setup_from_tasks
+
ns = setup_from_tasks(
- globals(), "sphinxfeed",
+ globals(),
+ "sphinxfeed",
blogref_url="https://luc.lino-framework.org",
revision_control_system='git',
# tolerate_sphinx_warnings=True,
cleanable_files=[])
-
diff --git a/tests/docs1/conf.py b/tests/docs1/conf.py
index 925cf09..6e8a0dc 100644
--- a/tests/docs1/conf.py
+++ b/tests/docs1/conf.py
@@ -19,7 +19,6 @@
# configure(globals())
-
# If your extensions are in another directory, add it here. If the directory
# is relative to the documentation root, use os.path.abspath to make it
# absolute, like shown here.
@@ -44,7 +43,6 @@
project = "First sphinxfeed tester"
copyright = '2018 Joe Doe'
-
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
@@ -64,7 +62,6 @@
# Else, today_fmt is used as the format for a strftime call.
# today_fmt = '%d.%B.%Y'
-
# Note 20100703 : unused_docs and exclude_trees replaced by exclude_patterns
# List of patterns, relative to source directory, that match files and
@@ -78,7 +75,6 @@
# for source files.
exclude_trees = ['old', 'include', '.build']
-
# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None
@@ -144,7 +140,6 @@
# typographically correct entities.
#html_use_smartypants = True
-
# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
@@ -172,7 +167,6 @@
# Output file base name for HTML help builder.
htmlhelp_basename = 'saffre-rumma'
-
# Options for LaTeX output
# ------------------------
@@ -185,8 +179,7 @@
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, document class [howto/manual]).
latex_documents = [
- ('index', 'saffre-rumma.tex', u'saffre-rumma',
- u'saffre-rumma', 'manual'),
+ ('index', 'saffre-rumma.tex', u'saffre-rumma', u'saffre-rumma', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
@@ -206,7 +199,6 @@
# If false, no module index is generated.
#latex_use_modindex = True
-
# html_sidebars = {
# '**': ['globaltoc.html', 'searchbox.html', 'links.html'],
# }
@@ -217,7 +209,6 @@
# html_theme = "bizstyle"
# html_theme_options = dict(collapsiblesidebar=True, externalrefs=True)
-
# extensions += ['yasfb']
# extensions += ['sphinxcontrib.feed']
extensions += ['sphinxfeed']
@@ -227,5 +218,3 @@
feed_title = "Joe's blog"
feed_field_name = 'date'
feed_description = "Joe's blog"
-
-
diff --git a/tests/test_sphinxfeed.py b/tests/test_sphinxfeed.py
index f4803f2..2edc827 100644
--- a/tests/test_sphinxfeed.py
+++ b/tests/test_sphinxfeed.py
@@ -1,6 +1,5 @@
# -*- coding: UTF-8 -*-
# Copyright 2018-2021 Rumma & Ko Ltd
-
"""
Run a sphinx-build and then check whether the generated files (in
`tmp`) are the same as in `expected`.
@@ -15,11 +14,12 @@
"""
-
import filecmp
from atelier.test import TestCase
+
class AllTests(TestCase):
+
def test_all(self):
args = ['sphinx-build']
args += ["-b"]
@@ -28,12 +28,14 @@ def test_all(self):
args += ["tmp"]
self.run_subprocess(args)
- common = ["index.html", "first.html",
- "search.html", "genindex.html", "searchindex.js"]
+ common = [
+ "index.html", "first.html", "search.html", "genindex.html",
+ "searchindex.js"
+ ]
# common.append("rss.xml")
- match, mismatch, errors = filecmp.cmpfiles(
- "tests/docs1/expected", "tmp", common)
+ match, mismatch, errors = filecmp.cmpfiles("tests/docs1/expected",
+ "tmp", common)
self.assertEqual(mismatch, [])
self.assertEqual(match, common)
From 7f5d43d7a6d0452ae7291cdecb3791e82c440bf5 Mon Sep 17 00:00:00 2001
From: Luc Saffre
Date: Mon, 22 Apr 2024 22:43:14 +0300
Subject: [PATCH 36/86] adapt to new sphinx version
---
tests/docs1/expected/first.html | 17 +++++++++--------
tests/docs1/expected/genindex.html | 17 +++++++++--------
tests/docs1/expected/index.html | 17 +++++++++--------
tests/docs1/expected/search.html | 23 +++++++++++------------
tests/docs1/expected/searchindex.js | 2 +-
tests/docs1/expected/second.html | 17 +++++++++--------
6 files changed, 48 insertions(+), 45 deletions(-)
diff --git a/tests/docs1/expected/first.html b/tests/docs1/expected/first.html
index f640d41..ab95a03 100644
--- a/tests/docs1/expected/first.html
+++ b/tests/docs1/expected/first.html
@@ -7,9 +7,9 @@
First day — Joe's website
-
+
-
+
@@ -18,8 +18,9 @@
+
+
-
@@ -70,7 +71,7 @@ Related Topics
-
+
@@ -93,11 +94,11 @@ Quick search
-
+
@@ -87,11 +88,11 @@ Quick search
diff --git a/tests/docs1/expected/index.html b/tests/docs1/expected/index.html
index 38d4b02..a23952b 100644
--- a/tests/docs1/expected/index.html
+++ b/tests/docs1/expected/index.html
@@ -7,9 +7,9 @@
Joe’s blog — Joe's website
-
+
-
+
@@ -17,8 +17,9 @@
+
+
-
@@ -73,7 +74,7 @@ Related Topics
-
+
@@ -96,11 +97,11 @@ Quick search
@@ -106,11 +105,11 @@ Related Topics
diff --git a/tests/docs1/expected/searchindex.js b/tests/docs1/expected/searchindex.js
index 95731fa..302a38a 100644
--- a/tests/docs1/expected/searchindex.js
+++ b/tests/docs1/expected/searchindex.js
@@ -1 +1 @@
-Search.setIndex({"docnames": ["first", "index", "second"], "filenames": ["first.rst", "index.rst", "second.rst"], "titles": ["First day", "Joe\u2019s blog", "Second day"], "terms": {"mul": [0, 2], "seits": [0, 2], "pruuti": [0, 2], "neid": [0, 2], "k\u00f5iki": [0, 2], "armastan": [0, 2], "ja": [0, 2], "iga": [0, 2], "p\u00e4ev": [0, 2], "neist": [0, 2], "\u00fcht": [0, 2], "mina": [0, 2], "k\u00fclastan": [0, 2], "ikka": [0, 2], "emma": [0, 2], "esmasp\u00e4ev": [0, 2], "first": 1, "dai": 1, "second": 1, "teres": 2, "teisip\u00e4ev": 2}, "objects": {}, "objtypes": {}, "objnames": {}, "titleterms": {"first": 0, "dai": [0, 2], "joe": 1, "": 1, "blog": 1, "sitemap": 1, "second": 2}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 60}, "alltitles": {"First day": [[0, "first-day"]], "Joe\u2019s blog": [[1, "joe-s-blog"]], "Sitemap": [[1, "sitemap"]], "Second day": [[2, "second-day"]]}, "indexentries": {}})
\ No newline at end of file
+Search.setIndex({"alltitles": {"First day": [[0, "first-day"]], "Joe\u2019s blog": [[1, "joe-s-blog"]], "Second day": [[2, "second-day"]], "Sitemap": [[1, "sitemap"]]}, "docnames": ["first", "index", "second"], "envversion": {"sphinx": 61, "sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2}, "filenames": ["first.rst", "index.rst", "second.rst"], "indexentries": {}, "objects": {}, "objnames": {}, "objtypes": {}, "terms": {"armastan": [0, 2], "dai": 1, "emma": [0, 2], "esmasp\u00e4ev": [0, 2], "first": 1, "iga": [0, 2], "ikka": [0, 2], "ja": [0, 2], "k\u00f5iki": [0, 2], "k\u00fclastan": [0, 2], "mina": [0, 2], "mul": [0, 2], "neid": [0, 2], "neist": [0, 2], "pruuti": [0, 2], "p\u00e4ev": [0, 2], "second": 1, "seits": [0, 2], "teisip\u00e4ev": 2, "teres": 2, "\u00fcht": [0, 2]}, "titles": ["First day", "Joe\u2019s blog", "Second day"], "titleterms": {"": 1, "blog": 1, "dai": [0, 2], "first": 0, "joe": 1, "second": 2, "sitemap": 1}})
\ No newline at end of file
diff --git a/tests/docs1/expected/second.html b/tests/docs1/expected/second.html
index 7483948..5ea1852 100644
--- a/tests/docs1/expected/second.html
+++ b/tests/docs1/expected/second.html
@@ -7,9 +7,9 @@
Second day — Joe's website
-
+
-
+
@@ -17,8 +17,9 @@
+
+
-
@@ -69,7 +70,7 @@ Related Topics
-
+
@@ -92,11 +93,11 @@ Quick search