From 28e154acfcce72f21662140d8b421ad3b9e4d178 Mon Sep 17 00:00:00 2001 From: Facundo Batista Date: Wed, 21 Mar 2018 19:39:02 -0300 Subject: [PATCH 1/8] Small typo --- docs/docs/configuration/server.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/configuration/server.rst b/docs/docs/configuration/server.rst index cb39ccd..1a443f8 100644 --- a/docs/docs/configuration/server.rst +++ b/docs/docs/configuration/server.rst @@ -108,7 +108,7 @@ Enable moderation queue and handling of comments still in moderation queue enabled enable comment moderation queue. This option only affects new comments. - Comments in modertion queue are not visible to other users until you + Comments in moderation queue are not visible to other users until you activate them. purge-after From 361c596bf2d7f3b725d4ca3bd069dc683f3ac2c1 Mon Sep 17 00:00:00 2001 From: "Cimon Lucas (LCM)" Date: Wed, 21 Feb 2018 18:54:48 +0100 Subject: [PATCH 2/8] Adding support for ISSO_CORS_ORIGIN env variable to allow defining wildcard CORS origins --- isso/wsgi.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/isso/wsgi.py b/isso/wsgi.py index 1788d47..60c1a58 100644 --- a/isso/wsgi.py +++ b/isso/wsgi.py @@ -84,6 +84,8 @@ def origin(hosts): hosts = [urlsplit(h) for h in hosts] def func(environ): + if 'ISSO_CORS_ORIGIN' in environ: + return environ['ISSO_CORS_ORIGIN'] if not hosts: return "http://invalid.local" From 73c7933548fa9ea4d64a6a159d39af001cfdde2d Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Mon, 2 Apr 2018 23:02:45 +0200 Subject: [PATCH 3/8] A quick dirty fix of #401 (#406) Fix URL in moderation mails if isso runs in a sub-URL (closes #401 ) --- isso/ext/notifications.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/isso/ext/notifications.py b/isso/ext/notifications.py index 80e1504..2b4a81c 100644 --- a/isso/ext/notifications.py +++ b/isso/ext/notifications.py @@ -37,6 +37,12 @@ class SMTP(object): self.isso = isso self.conf = isso.conf.section("smtp") + gh = isso.conf.get("general", "host") + if type(gh) == str: + self.general_host = gh + #if gh is not a string then gh is a list + else: + self.general_host = gh[0] # test SMTP connectivity try: @@ -109,7 +115,7 @@ class SMTP(object): (local("origin") + thread["uri"] + "#isso-%i" % comment["id"])) rv.write("\n") - uri = local("host") + "/id/%i" % comment["id"] + uri = self.general_host + "/id/%i" % comment["id"] key = self.isso.sign(comment["id"]) rv.write("---\n") From 4e2d2dfb204d1c70bfdf4000cdaf2546d9adad32 Mon Sep 17 00:00:00 2001 From: Rocka Date: Thu, 5 Apr 2018 22:46:17 +0800 Subject: [PATCH 4/8] i18n: add space between number and CJK character --- isso/js/app/i18n/zh_CN.js | 16 ++++++++-------- isso/js/app/i18n/zh_TW.js | 18 +++++++++--------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/isso/js/app/i18n/zh_CN.js b/isso/js/app/i18n/zh_CN.js index b9d4582..9c33957 100644 --- a/isso/js/app/i18n/zh_CN.js +++ b/isso/js/app/i18n/zh_CN.js @@ -1,11 +1,11 @@ define({ - "postbox-text": "在此输入评论 (最少3个字符)", + "postbox-text": "在此输入评论 (最少 3 个字符)", "postbox-author": "名字 (可选)", "postbox-email": "E-mail (可选)", "postbox-website": "网站 (可选)", "postbox-submit": "提交", - "num-comments": "1条评论\n{{ n }}条评论", + "num-comments": "1 条评论\n{{ n }} 条评论", "no-comments": "还没有评论", "comment-reply": "回复", @@ -21,10 +21,10 @@ define({ "comment-hidden": "{{ n }} 条评论已隐藏", "date-now": "刚刚", - "date-minute": "1分钟前\n{{ n }}分钟前", - "date-hour": "1小时前\n{{ n }}小时前", - "date-day": "昨天\n{{ n }}天前", - "date-week": "上周\n{{ n }}周前", - "date-month": "上个月\n{{ n }}个月前", - "date-year": "去年\n{{ n }}年前" + "date-minute": "1 分钟前\n{{ n }} 分钟前", + "date-hour": "1 小时前\n{{ n }} 小时前", + "date-day": "昨天\n{{ n }} 天前", + "date-week": "上周\n{{ n }} 周前", + "date-month": "上个月\n{{ n }} 个月前", + "date-year": "去年\n{{ n }} 年前" }); diff --git a/isso/js/app/i18n/zh_TW.js b/isso/js/app/i18n/zh_TW.js index 9bb59fa..68ad370 100644 --- a/isso/js/app/i18n/zh_TW.js +++ b/isso/js/app/i18n/zh_TW.js @@ -1,11 +1,11 @@ define({ - "postbox-text": "在此輸入留言(至少3個字元)", + "postbox-text": "在此輸入留言(至少 3 個字元)", "postbox-author": "名稱 (非必填)", "postbox-email": "電子信箱 (非必填)", "postbox-website": "個人網站 (非必填)", "postbox-submit": "送出", - "num-comments": "1則留言\n{{ n }}則留言", + "num-comments": "1 則留言\n{{ n }} 則留言", "no-comments": "尚無留言", "comment-reply": "回覆", @@ -18,13 +18,13 @@ define({ "comment-deleted": "留言已刪", "comment-queued": "留言待審", "comment-anonymous": "匿名", - "comment-hidden": "{{ n }}則隱藏留言", + "comment-hidden": "{{ n }} 則隱藏留言", "date-now": "剛剛", - "date-minute": "1分鐘前\n{{ n }}分鐘前", - "date-hour": "1小時前\n{{ n }}小時前", - "date-day": "昨天\n{{ n }}天前", - "date-week": "上週\n{{ n }}週前", - "date-month": "上個月\n{{ n }}個月前", - "date-year": "去年\n{{ n }}年前" + "date-minute": "1 分鐘前\n{{ n }} 分鐘前", + "date-hour": "1 小時前\n{{ n }} 小時前", + "date-day": "昨天\n{{ n }} 天前", + "date-week": "上週\n{{ n }} 週前", + "date-month": "上個月\n{{ n }} 個月前", + "date-year": "去年\n{{ n }} 年前" }); From 2b7c17a361492853fe86b0ce2f66515f100efec3 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Mon, 16 Apr 2018 20:43:54 +0200 Subject: [PATCH 5/8] Provide a multi-staged Dockerfile Many of the Docker images on hub.docker.com are outdated. The one specified in the documentation doesn't exist anymore. We provide a decent Dockerfile to build our own Docker image. This uses a multi-stage build to avoid polluting the final image with the intermediate artifacts. The final image is 155 MB. It should be possible to squeeze it even more by using Alpine Linux for the last two parts instead of Stretch. The service is using gunicorn. The user is expected to complete the installation with a reverse proxy configuration. --- Dockerfile | 33 +++++++++++++++++++++++++++++++++ docs/docs/install.rst | 13 ++++++++++++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3a8203c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,33 @@ +# First, compile JS stuff +FROM node +WORKDIR /src/ +COPY . . +RUN npm install -g requirejs uglify-js jade bower +RUN make init js + +# Second, create virtualenv +FROM python:3-stretch +WORKDIR /src/ +COPY --from=0 /src . +RUN apt-get -qqy update && apt-get -qqy install python3-dev sqlite3 +RUN python3 -m venv /isso \ + && . /isso/bin/activate \ + && python setup.py install \ + && pip install gunicorn + +# Third, create final repository +FROM python:3-slim-stretch +WORKDIR /isso/ +COPY --from=1 /isso . + +# Configuration +VOLUME /db /config +EXPOSE 8080 +ENV ISSO_SETTINGS /config/isso.cfg +CMD ["/isso/bin/gunicorn", "-b", "0.0.0.0:8080", "-w", "4", "--preload", "isso.run"] + +# Example of use: +# +# docker build -t isso . +# docker run -it --rm -v /opt/isso:/config -v /opt/isso:/db -v $PWD:$PWD isso /isso/bin/isso -c \$ISSO_SETTINGS import disqus.xml +# docker run -d --rm --name isso -p 8080:8080 -v /opt/isso:/config -v /opt/isso:/db isso diff --git a/docs/docs/install.rst b/docs/docs/install.rst index 44d829f..eb2ef35 100644 --- a/docs/docs/install.rst +++ b/docs/docs/install.rst @@ -149,7 +149,18 @@ Prebuilt Packages * Fedora: https://copr.fedoraproject.org/coprs/jujens/isso/ — copr repository. Built from Pypi, includes a systemctl unit script. -* Docker Image: https://registry.hub.docker.com/u/bl4n/isso/ +Build a Docker image +-------------------- + +You can get a Docker image by running ``docker build . -t +isso``. Assuming you have your configuration in ``/opt/isso``, you can +use the following command to spawn the Docker container: + +.. code-block:: sh + + ~> docker run -d --rm --name isso -p 127.0.0.1:8080:8080 -v /opt/isso:/config -v /opt/isso:/db isso + +Then, you can use a reverse proxy to expose port 8080. Install from Source ------------------- From 30f0c7eeb895163339d3515fc15f6d408137fee6 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Tue, 17 Apr 2018 07:03:54 +0200 Subject: [PATCH 6/8] docs: document data-isso-id --- docs/docs/configuration/client.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/docs/configuration/client.rst b/docs/docs/configuration/client.rst index 14f0c86..9328357 100644 --- a/docs/docs/configuration/client.rst +++ b/docs/docs/configuration/client.rst @@ -7,6 +7,7 @@ preferably in the script tag which embeds the JS: .. code-block:: html Furthermore you can override the automatic title detection inside -the embed tag, e.g.: +the embed tag, as well as the thread ID, e.g.: .. code-block:: html -
+
data-isso --------- From 93ea72299241c594d9cd17ebb4ed6c775bb5a90d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Latinier?= Date: Tue, 17 Apr 2018 23:47:06 +0200 Subject: [PATCH 7/8] add contributors --- CHANGES.rst | 7 +++++-- CONTRIBUTORS.txt | 23 ++++++++++++++++++++++- docs/contribute.rst | 2 -- 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 2b290a6..5365c2e 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,7 +4,8 @@ Changelog for Isso 0.10.7 (unreleased) ------------------- -- Fix Chinese translation +- Fix Chinese translation & typo in CJK +- Fix link in moderation mails if isso is setup on a sub-url (e.g. domain.tld/comments/) - Add Danish translation - Add Hungarian translation - Add Persian translation @@ -12,7 +13,9 @@ Changelog for Isso - Add links highlighting in comments - Add apidoc - Add rc.d script for FreeBSD -- Some tests/travis/documentation improvements and fixes +- Add the possibility to set CORS Origin through ISSO_CORS_ORIGIN environ variable +- Some tests/travis/documentation improvements and fixes + pep8 +- Improvement on german translation 0.10.6 (2016-09-22) diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 0b5e649..db7dd27 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -51,12 +51,33 @@ In chronological order: * Added configuration to require email addresses (no validation) * Fix Vagrantfile -* Benoît Latinier +* Benoît Latinier @blatinier * Fix thread discovery * Added mandatory author + * Added admin interface * Ivan Pantic * Added vote levels +* Martin Schenck @schemar + * Improvement in the german translation + +* @cclauss + * Pep8 and drop of legacy supports (old python & debian version tested in travis) + * Make travis use pyflakes + +* Lucas Cimon @Lucas-C + * Added the possibility to define CORS origins through ISSO_CORS_ORIGIN environment variable + +* Yuchen Pei @ycpei + * Fix link in moderation emails when isso is installed in a sub URL + +* @Rocket1184 + * Fix typo in CJK translations + +* @vincentbernat + * Added documentation about data-isso-id attribute (overriding the standard isso-thread-id) + * Added multi-staged Dockerfile + * [Your name or handle] <[email or website]> * [Brief summary of your changes] diff --git a/docs/contribute.rst b/docs/contribute.rst index 8a3886d..c349a47 100644 --- a/docs/contribute.rst +++ b/docs/contribute.rst @@ -59,5 +59,3 @@ definitely need help: - delete or activate comments matching a filter (e.g. name, email, ip address) - close threads and remove threads completely - - - edit comments From 07ce742b7798a1140abcb292aebecd31ff242ac5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Latinier?= Date: Wed, 18 Apr 2018 10:51:17 +0200 Subject: [PATCH 8/8] add documentation for uberspaces users (closes #409) --- CONTRIBUTORS.txt | 3 +++ docs/docs/troubleshooting.rst | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index db7dd27..ad1fc1e 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -79,5 +79,8 @@ In chronological order: * Added documentation about data-isso-id attribute (overriding the standard isso-thread-id) * Added multi-staged Dockerfile +* @p-vitt & @M4a1x + * Documentation on troubleshooting for uberspace users + * [Your name or handle] <[email or website]> * [Brief summary of your changes] diff --git a/docs/docs/troubleshooting.rst b/docs/docs/troubleshooting.rst index 20ee8dd..a395a0a 100644 --- a/docs/docs/troubleshooting.rst +++ b/docs/docs/troubleshooting.rst @@ -1,6 +1,12 @@ Troubleshooting =============== +For uberspace users +------------------- +Some uberspace users experienced problems with isso and they solved their +issue by adding `DirectoryIndex disabled` as the first line in the `.htaccess` +file for the domain the isso server is running on. + pkg_ressources.DistributionNotFound -----------------------------------