Compare commits

...

549 Commits
dev ... master

Author SHA1 Message Date
Samuel FORESTIER 06c3d6ac11
r-strips the configured URL unconditionally
4 years ago
Samuel FORESTIER cd49dce78f
[PATCH v2] Removes potential '//' from email links (#420, #519, #523)
4 years ago
Andy c2cd06da52
add .drone.yml
4 years ago
ix5 d7eefbc072
admin: Set default order_by to 'created' (desc) (#649)
4 years ago
frenchvandal 2ba7217900
Dockerfile update (#644)
4 years ago
Lucas Cimon bdaa5240d1
Adding docs/extras/contribs.rst (#640)
4 years ago
Lucas Cimon 080ee36371
Adding a [server] proxy-fix-enable-x-prefix configuration option to take into consideration the `X-Forwarded-Prefix` HTTP header (#639)
4 years ago
Lucas Cimon a548fbf45b
Add warnings on Comments.vote failures (#635)
4 years ago
Lucas Cimon f70eaf315a
Using .access_route instead of .remote_addr to take into account HTTP_X_FORWARDED_FOR header (#636)
4 years ago
Lucas Cimon 04d138dc77
Adding contrib/dump_comments.py (#638)
4 years ago
Lucas Cimon c4373186f9
Fixing likes counter of replies not being displayed (#637)
4 years ago
Jelmer Vernooij 54f8fb7a7f
Drop python2 support. (#613)
4 years ago
Benoit Latinier bb9d947c76
Merge pull request #618 from frenchvandal/master
4 years ago
frenchvandal de8867a9d2
[i18n] Added the Brazilian Portuguese language
4 years ago
Jelmer Vernooij 86b65f817e
html: Add markdown render flag option (#616)
4 years ago
Jelmer Vernooij 2a4e8c231e
Add python 3.8 support. (#615)
4 years ago
Jelmer Vernooij 3e3ee8b641
Fix compatibility with werkzeug 1.0.0. Fixes #611 (#614)
4 years ago
Facundo Batista 1633d9261e New 'latest' endpoint to serve latest comments. Fixes #556. (#610)
4 years ago
Benjamin Pereto 1de758887a FIX: include admin.js in Python Package (#606)
4 years ago
jasdeepgill 5655f194b3 Various text improvements to documentation.
4 years ago
Shimmy Xu 7eed747e7a Use `html.escape` for Python versions where `cgi.escape` is removed (#600)
4 years ago
Charl P. Botha (X1E) 2e8cb81179
Add a approve-if-email-previously-approved setting.
5 years ago
Marcin Kurczewski 9eaaad4775 Fall back to author names in gravatars (#482)
5 years ago
Jonathan Watt 4944d595f6 Make Isso compatible with Content Security Policies without `script-src 'unsafe-inline'` (#597)
5 years ago
Michiel Scholten 472c9ed3de Set subject for notification about new comment, subject should not be empty (#589)
5 years ago
jasdeepgill 95b05bd3fe Improve grammar of index.rst. (#588)
5 years ago
Jonathan Watt 3be36fd8b0 Fix rendering of disabled.html for 'Sub URI' sites (#587)
5 years ago
JocelynDelalande 0f4e72c0e0 Mention official Debian repo instead of 3rd party (#581)
5 years ago
Alberto Mardegan c24ee69a1e contrib: Add Blogger importer tool (#529)
5 years ago
tdro f4b0376f1a Return 200 with empty array when there are no comments #301 (#565)
5 years ago
Andy 1f77ecc25e fix typo in i18n.js (#575)
5 years ago
Quentí b9e31bf6fe [i18n] Adds the Occitan language (#568)
5 years ago
Jelmer Vernooij 78997f4910
Remove shm hack.
5 years ago
Jelmer Vernooij b3ae160cff Ignore .eggs directories as well.
5 years ago
Jelmer Vernooij 0df8000144 Exclude .tox directory from flakes.
5 years ago
Jelmer Vernooij e2cfd6c08c
Run tests on Python 3.7.
5 years ago
Jelmer Vernooij bd39dd6788 Ignore backup files.
5 years ago
Jelmer Vernooij f51d9cc4f5 Fix flake8 errors.
5 years ago
Jelmer Vernooij e08c378900 Move flake8 configuration to setup.cfg.
5 years ago
Chris Warrick 1b13458e6a Implement #358 (Redirect to comment after moderation) (#534)
5 years ago
Jelmer Vernooij 77871a8bab
Merge pull request #543 from krtcom/feat_i18n_sk
5 years ago
krtcom 0d721f9ebe
Alphabetical order
5 years ago
Jelmer Vernooij 3eb7f349e6
Merge pull request #544 from krtcom/bug_fetch_comments
5 years ago
Michal Krnáč 9161983a05 cancel fetching comments if #isso-root is not available
5 years ago
Michal Krnáč 0d4d758099 add slovak translations
5 years ago
Jelmer Vernooij 31db6b61e7 Fix code-block syntax.
5 years ago
Jelmer Vernooij 8c82ffde9f
Merge pull request #535 from Kwpolska/patch-1
5 years ago
Chris Warrick 22abbcdbb4
Include user e-mails in admin notifications only
5 years ago
Jelmer Vernooij c2136ce10a
Merge pull request #532 from Kwpolska/update-polish-translation
5 years ago
Chris Warrick f1dcd17e37 Enable Polish locale and use Polish plural forms
5 years ago
Chris Warrick bcff21f06f
Add missing messages to Polish translation
5 years ago
Chris Warrick 86a88b5ea5
Fix Polish translation of Preview button
5 years ago
Jelmer Vernooij 6092881bb2
Merge pull request #528 from mardy/fcgi-doc
5 years ago
Alberto Mardegan 02bf0a0759 docs: update deployment info for FastCGI
5 years ago
Jelmer Vernooij b0d385b6b5
Start on 0.12.3.
5 years ago
Jelmer Vernooij 7be6a756a3
Preparing
5 years ago
Jelmer Vernooij 0748eedd30
Merge pull request #526 from posativ/revert-356-feature/postbox-input-labels-2
5 years ago
Jelmer Vernooij 8aeff4acb2
Revert "Use <label>s rather than placeholders"
5 years ago
Jelmer Vernooij 1d5d356237
Merge pull request #525 from lioman/patch-1
5 years ago
Lioman 771f6b7c95
fix typo
5 years ago
Jelmer Vernooij 4fe24296a2 Start on 0.12.2.
5 years ago
Jelmer Vernooij 534d35e3c6
Preparing 0.12.1.
5 years ago
Jelmer Vernooij 12766c1e88 Make check no longer exists, update releasing docs.
5 years ago
Jelmer Vernooij a0b637eb5a Update NEWS.
5 years ago
Jelmer Vernooij 161f2dfa20
Revert "Removes potential '//' from email links (#420)"
5 years ago
Jelmer Vernooij 2f54c9236b Start on 0.12.1.
5 years ago
Jelmer Vernooij 434d0341f6
Preparing 0.12.0
5 years ago
Jelmer Vernooij bd22b0017f
Fix compatibility with new XML API.
5 years ago
Jelmer Vernooij abba561a1d
Fix some typos.
5 years ago
Jelmer Vernooij 24aeb9e567
Merge pull request #520 from Matolivier-1/master
5 years ago
Matthieu Olivier b1ea9b2fb3 Fix missing letter
5 years ago
root e3d5741c51 Rollback quickstart + split documentation for advanced migrations
5 years ago
Jelmer Vernooij 57af7a782d
Merge pull request #356 from mpchadwick/feature/postbox-input-labels-2
5 years ago
Benoit Latinier 5cfbb3274c
Merge pull request #522 from silberzwiebel/patch-1
5 years ago
kartoffelsalat b2251e9201
German translation for reply notification in de.js
5 years ago
Matthieu Olivier acb1e25193 Code was not visible
5 years ago
Matthieu Olivier 97ceaa1748 Activate generic importer + document usage
5 years ago
Matthieu Olivier c47f705907 Activate generic importer + document usage
5 years ago
Jelmer Vernooij 5d15728eb0
Merge pull request #511 from fliiiix/improvement/docs
5 years ago
Jelmer Vernooij 06d49292a6
Merge pull request #510 from fliiiix/bugfix/disqus_import
5 years ago
fliiiix d2ced12f80 Consistency and link to client config
5 years ago
Jelmer Vernooij 5b44ca8fb2
Merge pull request #519 from HorlogeSkynet/master
5 years ago
Samuel FORESTIER 1a3f803b96
Removes potential '//' from email links (#420)
5 years ago
Benoit Latinier 784e08170a
Merge pull request #514 from WanderlandTravelers/override-translations
5 years ago
Jelmer Vernooij 2ca39dee82
Merge pull request #515 from SnorlaxYum/patch-3
5 years ago
Sim ad2b7b6233
Update faq.rst
5 years ago
Jelmer Vernooij 915c74dc1b
Merge pull request #513 from WanderlandTravelers/attr-data-isso-reply-notifications
5 years ago
Brad Pitcher ebefbe6a4a
fix inline code highlighting
5 years ago
Brad Pitcher 423d73664b fix typo in translation override docs
5 years ago
Brad Pitcher 47a5b2c84b override translation strings using data attributes
5 years ago
Brad Pitcher dfbb7fa413
Add data-isso-reply-notifications to attributes
5 years ago
fliiiix a3ac7b9081 Use default IP if none is found Fix #477
6 years ago
fliiiix 1f4ced626c Import disqus posts without Email Fix #477
6 years ago
Jelmer Vernooij 40d011e6bb
List Benoît and myself as co-maintainers.
6 years ago
Jelmer Vernooij a45ef339e6
Merge pull request #490 from vincentbernat/fix/css-notification
6 years ago
Jelmer Vernooij adc4f839fc
Merge pull request #504 from doenietzomoeilijk/patch-1
6 years ago
Max Roeleveld 8a46e13028
Add a missing closing brace
6 years ago
Jelmer Vernooij 966d403ebb
Merge pull request #499 from jelmer/admin-bool
6 years ago
Jelmer Vernooij afc90a05cc
Reject actual logins when admin is disabled.
6 years ago
Jelmer Vernooij 5d811e3a51
Document the admin configuration.
6 years ago
Jelmer Vernooij 77813de8f9
Don't open the admin page with a default password by default. Fixes #491
6 years ago
Jelmer Vernooij e6132580a9
Merge pull request #496 from vincentbernat/fix/feedlink-append
6 years ago
Vincent Bernat fd46a7d86e embed: fix feed link creation on older browsers
6 years ago
Jelmer Vernooij 1d16db53da
Merge pull request #495 from flortsch/master
6 years ago
Florian Latifi c5311e1d7d Properly handle to field in mail notifications when using uWSGI spooler
6 years ago
Jelmer Vernooij b88e6e870d
Start on 0.11.2.
6 years ago
Jelmer Vernooij 8ad5496585
Release 0.11.1
6 years ago
Jelmer Vernooij 1e9465e3fe
Support providing path to SASS.
6 years ago
Jelmer Vernooij 1957ae517e
Add notes about building js and css.
6 years ago
Vincent Bernat 80257353ba css: reduce size of the label for reply notifications
6 years ago
Vincent Bernat 527f287826 css: fix vertical alignment of notification checkbox
6 years ago
Jelmer Vernooij 5dc07b29e4
Start on 0.11.1.
6 years ago
Jelmer Vernooij e648bee33d
Preparing release 0.11.0.
6 years ago
Jelmer Vernooij 54c72f379a
Add notes on releasing new versions.
6 years ago
Jelmer Vernooij cc07f0b22f
Fix another python3-specific flake.
6 years ago
Jelmer Vernooij 20f2f2a1f5
Remove old pyflakes commands.
6 years ago
Jelmer Vernooij 63cc15a962
Fix current flakes.
6 years ago
Jelmer Vernooij 62ddcba701
Move flakes command into Makefile.
6 years ago
Jelmer Vernooij eb0052c53f
Fix rst syntax error.
6 years ago
Jelmer Vernooij 0456d68f29
Fix address anonimization function on Python 2.
6 years ago
Jelmer Vernooij 8801c6eec8
remove unused imports.
6 years ago
Jelmer Vernooij f2333d716d
Merge pull request #489 from agdg/patch-1
6 years ago
Antonio Guillen 9619f56269
Fix markdown
6 years ago
Benoît Latinier dfbc80d5b6
Merge pull request #486 from vincentbernat/fix/anchor-load
6 years ago
Vincent Bernat 463f76cb0b embed: do not jump to unrelated anchor on load
6 years ago
Jelmer Vernooij f6271a04a2
Merge pull request #485 from gloomy-ghost/bleach
6 years ago
gloomy-ghost 13426ca43c fix tests
6 years ago
Jelmer Vernooij f1a4478272 Use bleach to sanitize HTML; allows use with newer versions of html5lib.
6 years ago
Jelmer Vernooij 8e37a88d6d
Merge pull request #484 from gloomy-ghost/tests
6 years ago
gloomy-ghost c27e3d9838 do not use `NOT NULL` with `DEFAULT` at the same time
6 years ago
Benoît Latinier d214e53bb6
Merge pull request #480 from frenchvandal/master
6 years ago
Benoît Latinier 14303d0377
Merge pull request #479 from javier-lopez/patch-1
6 years ago
Philippe e993b498a0
Minor typographic tweaks in French translation
6 years ago
Javier López 32f98ce3f2
update es.js
6 years ago
Benoît Latinier 5bc176d85b
Merge pull request #473 from jtanx/inet
6 years ago
Jeremy Tan faaff1d4ac Use AF_INET if AF_UNIX isn't available (i.e. Windows)
6 years ago
Benoît Latinier 4c9692264f add: contributors & changes
6 years ago
Benoît Latinier e680c91f4a
Merge pull request #472 from Rocket1184/hotfix/i18n-fix-zh-optional-placeholder
6 years ago
Benoît Latinier c9230d5a52
Merge pull request #438 from vincentbernat/fix/rss-relative
6 years ago
Rocka 2f45f3f82e
i18n: fix zh_CN/TW 'optional' in postbox placeholder
6 years ago
Benoît Latinier 9c57ac22e5
Merge pull request #471 from pozitron57/patch-6
6 years ago
Sergey Lisakov 20ba003791
Make password form focused on page load
6 years ago
Benoît Latinier dc4b0a7baf
Merge pull request #468 from pozitron57/patch-5
6 years ago
Benoît Latinier 263305f718
Merge pull request #469 from Rocket1184/hotfix/i18n-zh-postbox-notification
6 years ago
Sergey Lisakov be1e81b109
typo
6 years ago
Rocka 6d62e91a77
i18n: zh_CN/TW translate for 'postbox-notification; use full-width brackets
6 years ago
Sergey Lisakov fe3088df2b
fix link to misaka extensions
6 years ago
Benoît Latinier 0a7b8ae7df
Merge pull request #447 from tribut/wsgi-docs
6 years ago
Benoît Latinier 5dad7bd353
Merge pull request #466 from pozitron57/patch-4
6 years ago
Sergey Lisakov b1bbf70fd8
add "postbox-notification"
6 years ago
Benoît Latinier b93e055677
Merge pull request #463 from Rocket1184/hotfix/admin-page-comment-style
6 years ago
Benoît Latinier c801d18bd9
Merge pull request #452 from Rocket1184/fetaure/client-async-comment-load
6 years ago
Rocka 7f2b4eec8c
update CONTRIBUTORS.txt
6 years ago
Rocka 858d64d092
doc: minor syntax changes about async comments loading
6 years ago
Benoît Latinier 1d9cea8831
Merge pull request #458 from craigphicks/host-subdir
6 years ago
Benoît Latinier 53d5ad441c
Reply notification (#443)
6 years ago
Pelle Nilsson d80f7c4224 Documentation for reply notifications
6 years ago
Pelle Nilsson 18b1d11007 Add client-side configuration setting reply-notifications
6 years ago
Pelle Nilsson 1dd95d5aad New setting general.reply-notifications
6 years ago
Pelle Nilsson 171fcfab72 Postpone notifications to users until comment has been approved by moderator
6 years ago
Craig P Hicks 96575323cd conform to public_endpoint config option with internal local host fallback
6 years ago
Craig P Hicks af023741d9 changes as requested by @blatinier
6 years ago
root b7e1666dd4 allow isso to be accessed/mounted on a server subdirectory, e.g., https://example.com/isso
6 years ago
Benoît Latinier 9c3a209850
Merge pull request #456 from farooqkz/patch-1
6 years ago
Farooq Karimi Zadeh 70f9aab7cb
a little improvements
6 years ago
Rocka 795035ff6c
template: admin: add id `isso-root` to comments wrapper
6 years ago
Rocka 61b3b69557
doc: add doc for dynamic comment loading
6 years ago
Rocka a87815fcba
client: define an global object `Isso`, for loading comments dynamically
6 years ago
Pelle Nilsson 3e45ccb7e5 Fix whitespace issue
6 years ago
Pelle Nilsson 9b2a56e467 Introduce public-endpoint setting
6 years ago
Felix Eckhofer 8360dacbb1
Update docs for mod_wsgi
6 years ago
Pelle Nilsson 717837b35a Correct hash in 'unsubscribe' API example
6 years ago
Pelle Nilsson 0063fd6e88 Make unsubscribe work with notifications for replies
6 years ago
Vincent Bernat 8e4f2ab1c7 feed: remove trailing / from base URL
6 years ago
Benoît Latinier 3d0fdffcb7
Merge pull request #415 from facundobatista/generic-importer
6 years ago
Benoît Latinier 2135743ea7
Merge branch 'master' into generic-importer
6 years ago
Benoît Latinier 893f35a4e4
Merge pull request #436 from JuliusPC/patch-1
6 years ago
JuliusPC 729a65f177
Fix spelling of "E-Mail" → https://www.duden.de/rechtschreibung/E_Mail
6 years ago
Benoît Latinier 9d92f59aac
Merge pull request #434 from Lucas-C/deprecated_scss
6 years ago
Benoît Latinier 2b7c6629ea
Merge pull request #435 from Lucas-C/env_vars_doc
6 years ago
Lucas Cimon b73255ec2e
Adding documentation on the ISSO_CORS_ORIGIN env variable - close #407
6 years ago
Lucas Cimon 575c433fda
Substituting scss command in Makefile by node-sass + adding comment with instructions on how to install Makefile dependencies
6 years ago
Benoît Latinier 97721c7eef
Merge pull request #425 from vincentbernat/fix/dockerfile-cffi
6 years ago
Benoît Latinier 5e65e46b59
Merge pull request #426 from vincentbernat/fix/feedlink-append
6 years ago
Benoît Latinier e745f326db
Merge pull request #428 from pozitron57/patch-2
6 years ago
Benoît Latinier 2064f3a29b
Merge pull request #427 from Rocket1184/hotfix/i18n-zh-postbox-preview
6 years ago
Sergey Lisakov 530b541f68
Correct translation for "preview" button
6 years ago
Rocka dda616eef3
i18n: fix zh_CN/TW translate of 'postbox-preview'
6 years ago
Pelle Nilsson f6f61c547a Merge remote-tracking branch 'posativ/master' into reply_notification
6 years ago
Vincent Bernat 311f65d52b embed: fix feed link creation on older browsers
6 years ago
Vincent Bernat 9b911f3257 docker: install cffi inside virtualenv
6 years ago
Benoît Latinier c26d59de08
Merge pull request #424 from posativ/misaka_2
6 years ago
Steffen Prince 7cdb47d875 Update renderer to match Misaka 2.0 API
6 years ago
Steffen Prince eef7ea261d Add `cffi` to `setup_requires`
6 years ago
Steffen Prince c38851a6cd Update to misaka 2.0
6 years ago
Benoît Latinier ce98f93934 update changelog
6 years ago
Benoît Latinier 94d031444d add: CONTRIBUTORS + pep8
6 years ago
Benoît Latinier b21f2e4aaa
Merge pull request #317 from benjhess/feature/gravatar-support
6 years ago
Benoît Latinier 6da91d4ace
Merge branch 'master' into feature/gravatar-support
6 years ago
Benoît Latinier 3754ba7596
Merge pull request #414 from vincentbernat/fix/no-eval
6 years ago
Benoît Latinier 3d1cded70f Merge branch 'master' of github.com:posativ/isso
6 years ago
Benoît Latinier 466654b50d update CONTRIBUTORS
6 years ago
Benoît Latinier 514c5d42b6
Merge pull request #422 from Lucas-C/master
6 years ago
Benoît Latinier c14f639e75 add: CONTRIBUTORS update
6 years ago
Benoît Latinier ad6e868ba5
Merge pull request #416 from vincentbernat/feature/preview
6 years ago
Benoît Latinier dc6157897f
Merge pull request #423 from posativ/fix-tests
6 years ago
Benoît Latinier 3d648c2d29
fix tests due to non predictive html rendering
6 years ago
Lucas Cimon 501bdc59bf Bugfix to support <a> elements in SVG diagrams - close #421
6 years ago
Vincent Bernat b0264bc807 js: add a preview button to see a rendered preview
6 years ago
Benoît Latinier 55dac39bdd
Merge pull request #418 from vincentbernat/feature/nofollow-links
6 years ago
Benoît Latinier b5c40bedf7
Merge pull request #419 from vincentbernat/feature/atom-feed
6 years ago
Vincent Bernat 01cf96eeb7 feed: ensure Markdown rendering is applied to feeds
6 years ago
Benoît Latinier 502747cb75
Merge pull request #411 from Rocket1184/hotfix/demo-and-admin-redirect
6 years ago
Benoît Latinier bb924ead86
Merge pull request #417 from vincentbernat/fix/css-cleanup
6 years ago
Vincent Bernat 45f6b1eda3 feed: make /feed API call configurable server and client-side
6 years ago
Vincent Bernat bceb69518b js: put a link to Atom feed on top of the main postbox
6 years ago
Vincent Bernat a89debbc9c api: add a simple test for /feed endpoint
6 years ago
Vincent Bernat 5c6e78b9c1 api: ensure /feed is easily cacheable by issuing etag/last-modified headers
6 years ago
Vincent Bernat ebca06059a api: add /feed API to get an Atom feed for an URI
6 years ago
Vincent Bernat 8d8f9c8c59 html: add nofollow/noopener to links
6 years ago
Vincent Bernat fcf576dd08 css: remove CSS code for avatar in postbox
6 years ago
Pelle Nilsson 36d4ceb2d9 Don't send notification when someone responds to his/her own comment
6 years ago
Facundo Batista 14195d3711 Used proper open and not check timing
6 years ago
Facundo Batista 3ee13ab9fc Removed debug line
6 years ago
Facundo Batista be5792cb79 Merged master in
6 years ago
Facundo Batista 04b6d70b01 Added a generic way to migrate from a json file
6 years ago
Benoît Latinier 07ce742b77
add documentation for uberspaces users (closes #409)
6 years ago
Benoît Latinier 93ea722992
add contributors
6 years ago
Benoît Latinier e285c91112
Merge pull request #412 from vincentbernat/feature/dockerfile
6 years ago
Vincent Bernat 9618c0f3a3 jade: avoid using eval once compiled
6 years ago
Benoît Latinier 47b14ab0c8
Merge pull request #413 from vincentbernat/fix/doc-isso-id
6 years ago
Vincent Bernat 30f0c7eeb8 docs: document data-isso-id
6 years ago
Vincent Bernat 2b7c17a361 Provide a multi-staged Dockerfile
6 years ago
Pelle Nilsson 22a36bdb7c Support notifications also for replies
6 years ago
Pelle Nilsson da6bb0cec7 Fix faulty check for parent comment
6 years ago
Rocka 30fef390f5
fix: admin and demo view redirect issue
6 years ago
Benoît Latinier d854ce8347
Merge pull request #410 from Rocket1184/hotfix/space-between-number-and-cjk-char
6 years ago
Rocka 4e2d2dfb20
i18n: add space between number and CJK character
6 years ago
Yuchen Pei 73c7933548 A quick dirty fix of #401 (#406)
6 years ago
Cimon Lucas (LCM) 361c596bf2 Adding support for ISSO_CORS_ORIGIN env variable to allow defining wildcard CORS origins
6 years ago
Jelmer Vernooij af3903e462
Merge pull request #399 from facundobatista/patch-1
6 years ago
Facundo Batista 28e154acfc
Small typo
6 years ago
Pelle Nilsson c9045f5b1f Implement opt-out for email notifications
6 years ago
Pelle Nilsson bc4bc55025 Include link to comment in email notifications
6 years ago
Pelle Nilsson 2e85ec653f Make SMTP connections thread safe
6 years ago
Pelle Nilsson 107b9be003 Add notification column to database if needed
6 years ago
Pelle Nilsson c30873e8a2 Merge remote-tracking branch 'tsileo/reply_notification' into reply_notification
6 years ago
Benoît Latinier 450291440f update doc
6 years ago
Benoît Latinier 0ff39017c6 drop wheezy testing which is EndOfLife (closes #385)
6 years ago
cclauss 7f55c81e08 autopep8 the code and then flake8
6 years ago
Benoît Latinier a68d392f9c add changes in CHANGES file to prepare release
6 years ago
Jelmer Vernooij 2cc564eeca
Merge pull request #380 from cclauss/drop-support-for-python-2.6-and-3.3
6 years ago
cclauss 343f24377f
Return to pyflakes
6 years ago
Martin Schenck 6ccebce041 Improved German translation
6 years ago
cclauss b569b19a7f compat.py passes pyflakes test
6 years ago
Benoît Latinier 2b56963f31 fix pyflakes error, make travis happy
6 years ago
Benoît Latinier d2b573a4d5
Merge pull request #256 from blatinier/issue-10/admin-interface
7 years ago
Jelmer Vernooij ea3507910f
Merge pull request #354 from mpchadwick/feature/comment-placeholder-color
7 years ago
Jelmer Vernooij 42bbe174cd
Merge pull request #357 from mpchadwick/feature/hu-order
7 years ago
Max Chadwick 3efe0c86d9 Put hu into correct alphabetical order
7 years ago
Max Chadwick be26948fff Use <label>s rather than placeholders
7 years ago
Jelmer Vernooij 0232051d1d
Merge pull request #355 from mpchadwick/fix/hu-translation
7 years ago
Max Chadwick 9ab23c0908 Fix hungarian translation
7 years ago
Max Chadwick 21983a61b6 Darken placeholder text
7 years ago
Jelmer Vernooij b7526ecab1
Merge pull request #350 from guthypeter/master
7 years ago
Peter Guthy 02eaffea21 Added hungarian translation
7 years ago
Martin Zimmermann 650c6cf126 Merge pull request #341 from macedigital/fix-identicon-hash-size
7 years ago
Martin Zimmermann 6a60f831b0 remove unused variable
7 years ago
Martin Zimmermann 9b0e3d29fe revert incorrect removal of the internal server startup CLI
7 years ago
Matthias Adler 43623f349b
Fix: Truncate key-length when generating identicons
7 years ago
Martin Zimmermann c3933bd9fd fix sphinx build
7 years ago
Martin Zimmermann c72946dc14 Run travis tests with python 3.5 & python 3.6
7 years ago
Martin Zimmermann 4c03a43c28 remove data-isso-id from documentation, it usually doesn't work as expected
7 years ago
Martin Zimmermann e3a8d0b93d fix db test with incorrect SQL id, that happened work with pre-3.6 dicts before
7 years ago
Jelmer Vernooij dc883e672a
Fix short title underline.
7 years ago
Jelmer Vernooij 539e6e4486 Merge pull request #336 from jelmer/flakes
7 years ago
Jelmer Vernooij 280b0d925a
Skip compat module when running flakes checks.
7 years ago
Jelmer Vernooij 39debdb011
Fix flakes errors.
7 years ago
Jelmer Vernooij 59b345b648
Run pyflakes on travis.
7 years ago
Jelmer Vernooij 8c33a84dd3 Merge pull request #253 from jGleitz/apidoc
7 years ago
Jelmer Vernooij b8adfe3f18 Merge pull request #316 from shengbinmeng/patch-1
7 years ago
Shengbin Meng 2f7d6aa09b Merge branch 'master' into patch-1
7 years ago
Jelmer Vernooij 71bda25568 Merge pull request #312 from pellenilsson/fix-require-email
7 years ago
Jelmer Vernooij c8e4e74514 Merge pull request #335 from philipcmonk/time
7 years ago
Jelmer Vernooij afbcb6413e
Add da entry to i18n.js.
7 years ago
Jelmer Vernooij 6006cd9e82
Merge Danish translation from https://github.com/MadsRC/isso
7 years ago
Philip Monk 26f0e06e78 display only complete units of time
7 years ago
Jelmer Vernooij 616c61ea88 Merge pull request #291 from ivegotasthma/ivegotasthma-patch-1
7 years ago
Jelmer Vernooij a23317818f Merge pull request #315 from ginggs/patch-1
7 years ago
Jelmer Vernooij 384673ebdb
Run travis tests with python 3.5 & python 3.6.
7 years ago
Jelmer Vernooij 7bfe36bfdf
Specify Python versions to use in travis.
7 years ago
Jelmer Vernooij 2f3cd0ac46 Merge pull request #325 from SilverRainZ/patch-1
7 years ago
Jelmer Vernooij fe4a1a11e9 Merge pull request #298 from kAworu/patch-2
7 years ago
谷月轩 fd0147e8ab Fixed typo in isso.conf
7 years ago
Jeremy Tan b14b1b51a9 validate->activate
7 years ago
Jeremy Tan cc8e61533f Add templates to MANIFEST.in
7 years ago
Benoît Latinier 84381f4f48 add: link to the thread
7 years ago
Benoît Latinier 2adb779fef add: edit author/email/website/message
7 years ago
Benoît Latinier e3fddf4ae8 add: orders in administration
7 years ago
Benoît Latinier 3212bf762f fix 500 error on pagination
7 years ago
Benoît Latinier 0b6a0e4d5f add: group by thread
7 years ago
Benoît Latinier 1516f56cbd fix: cursor pointer on links delete/validate
7 years ago
Benoît Latinier 7a79746f73 add: show author email
7 years ago
Benoît Latinier 0a93c866ff Add a basic admin interface (Fix issue #10)
7 years ago
benjhess e9eebf58e3 Refactored comments unittest to work with optional gravatar feature
7 years ago
benjhess 48a3bd72c8 Trigger
7 years ago
benjhess cbd4d90cb7 Added optional gravatar support
7 years ago
Shengbin Meng a9500e29dd Add language "zh" as alias of "zh_CN"
7 years ago
Shengbin Meng 4b7a32afac Make the Chinese translations actually work
7 years ago
Graham Inggs 88aafa60e5 add SOURCELINK_SUFFIX for compatibility with Sphinx 1.5
7 years ago
Pelle Nilsson 45a481daeb Fix require-email setting, #308
7 years ago
Martin Zimmermann d37b5bb030 Merge pull request #303 from MorrisJobke/highlight-links-in-text
7 years ago
Morris Jobke f33ca31320
Highlight links by underline in comments
7 years ago
Mads R. Havmand cd460ef152 Danish translation
7 years ago
Alexandre Perrin 03b0de2d81 api.rst: JSON and english typos
7 years ago
Martin Zimmermann e853442468 Merge pull request #295 from kAworu/patch-1
7 years ago
Alexandre Perrin 3d67f10c72 default isso.conf typo
7 years ago
Martin Zimmermann f3b1d0ba07 Merge pull request #293 from ckoepp/master
7 years ago
Christian Koepp 45316e535a added FreeBSD rc.d script
7 years ago
ivegotasthma 09b69feae9 fix: add missing i18n entry
8 years ago
Martin Zimmermann 750bcd4829 Merge commit 'f9a36c8'
8 years ago
Martin Zimmermann 6e56afdd02 Merge branch 'pr/281'
8 years ago
Martin Zimmermann 5e7f010241 add persian to i18n
8 years ago
Philip Monk f9a36c8b92 update doc to reflect 5ce48de
8 years ago
Aidin Gharibnavaz 5bd7de084f Adding Persian translation.
8 years ago
Martin Zimmermann a361ee3980 Back to development: 0.10.7
8 years ago
Martin Zimmermann ed6542c764 Preparing release 0.10.6
8 years ago
Martin Zimmermann 339318eb92 set require-author to false by default
8 years ago
Martin Zimmermann 80c1faeb82 Back to development: 0.10.6
8 years ago
Martin Zimmermann 9114275bca Preparing release 0.10.5
8 years ago
Martin Zimmermann bc244c9218 add changelog for 0.10.5
8 years ago
Martin Zimmermann 121b9aa3af update authors
8 years ago
Martin Zimmermann eeb091974d add bulgarian translation to i18n.js, #272
8 years ago
Martin Zimmermann 37b7690b2b append Github's .gitignore to .gitignore
8 years ago
Martin Zimmermann 2542acfca8 remove duplicated werkzeug compat middleware
8 years ago
Martin Zimmermann 4fc6d5ac33 Merge pull request #263 from gumblex/master
8 years ago
Martin Zimmermann a52a0862a8 Merge pull request #260 from panta82/vote-levels
8 years ago
Martin Zimmermann 3dff66c2de Merge pull request #268 from lynndotconfig/master
8 years ago
Liping Wang 12d85242dc correct offset localtime for comments ago
8 years ago
Dingyuan Wang c83346834e fix "optional" in zh translations
8 years ago
Martin Zimmermann 689f3b906c Merge remote-tracking branch 'tska/finnish'
8 years ago
Timo Kankare 75371bdd43 Ordered fi after en.
8 years ago
Ivan Pantic fd3f6f820d Documentation for vote levels
8 years ago
Ivan Pantic 4972433406 Vote levels features (custom classes based on the comment votes)
8 years ago
Ivan Pantic b0f8606b0f Hiding zero votes is now done through CSS instead of javascript.
8 years ago
Ivan Pantic b620f2c0b0 Bug when content is number 0.
8 years ago
Timo Kankare 14962ad51f Added fi to i18.n.js.
8 years ago
Timo Kankare cf20bc5687 Finnish translation. i18n/fi.js added.
8 years ago
Martin Zimmermann 46b2874b3d Merge pull request #252 from blatinier/issue-27/data-attr-overide
8 years ago
Martin Zimmermann bbff002bd6 Merge pull request #254 from jGleitz/preview
8 years ago
Martin Zimmermann 7cba8f9880 Merge pull request #257 from blatinier/issue-124/mandatory-name
8 years ago
Benoît Latinier 459611c0e7 Add an option for mandatory author (Fix issue #124)
8 years ago
Joshua Gleitze 3c9bbda252 preview endpoint
8 years ago
Joshua Gleitze 2a11c000d4 convert bad tabs to spaces
8 years ago
Joshua Gleitze 084f6e5cf0 apidoc settings
8 years ago
Joshua Gleitze 8a9fe29bce apidoc for count
8 years ago
Joshua Gleitze afd4107ac3 apidoc for like & dislike
8 years ago
Joshua Gleitze ded4927ae4 apidoc for moderate
8 years ago
Joshua Gleitze c3439e5c79 apidoc for "delete comment"
8 years ago
Joshua Gleitze 9b79a98851 apidoc for "edit comment"
8 years ago
Joshua Gleitze 1f804bcf8e apidoc for "view comment"
8 years ago
Joshua Gleitze b2d9c80b5f apidoc for "new comment"
8 years ago
Joshua Gleitze 5ca5d680fa apidoc for fetch
8 years ago
Joshua Gleitze aa373f798f + apidoc.json
8 years ago
Benoît Latinier 54a11c95f7 Update documentation
8 years ago
Benoît Latinier f1325ccaca Fix issue #27 on override thread discovery with custom data-attributes
8 years ago
Martin Zimmermann 4d3f6fa390 Back to development: 0.10.5
8 years ago
Martin Zimmermann 40ba1663aa Preparing release 0.10.4
8 years ago
Martin Zimmermann edf62b1c61 update changelog
8 years ago
Martin Zimmermann 0377c8bb20 fix reponse for OPTIONS response on Python 3, #242
8 years ago
Martin Zimmermann e2fba8af66 no longer install as zipped egg
8 years ago
Martin Zimmermann 2612fbc0f5 fix missing wrapper attribute
8 years ago
Martin Zimmermann c8311bdda7 Merge pull request #243 from pozitron57/patch-2
8 years ago
Sergey Lisakov 2a6aa1203b Fix pluralisation issues and inexact translation
8 years ago
Martin Zimmermann b5e7c78dcc Merge pull request #237 from jelmer/rjs
8 years ago
Martin Zimmermann 05bd6b3137 Merge pull request #236 from jelmer/man
8 years ago
Jelmer Vernooij ba43de3f9b
Add make variable for r.js, so it can easily be overriden.
8 years ago
Jelmer Vernooij 2dca30f46d
Create man page directory before moving files to them.
8 years ago
Martin Zimmermann 6971f14233 Back to development: 0.10.4
8 years ago
Martin Zimmermann 8d9ee1db14 Preparing release 0.10.3
8 years ago
Martin Zimmermann 3cd475ec31 follow redirects, fix #193
8 years ago
Martin Zimmermann 00bb42e831 add support for older setuptools (6.0 or maybe even older)
8 years ago
Martin Zimmermann 0e1b8b38b2 Back to development: 0.10.3
8 years ago
Martin Zimmermann 0e817a928a Preparing release 0.10.2
8 years ago
Martin Zimmermann 8b76a7a208 update changelog and fix wording
8 years ago
Martin Zimmermann 3281d645f8 run Tox with setuptools 6.1 or higher
8 years ago
Martin Zimmermann a3a1d8cb86 fix getAttribute return value
8 years ago
Martin Zimmermann 098f09e6df upgrade Travis' pip for PEP 426
8 years ago
Martin Zimmermann 032058b778 fix typo
8 years ago
Martin Zimmermann e24ac9aff8 Back to development: 0.10.2
8 years ago
Martin Zimmermann 7961943571 Preparing release 0.10.1
8 years ago
Martin Zimmermann 2e132f26db update changelog
8 years ago
Martin Zimmermann 3e309e0850 fix input field value access
8 years ago
Martin Zimmermann 6fdcbfb1b7 Back to development: 0.11
8 years ago
Martin Zimmermann b4da20a541 Preparing release 0.10
8 years ago
Martin Zimmermann 9496d7d4c2 use environment markers as defined by PEP 426
8 years ago
Martin Zimmermann 1401132c73 pin html5lib to 0.9999999
8 years ago
Martin Zimmermann 829ef4f502 make universal wheels
8 years ago
smileboy b48ac000b1 config.js error.
8 years ago
Martin Zimmermann 84f8acb21e Merge pull request #225 from gdyer/patch-1
8 years ago
Graham Dyer 890f296d58 fixes 2 typos
8 years ago
Martin Zimmermann 57f902acd4 actually include isso/defaults.ini
8 years ago
Martin Zimmermann 622b59f8a4 move default config expansion to function body (`default` already exists)
8 years ago
Martin Zimmermann 93e783ed60 symlink share/isso.conf to isso/defaults.ini and include it properly
8 years ago
Martin Zimmermann 5eb101fcb3 bump copyright year in docs and manpages
8 years ago
Martin Zimmermann 8579cbd6f8 fix undefined variable usage and enumeration logic
8 years ago
Martin Zimmermann 00ed48a1d3 fix incorrect define header
8 years ago
Martin Zimmermann 4c36db1ad2 Merge branch 'legacy/0.9'
8 years ago
Martin Zimmermann 1f86fa897e add vi (vietnamese) translation, #222
8 years ago
Martin Zimmermann dd9ebdc46b Merge remote-tracking branch 'origin/pr/222'
8 years ago
Martin Zimmermann 815c7f54b5 add hr (croatian) translation
8 years ago
Martin Zimmermann dc1d83b74b add cs (czech) translation
8 years ago
Martin Zimmermann 1201c5145d fix link to gevent, #204
8 years ago
Martin Zimmermann 7d89b94d66 Merge remote-tracking branch 'origin/pr/198'
8 years ago
Martin Zimmermann e52c7f801a ignore pip-selfcheck.json
8 years ago
Martin Zimmermann 4517235f85 add py35 to tox, fix missing dependency for py26
8 years ago
Martin Zimmermann fc10a30091 fix init script, #221
8 years ago
Martin Zimmermann 2e41c4728a don't extend native objects, #191
8 years ago
Đinh Xuân Sâm 5ce7084f59 Fix typo: s/trướ/trước
9 years ago
Đinh Xuân Sâm f1a8aed320 Completed Vietnamese translation.
9 years ago
Đinh Xuân Sâm 17747368e1 Created new branch for translation: vietnamese.
9 years ago
Martin Zimmermann 2137441958 Merge remote-tracking branch 'origin/pr/214'
9 years ago
Martin Zimmermann 33c02b45b4 Merge remote-tracking branch 'origin/pr/202'
9 years ago
Martin Zimmermann 54952e67ad Merge remote-tracking branch 'origin/pr/199'
9 years ago
Martin Zimmermann bf9e803dce Merge remote-tracking branch 'origin/pr/195'
9 years ago
Steffen Prince 367ee48b76 Pin misaka to 1.x
9 years ago
Sergey Lisakov 45c4e43ba2 Update ru.js
9 years ago
Sergey Lisakov 11dff33450 Update ru.js
9 years ago
Sergey Lisakov ed0f680e97 Update Russian translation
9 years ago
Nick Hu b9ce411f85 write unit tests for require-email
9 years ago
Nick Hu cb21af4cc5 Add config for requiring emails
9 years ago
Nick Hu 9e9e7b6f66 Make Vagrant actually work
9 years ago
Mushiyo 2af17b6204 corrected punctuation
9 years ago
Mushiyo 19179b1764 modify to a better translation
9 years ago
Mushiyo b98133836d Added zh_TW translation
9 years ago
Martin Zimmermann 5d21e1b20a pin html5lib due to regression
9 years ago
Martin Zimmermann 88e77bf9a3 typo
9 years ago
Martin Zimmermann 8018a7e23d update russian translation
9 years ago
Martin Zimmermann f940d630c4 update changelog
9 years ago
Martin Zimmermann cd0b41f2a6 Merge pull request #189 from avinassh/patch-1
9 years ago
avinassh 23c19a061c Added instructions to deploy Isso on Openshift
9 years ago
Martin Zimmermann 8f23a73edd update changelog for 0.9.10
9 years ago
Martin Zimmermann 3a18013db6 Back to development: 0.9.11
9 years ago
Martin Zimmermann 42e0642263 Preparing release 0.9.10
9 years ago
Julien Enselme 7e58f6b97c Correct auth without password or username.
9 years ago
Martin Zimmermann 3f73d83c99 Merge pull request #184 from wendal/i18n_zh_CN
9 years ago
wendal 6e4d9ba446 add: zh_CN Translation
9 years ago
Martin Zimmermann 35897ef01f Merge pull request #175 from Jenselme/fedora
9 years ago
Martin Zimmermann a2bda63bf0 Merge pull request #174 from Jenselme/smptAuth
9 years ago
Julien Enselme 7e51915f54 Add fedora in the prebuilt-package section of docs/docs/install.rst.
9 years ago
Julien Enselme 6973128eac Correct auth without password or username.
9 years ago
Martin Zimmermann 630e76f66c Merge branch 'legacy/0.9'
9 years ago
Martin Zimmermann beca18a344 Back to development: 0.9.10
9 years ago
Martin Zimmermann c8655731d6 Preparing release 0.9.9
9 years ago
Martin Zimmermann ed38ce13d8 update changelog
9 years ago
Martin Zimmermann f5566c1325 encode username/password in SMTP auth only for Python 2, fix #146
9 years ago
Martin Zimmermann 596acb7f79 request with User-Agent 'Isso/...', #151
9 years ago
Sergey 56c81c2d06 Update ru.js
9 years ago
Martin Zimmermann 45053f9c0c catch errors in http response
9 years ago
Martin Zimmermann 8e4db5a7a2 typo
9 years ago
Martin Zimmermann f681002e7e add support for html5lib below 0.95, #168
9 years ago
Martin Zimmermann c3c519ad0e add compatibility middleware for werkzeug 0.8, #170
9 years ago
Martin Zimmermann 9451704d3d Revert "require html5lib 0.95 or higher, #168"
9 years ago
Martin Zimmermann e5219157a7 Merge pull request #172 from xuhdev/fix-159-2
9 years ago
Hong Xu 21e91efbf9 Save the session-key as a unicode string in the db
9 years ago
Martin Zimmermann 957fc72eb1 reject request if reject is actually defined, fix #165
9 years ago
Martin Zimmermann 0466977109 replace bullet with HTML entity, fix #169
9 years ago
Martin Zimmermann e97d2aba04 require html5lib 0.95 or higher, #168
9 years ago
Martin Zimmermann aa64b27684 Python 2.7.9 didn't get the context=ssl... backport unfortunately
9 years ago
Martin Zimmermann e3dedef7ed Merge pull request #167 from albohlabs/feature/ansible
9 years ago
Daniel Gräber 09ad29aa81 Remove .idea from gitignore
9 years ago
Martin Zimmermann e098a199f3 Merge pull request #164 from xuhdev/typo
9 years ago
Martin Zimmermann 4c9a2aba30 fetch polish translation
9 years ago
Daniel Gräber 7725cfeefc Remove old apache conf
9 years ago
Daniel Gräber b37487dcef Add comments for debugging
9 years ago
Daniel Gräber aea85f807f Edit uwsgi and nginx use tcp socket
9 years ago
Daniel Gräber 5a29d2742d Remove virtualenv
9 years ago
Daniel Gräber 6deacf9527 Update add myself to contributors list
9 years ago
Daniel Gräber 894086bda2 Fix catch socket timeout and error exceptions
9 years ago
Daniel Gräber 63c3e1252c Update gitignore
9 years ago
Daniel Gräber 8387a5390f Replace vagrant shell provisioning with ansible
9 years ago
Hong Xu 81d09bfbe4 Fix some typos in the intallation doc.
9 years ago
Martin Zimmermann 0d55dadf46 Merge pull request #163 from albohlabs/patch-1
9 years ago
Daniel Gräber 763586448a Fix npm uglifyjs missing package error
9 years ago
Martin Zimmermann 5f511023e9 Merge pull request #158 from rolisz/patch-1
9 years ago
Roland Szabo 2a3075d0fb Catch exception in anonymize function
9 years ago
Martin Zimmermann 26b889d381 Merge remote-tracking branch 'origin/pr/157'
9 years ago
Matias 1957f4f99f Update CONTRIBUTORS.txt
9 years ago
Matias dc172975ee Update CONTRIBUTORS.txt
9 years ago
Matias c5496b103d Added spanish translation
9 years ago
Matias 68a8c2c380 Update client.rst
9 years ago
Matias 4d7fc956ab Create es.js
9 years ago
Martin Zimmermann e271851b50 fetch greek translation
9 years ago
Martin Zimmermann f80460a685 Merge pull request #152 from jelmer/dutch
9 years ago
Jelmer Vernooij 00c4d4149e Import transifex improvements to Dutch translation.
9 years ago
Martin Zimmermann 81756dcefa Merge pull request #150 from jelmer/dutch
9 years ago
Jelmer Vernooij dcb7f6457c Add Dutch translations.
9 years ago
Martin Zimmermann 7c4565afc7 Merge pull request #148 from richard-fine/feature/vagrant
10 years ago
Richard Fine 6ac5e8c6d0 Reverted change to demo file; changed web server config to mount the uWSGI app at the root, as it turns out it's capable of serving the demo file itself
10 years ago
Richard Fine 18118ec080 tell uWSGI to auto-reload when .py files are changed during development
10 years ago
Richard Fine 3977a8d00d set up Vagrant support to make it easy to get a dev environment going quickly
10 years ago
Martin Zimmermann a6c859c5a5 add changelog for 0.10
10 years ago
Martin Zimmermann f47df75422 use system's CA certificates for Python 2.7.9 or higher to verify TLS connection
10 years ago
Martin Zimmermann d70eb160b9 Merge branch 'legacy/0.9'
10 years ago
Martin Zimmermann 83d3c7443c remove email field from JSON example
10 years ago
Martin Zimmermann d6602b7fe4 Merge branch 'pr/143'
10 years ago
Martin Zimmermann 7f5ff457c1 integrate swedish translation into Isso
10 years ago
Martin Zimmermann afe6ece865 Merge branch 'pr/144'
10 years ago
Martin Zimmermann b45f39e662 resolve when comment is in moderation queue, too
10 years ago
Théo Zimmermann bba91b3f93 don't lose comment if it failed to create
10 years ago
Gustav Näslund da47dbd374 Added swedish translation file
10 years ago
Martin Zimmermann 4b97684e22 fix editing when avatars are disabled
10 years ago
Martin Zimmermann c9be737f5e document broken stdout notifications, #138
10 years ago
Martin Zimmermann 89d6ea076b add --empty-id flag to import weird Disqus exports, fixes #135
10 years ago
Martin Zimmermann 8918c4a186 Merge pull request #137 from Zimmi48/master
10 years ago
Martin Zimmermann 928198f340 update translations
10 years ago
Martin Zimmermann a1be81f6c8 add UnicodeDecodeError to troubleshooting (via #93)
10 years ago
Théo Zimmermann 97015d4034 correct order by in sql request
10 years ago
Martin Zimmermann 4b64615f92 set encoding to UTF-8 for Disqus and WordPress import, also fixes #93
10 years ago
Martin Zimmermann 0d6d975f98 use /opt/isso as virtualenv and add a simple sysvinit script
10 years ago
Martin Zimmermann f0a0f40223 add fallback localStorage implementation if not functional, #134
10 years ago
Martin Zimmermann f06be982e7 add target to lint for Python 2 and 3
10 years ago
Martin Zimmermann d469324392 fix 'undefined name 'buffer'' on Python 3.x
10 years ago
Martin Zimmermann b800a8bbe7 Merge pull request #130 from Zimmi48/master
10 years ago
Théo Zimmermann d0a0ac39b0 bug fixed: was trying to remove an unexisting span.votes
10 years ago
Martin Zimmermann 74363d44ba Merge branch 'legacy/0.9'
10 years ago
Martin Zimmermann da174cd712 Back to development: 0.9.9
10 years ago
Martin Zimmermann 33a1edafac Preparing release 0.9.8
10 years ago
Martin Zimmermann a07296b9fd update changelog
10 years ago
Martin Zimmermann 88be07d5de import backports.configparser before configparser, #128
10 years ago
Martin Zimmermann 9aaac16d17 add #125 and #129 to troubleshooting
10 years ago
Julien Lamy 4bc70dd09b Update documentation for deployment with mod_wsgi
10 years ago
Martin Zimmermann 9c2a48b388 Merge branch 'legacy/0.9'
10 years ago
Martin Zimmermann 1bfd4fb916 Back to development: 0.9.8
10 years ago
Martin Zimmermann 278f5c74bc Preparing release 0.9.7
10 years ago
Martin Zimmermann 6a3a9ea114 SMTP authentication uses bytes, not unicode, fixes #126
10 years ago
Martin Zimmermann ad1fdfdb32 add note about broken WXR (use xmllint to fix)
10 years ago
Martin Zimmermann 721e87a843 Merge branch 'legacy/0.9'
10 years ago
Martin Zimmermann 6c345f5d81 Back to development: 0.9.7
10 years ago
Martin Zimmermann 9f90e67f0a Preparing release 0.9.6
10 years ago
Martin Zimmermann 4b4b4a6a66 add changes for 0.9.6
10 years ago
Martin Zimmermann c712d196d7 add option to hide voting feature, closes #115
10 years ago
Martin Zimmermann e2911da560 fix #106
10 years ago
Martin Zimmermann d21aed83f8 save name, email and website in localStorage, closes #119
10 years ago
Martin Zimmermann d9098b83f0 use different identifiers to avoid mixin events
10 years ago
Martin Zimmermann c8acd461d3 do not export email field
10 years ago
Thomas Sileo a322cf673a Bugfix
11 years ago
Thomas Sileo e50ecc7811 Removed debug info
11 years ago
Thomas Sileo 08313c191c Added reply notification for commenter
11 years ago

@ -0,0 +1,47 @@
---
kind: pipeline
name: default
platform:
os: linux
arch: amd64
steps:
- name: publish
pull: default
image: plugins/docker:18.09
settings:
registry: https://registry.nixaid.com
repo: "registry.nixaid.com/${DRONE_REPO_NAMESPACE}/${DRONE_REPO_NAME}"
tags:
- latest
username:
from_secret: docker_username
password:
from_secret: docker_password
# storage_path: /drone/docker
# storage_driver: aufs
# ipv6: false
# debug: true
when:
branch:
- master
event:
- push
- tag
- name: notify
pull: default
image: drillster/drone-email:latest
settings:
from: "Drone CI <noreply@nixaid.com>"
host: mx.nixaid.com
port: 587
subject: "NIXAID Drone Pipeline {{#success build.status}}SUCCESS{{else}}FAILURE{{/success}} Notification"
when:
event:
- push
- tag
status:
- success
- failure

@ -0,0 +1,85 @@
# workspace:
# base: /workspace
# path: src/git.nixaid.com/arno/myapp/
#
# branches:
# - master
pipeline:
restore_cache:
image: drillster/drone-volume-cache:latest
restore: true
mount:
- /drone/docker
# Set the ``DRONE_VOLUME=/tmp/drone-cache:/cache`` drone-server variable,
# so you can benefit from the caching.
# Otherwise you will have to make this repository trusted in Drone and use
# the volumes as follows.
# volumes:
# - /tmp/drone-cache:/cache
# drone repo add arno/isso
# drone secret add/update --name docker_username --value arno --event push --event tag --event deployment arno/isso
# drone secret add/update --name docker_password --value "$(pass show vps/registry.nixaid.com | head -1)" --event push --event tag --event deployment arno/isso
publish:
image: plugins/docker:17.12
# repo: andrey01/${DRONE_REPO_NAME}
registry: registry.nixaid.com
repo: registry.nixaid.com/arno/${DRONE_REPO_NAME}
tags:
- latest
# - ${DRONE_COMMIT_SHA:0:7}
# group: docker
# dockerfile: Dockerfile
secrets: [docker_username, docker_password]
# Since we restore the docker image cache to /drone/docker
storage_path: /drone/docker
use_cache: true
when:
event: [push, tag]
branch: master
rebuild_cache:
image: drillster/drone-volume-cache:latest
rebuild: true
mount:
- /drone/docker
# Set the ``DRONE_VOLUME=/tmp/drone-cache:/cache`` drone-server variable,
# so you can benefit from the caching.
# Otherwise you will have to make this repository trusted in Drone and use
# the volumes as follows.
# volumes:
# - /tmp/drone-cache:/cache
# # ca_cert comes from /srv/data/registry/certs/ca.crt
# claircheck:
# # image: jmccann/drone-clair:1
# image: andrey01/drone-clair
# url: http://clair:6060
# secrets: [ docker_username, docker_password ]
# # ignore errors for now. This will work only in drone 0.9 https://github.com/drone/drone-runtime/commit/3e8bd99f60f4032226523320cd2b2321f9525159
# err_ignore: true
# scan_image: registry.nixaid.com/arno/${DRONE_REPO_NAME}:latest
# ca_cert: |
# -----BEGIN CERTIFICATE-----
# MIIBOjCB4KADAgECAgkAzhpbLWXa4H0wCgYIKoZIzj0EAwIwEDEOMAwGA1UEAwwF
# bXktQ0EwHhcNMTgwNzA5MjIzMTAzWhcNMjgwNzA2MjIzMTAzWjAQMQ4wDAYDVQQD
# DAVteS1DQTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABFIE8bTfQ76U5qG/Xgjw
# BbQU0oRJLYlRxBIWF9MTNSJr2LoaoyrU8jrcWQGRrfKPoVuwUJWp2tp5SJy0AHH7
# 4fijIzAhMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgKkMAoGCCqGSM49
# BAMCA0kAMEYCIQCYbTbxRD2yX4LzGjh84fKPWPQM9ps8RE2nfwZjqdRUGgIhAOHb
# USigh6FzqEPk2jiaV3t1wNtChRWRfupTKG6CD345
# -----END CERTIFICATE-----
notify:
image: drillster/drone-email:latest
from: Drone CI <noreply@nixaid.com>
subject: NIXAID Drone Pipeline {{#success build.status}}SUCCESS{{else}}FAILURE{{/success}} Notification
host: mx.nixaid.com
port: 587
# username: arno
# secrets: [ email_username, email_password ]
# recipients: [ andrey.arapov@nixaid.com ]
when:
status: [success, failure] # changed
event: [push, tag]

97
.gitignore vendored

@ -3,11 +3,12 @@
# For a project mostly in C, the following would be a good set of
# exclude patterns (uncomment them if you want to use them):
# *.[oa]
# *~
*~
*.pyc
.Python
.sass-cache
.vagrant
/bin
/include
@ -24,3 +25,97 @@
/docs/_build
/docs/_static/css/site.css
/pip-selfcheck.json
# github/gitignore
Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# IPython Notebook
.ipynb_checkpoints
# pyenv
.python-version
# celery beat schedule file
celerybeat-schedule
# dotenv
.env
# virtualenv
.venv/
venv/
ENV/
# Spyder project settings
.spyderproject
# Rope project settings
.ropeproject

@ -1,20 +1,22 @@
language: python
python: 2.7
env:
- TOX_ENV=py26
- TOX_ENV=py27
- TOX_ENV=py33
- TOX_ENV=py34
- TOX_ENV=squeeze
- TOX_ENV=wheezy
matrix:
allow_failures:
- env: TOX_ENV=squeeze
include:
- python: 3.5
env: TOX_ENV=py35
- python: 3.6
env: TOX_ENV=py36
- python: 3.7
dist: xenial
env: TOX_ENV=py37
- python: 3.8
dist: xenial
env: TOX_ENV=py38
install:
- pip install tox
- sudo rm -rf /dev/shm && sudo ln -s /run/shm /dev/shm
- pip install -U pip
- pip install flake8 tox
script:
- tox -e $TOX_ENV
- make flakes
notifications:
irc:
channels:

@ -1,16 +1,232 @@
Changelog for Isso
==================
0.10 (unreleased)
0.12.3 (UNRELEASED)
-------------------
- New "flags" option in the [markdown] section to customize Misaka's Markdown
HTML rendering. By default, no flags are set.
[markup]
flags = skip-html, escape, hard-wrap
Check docs/configuration/server.rst for more details.
0.12.2 (2019-01-21)
-------------------
- Revert use of labels instead of placeholders, since it breaks
mail notifications. #524
0.12.1 (2019-01-19)
-------------------
- Revert fix for duplicate slashes, as it prevents isso from
starting in some cases. #523
0.12.0 (2019-01-18)
-------------------
- Fix compatibility with new XML API.
- Don't enable admin interface with default password by default. #491
- Add support and documentation for "generic" imports.
- Remove potential duplicate slashes in URLs from
email links. #420
- Add data-isso-reply-notifications to attributes in configuration.
- Use default IP in imports if none is found. Fixes imports of some comments.
- embed: fix feed link creation on older browsers.
- Properly handle to field in mail notifications when using uWSGI spooler
- css: fix vertical alignment of notification checkbox
0.11.1 (2018-11-03)
-------------------
- Include pre-built minified JavaScript and CSS.
0.11.0 (2018-11-03)
-------------------
Bugs & features:
- Fix link in moderation mails if isso is setup on a sub-url (e.g. domain.tld/comments/)
- Add reply notifications
- Add admin interface
- Add links highlighting in comments
- Add apidoc
- Add rc.d script for FreeBSD
- Add the possibility to set CORS Origin through ISSO_CORS_ORIGIN environ variable
- Add preview button
- Add Atom feed at /feed?uri={thread-id}
- Add optionnal gravatar support
- Add nofollow noopener on links inside comments
- Add Dockerfile
- Upgraded to Misaka 2
- Some tests/travis/documentation improvements and fixes + pep8
Translations:
- Fix Chinese translation & typo in CJK
- Add Danish translation
- Add Hungarian translation
- Add Persian translation
- Improvement on german translation
0.10.6 (2016-09-22)
-------------------
- fix missing configuration field
0.10.5 (2016-09-20)
-------------------
- add support for different vote levels, #260
List of vote levels used to customize comment appearance based on score.
Provide a comma-separated values (eg. `"0,5,10,25,100"`) or a JSON array (eg.
`"[-5,5,15]"`).
For example, the value `"-5,5"` will cause each `isso-comment` to be given
one of these 3 classes:
- `isso-vote-level-0` for scores lower than `-5`
- `isso-vote-level-1` for scores between `-5` and `4`
- `isso-vote-level-2` for scores of `5` and greater
These classes can then be used to customize the appearance of comments (eg.
put a star on popular comments).
- add new post preview API endpoint, #254
- add an option for mandatory author, #257
- clients can now use `data-title` to get the HTML title for a new page, #252
- add finish translation and other minor bugfixes
0.10.4 (2016-04-12)
-------------------
- fix wrapper attribute when using data-isso-require-mail="true", #238
- fix reponse for OPTIONS response on Python 3, #242
0.10.3 (2016-02-24)
-------------------
- follow redirects, #193
0.10.2 (2016-02-21)
-------------------
- fix getAttribute return value
0.10.1 (2016-02-06)
-------------------
- fix empty author, email and website values when writing a comment
0.10 (2016-02-06)
-----------------
- Nothing changed yet.
- add new configuration section for hash handling.
[hash]
salt = Eech7co8Ohloopo9Ol6baimi
algorithm = pbkdf2
You can customize the salt, choose different hash functions and tweak the
parameters for PBKDF2.
- Python 3.4+ validate TLS connections against the system's CA. Previously no
validation was in place, see PEP-446__ for details.
- add `fenced_code` and `no_intra_emphasis` to default configuration.
Fenced code allows to write code without indentation using `~~~` delimiters
(optionally with language identifier).
Intra emphasis would compile `foo_bar_baz` to foo<em>bar</em>baz. This
behavior is very confusing for users not knowing the Markdown spec in detail.
- new configuration to require an email when submitting comments, #199. Set
[guard]
require-email = true
0.9.6 (unreleased)
and use `data-isso-require-email="true"` to enable this feature. Disabled by
default.
- new Bulgarian translation by sahwar, new Swedish translation by Gustav
Näslund #143, new Vietnamese translation by Đinh Xuân Sâm, new Croatian
translation by streger, new Czech translation by Jan Chren
- fix SMTP setup without credentials, #174
- version pin Misaka to 1.x, html5lib to 0.9999999
.. __: https://www.python.org/dev/peps/pep-0466/
0.9.10 (2015-04-11)
-------------------
- fix regression in SMTP authentication, #174
0.9.9 (2015-03-04)
------------------
- Nothing changed yet.
- several Python 3.x related bugfixes
- don't lose comment form if the server rejected the POST request, #144
- add localStorage fallback if QUOTA_EXCEEDED_ERR is thrown (e.g. Safari
private browsing)
- add '--empty-id' flag to Disqus import, because Disqus' export sucks
- (re)gain compatibility with Werkzeug 0.8 and really old html5lib versions
available in Debian Squeeze, #170 & #168
- add User-Agent when Isso requests the URL, an alternate way to #151 (add
'X-Isso' when requesting).
0.9.8 (2014-10-08)
------------------
- add compatibility with configparser==3.5.0b1, #128
0.9.7 (2014-09-25)
------------------
- fix SMTP authentication using CRAM-MD5 (incorrect usage of
`smtplib`), #126
0.9.6 (2014-08-18)
------------------
- remember name, email and website in localStorage, #119
- add option to hide voting feature, #115
data-isso-vote="true|false"
- remove email field from JSON responses
This is a quite serious issue. For the identicon, an expensive hash is used
to avoid the leakage of personal information like a real email address. A
`git blame` reveals, the email has been unintenionally exposed since the very
first release of Isso :-/
The testsuite now contains a dedicated test to prevent this error in the
future.
0.9.5 (2014-08-10)

@ -4,6 +4,11 @@
* Martin Zimmermann <info@posativ.org>
## Co-Maintainers
* Benoît Latinier @blatinier <benoit@latinier.fr>
* Jelmer Vernooij <jelmer@jelmer.uk>
## Contributors
@ -41,6 +46,76 @@ In chronological order:
* Baptiste Darthenay
* Esperanto translation
* Matías Ducasa <https://github.com/matiasducasa>
* Spanish translation
* Daniel Gräber <https://github.com/albohlabs>
* Added ansible for provisioning
* Nick Hu <https://github.com/NickHu>
* Added configuration to require email addresses (no validation)
* Fix Vagrantfile
* Benoît Latinier @blatinier <benoit@latinier.fr>
* Fix thread discovery
* Added mandatory author
* Added admin interface
* Ivan Pantic <ivanpantic82@gmail.com>
* 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
* Fix a bug with <a> in <svg>
* Fixing likes counter of replies not being displayed
* Adding contrib/dump_comments.py
* Adding a [server] proxy-fix-enable-x-prefix configuration option
* Using .access_route instead of .remote_addr to take into account HTTP_X_FORWARDED_FOR header
* 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
* Added atom feed
* Added a nofollow/noopener on links inside comments to protect against bots
* Added a preview using the existing preview endpoint
* @p-vitt & @M4a1x
* Documentation on troubleshooting for uberspace users
* Facundo Batista <facundo@taniquetil.com.ar>
* Added a generic way to migrate from a json file
* @benjhess
* Optionnal gravatar support
* Steffen Prince @sprin
* Upgrade to Misaka 2
* Rocka <i@rocka.me>
* Implementation and documentation about async comment loading
* Pelle Nilsson @pellenilsson
* Reply notifications
* Craig P Hicks @craigphicks
* Fix sub urls configurations on admin interface
* Chris Warrick @Kwpolska
* Update Polish translation
* Redirect to comment after moderation
* [Your name or handle] <[email or website]>
* [Brief summary of your changes]

@ -0,0 +1,34 @@
# First, compile JS stuff
FROM node:dubnium-buster
WORKDIR /src/
COPY . .
RUN npm install -g requirejs uglify-js jade bower \
&& make init js
# Second, create virtualenv
FROM python:3.8-buster
WORKDIR /src/
COPY --from=0 /src .
RUN python3 -m venv /isso \
&& . /isso/bin/activate \
&& pip3 install --no-cache-dir --upgrade pip \
&& pip3 install --no-cache-dir gunicorn cffi flask \
&& python setup.py install \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Third, create final repository
FROM python:3.8-slim-buster
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", "--worker-tmp-dir", "/dev/shm"]
# 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

@ -7,3 +7,13 @@ include isso/js/embed.min.js
include isso/js/embed.dev.js
include isso/js/count.min.js
include isso/js/count.dev.js
include isso/js/admin.js
include isso/defaults.ini
include isso/templates/admin.html
include isso/templates/disabled.html
include isso/templates/login.html
include isso/css/admin.css
include isso/css/isso.css
include isso/img/isso.svg

@ -1,3 +1,5 @@
# INSTALLATION: pip install sphinx && npm install --global node-sass
ISSO_JS_SRC := $(shell find isso/js/app -type f) \
$(shell ls isso/js/*.js | grep -vE "(min|dev)") \
isso/js/lib/requirejs-jade/jade.js
@ -7,7 +9,7 @@ ISSO_JS_DST := isso/js/embed.min.js isso/js/embed.dev.js \
ISSO_CSS := isso/css/isso.css
ISSO_PY_SRC := $(shell git ls-files | grep .py)
ISSO_PY_SRC := $(shell git ls-files | grep -E "^isso/.+.py$$")
DOCS_RST_SRC := $(shell find docs/ -type f -name '*.rst') \
$(wildcard docs/_isso/*) \
@ -25,26 +27,34 @@ DOCS_MAN_DST := man/man1/isso.1 man/man5/isso.conf.5
DOCS_HTML_DST := docs/_build/html
RJS = r.js
SASS = node-sass
all: man js site
init:
(cd isso/js; bower install almond requirejs requirejs-text jade)
(cd isso/js; bower --allow-root install almond requirejs requirejs-text jade)
flakes:
flake8 . --count --max-line-length=127 --show-source --statistics
isso/js/%.min.js: $(ISSO_JS_SRC) $(ISSO_CSS)
r.js -o isso/js/build.$*.js out=$@
$(RJS) -o isso/js/build.$*.js out=$@
isso/js/%.dev.js: $(ISSO_JS_SRC) $(ISSO_CSS)
r.js -o isso/js/build.$*.js optimize="none" out=$@
$(RJS) -o isso/js/build.$*.js optimize="none" out=$@
js: $(ISSO_JS_DST)
man: $(DOCS_RST_SRC)
sphinx-build -b man docs/ man/
mkdir -p man/man1/ man/man5
mv man/isso.1 man/man1/isso.1
mv man/isso.conf.5 man/man5/isso.conf.5
${DOCS_CSS_DST}: $(DOCS_CSS_SRC) $(DOCS_CSS_DEP)
scss --no-cache $(DOCS_CSS_SRC) $@
$(SASS) --no-cache $(DOCS_CSS_SRC) $@
${DOCS_HTML_DST}: $(DOCS_RST_SRC) $(DOCS_CSS_DST)
sphinx-build -b dirhtml docs/ $@
@ -55,7 +65,7 @@ coverage: $(ISSO_PY_SRC)
nosetests --with-doctest --with-coverage --cover-package=isso --cover-html isso/
test: $($ISSO_PY_SRC)
python setup.py nosetests
python3 setup.py nosetests
clean:
rm -f $(DOCS_MAN_DST) $(DOCS_CSS_DST) $(ISSO_JS_DST)

@ -1,3 +1,5 @@
[![Build Status](https://drone.nixaid.com/api/badges/arno/isso/status.svg)](https://drone.nixaid.com/arno/isso)
Isso a commenting server similar to Disqus
============================================

65
Vagrantfile vendored

@ -0,0 +1,65 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
# This is the Vagrant config file for setting up an environment for Isso development.
# It requires:
#
# * Vagrant (https://vagrantup.com)
# * A VM engine, like VirtualBox (https://virtualbox.org)
# * The Vagrant-Hostmanager plugin (https://github.com/smdahlen/vagrant-hostmanager)
# * Ansible (https://www.ansible.com)
#
# With them installed, cd into this directory and do 'vagrant up'. It's possible Vagrant will
# ask for your root password so it can update your /etc/hosts file. Once it's happily churning out
# console output, go get a coffee :)
#
# The resulting VM should be accessible at http://isso-dev.local/ so you can try the demo page out.
# Edit files in your checkout as usual. If you need to look at log files and stuff, 'vagrant ssh'
# to get into the VM. Useful info about it:
#
# * Running Ubuntu 14.04
# * Isso is running on uWSGI
# * Actual webserver is Nginx to talk to uWSGI over a unix socket
# * uWSGI log file is /var/log/uwsgi/apps/isso.log
# * Isso DB file is /var/isso/comments.db
# * Isso log file is /var/log/isso.log
#
# When the VM is getting rebooted vagrant mounts the shared folder after uWSGI is getting startet. To fix this issue for
# the moment you need to 'vagrant ssh' into the VM and execute 'sudo service uwsgi restart'.
#
# For debugging with _pudb_ stop uWSGI service and start it manually
# 'sudo uwsgi --ini /etc/uwsgi/apps-available/isso.ini'.
#
# Enjoy!
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
config.vm.box = "ubuntu/trusty32"
config.vm.hostname = 'isso-dev.local'
config.vm.network "private_network", type: "dhcp"
config.hostmanager.enabled = true
config.hostmanager.manage_host = true
config.hostmanager.ignore_private_ip = false
config.hostmanager.include_offline = true
config.hostmanager.ip_resolver = proc do |machine|
result = ""
machine.communicate.execute("ifconfig eth1") do |type, data|
result << data if type == :stdout
end
(ip = /inet addr:(\d+\.\d+\.\d+\.\d)/.match(result)) && ip[1]
end
config.vm.provision "ansible" do |ansible|
ansible.playbook = "ansible/site.yml"
ansible.limit = "all"
ansible.verbose = "v"
end
config.vm.post_up_message = "Browse to http://isso-dev.local/demo/index.html to start."
end

@ -0,0 +1,39 @@
user root;
worker_processes 4;
worker_rlimit_nofile 8192;
error_log /var/log/nginx/error.log warn;
pid /run/nginx.pid;
events {
worker_connections 2014;
multi_accept on;
use epoll;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
log_format timed '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for" '
'$request_time $upstream_response_time $upstream_addr '
' $upstream_status $upstream_cache_status $pipe';
access_log /var/log/nginx/access.log timed;
sendfile on;
tcp_nopush on;
keepalive_timeout 30;
gzip on;
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}

@ -0,0 +1,13 @@
server {
client_max_body_size 20M;
listen 80 default_server;
server_name isso-dev.local;
root /vagrant/isso/demo;
location / {
# uwsgi_pass unix:///run/uwsgi/app/isso/socket;
uwsgi_pass 127.0.0.1:8080;
include uwsgi_params;
}
}

@ -0,0 +1,24 @@
[uwsgi]
plugins = python
chdir = /vagrant
uid = root
gid = root
socket = :8080
master = true
processes = 4
cache2 = name=hash,items=10240,blocksize=32
spooler = /var/isso/spool
module = isso.run
env = ISSO_SETTINGS=/vagrant/share/isso-dev.conf
env = PYTHON_EGG_CACHE=/tmp
# uncomment for debugging
# daemonize = /var/log/uwsgi/uwsgi.log
py-autoreload = 1
# prevent uWSGI from remapping stdin to /dev/null
honour-stdin = true

@ -0,0 +1,85 @@
---
- name: Provision development server
hosts: all
sudo: true
tasks:
- name: Apt | Add nodesource keys
apt_key: url=https://deb.nodesource.com/gpgkey/nodesource.gpg.key state=present
- name: Apt | Add nodesource sources list deb
apt_repository: repo='deb https://deb.nodesource.com/node {{ ansible_distribution_release }} main' state=present
- name: Apt | Add nodesource sources list deb src
apt_repository: repo='deb-src https://deb.nodesource.com/node {{ ansible_distribution_release }} main' state=present
- name: Apt | Install packages
apt: pkg={{ item }} state=latest update_cache=true
with_items:
- build-essential
- curl
- htop
- vim
- git
- python-dev
- python-software-properties
- python-setuptools
- python-pip
- nginx
- uwsgi
- uwsgi-plugin-python
- supervisor
- sqlite3
- nodejs
- libffi-dev
- name: NPM | Install packages
npm: name={{ item }} global=yes
with_items:
- bower
- requirejs
- uglify-js
- jade
- name: Python | Install egg
shell: cd /vagrant; python setup.py develop
- name: Make
shell: cd /vagrant; {{ item }}
with_items:
- make init
- make js
- name: Spool | Create directory
file: path=/var/isso/spool state=directory mode=0777
- name: uwsgi | Deploy configuration
copy: src=files/uwsgi.ini dest=/etc/uwsgi/apps-available/isso.ini
- name: uwsgi | Enable app
file: src=/etc/uwsgi/apps-available/isso.ini dest=/etc/uwsgi/apps-enabled/isso.ini state=link
- name: uwsgi | Restart service daemon
service: name=uwsgi state=restarted enabled=yes
- name: uwsgi | Chmod logfile
file: path=/var/log/uwsgi/uwsgi.log state=touch mode="a+r"
- name: nginx | Deploy nginx.conf
copy: src=files/nginx.conf dest=/etc/nginx/nginx.conf
- name: nginx | Delete default vhost
action: file path=/etc/nginx/sites-enabled/default state=absent
- name: nginx | Deploy vhost config
copy: src=files/nginx.vhost.conf dest=/etc/nginx/sites-available/isso.conf
- name: nginx | Enable vhost
file: src=/etc/nginx/sites-available/isso.conf dest=/etc/nginx/sites-enabled/000-isso state=link
- name: nginx | Chmod logfile
file: path=/var/log/nginx mode="a+rx" state=directory recurse=true
- name: nginx | Restart service daemon
service: name=nginx state=restarted enabled=yes

@ -0,0 +1,11 @@
{
"name": "isso",
"description": "a Disqus alternative",
"title": "isso API",
"order": ["Thread", "Comment"],
"template": {
"withCompare": false
}
}

@ -0,0 +1,128 @@
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
#
# The MIT License (MIT)
#
# Copyright (c) 2020 Lucas Cimon.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
"""Dump isso comments as text
The script can be run like this:
contrib/dump_comments.py .../path/to/isso.db --sort-by-last-reply
To get a list of all available options:
contrib/dump_comments.py --help
By installing the optional colorama dependency, you'll get a colored output.
An example of output can be found at https://github.com/posativ/isso/issues/634
"""
import argparse
import sqlite3
from collections import defaultdict, namedtuple
from datetime import date
from textwrap import indent
class ColorFallback():
__getattr__ = lambda self, name: '' # noqa: E731
try:
from colorama import Fore, Style, init
init() # needed for Windows
except ImportError: # fallback so that the imported classes always exist
Fore = Style = ColorFallback()
Comment = namedtuple('Comment', ('uri', 'id', 'parent', 'created', 'text', 'author', 'email', 'website', 'likes', 'dislikes', 'replies'))
INDENT = ' '
QUERY = 'SELECT uri, comments.id, parent, created, text, author, email, website, likes, dislikes FROM comments INNER JOIN threads on comments.tid = threads.id'
def main():
args = parse_args()
if not args.colors:
global Fore, Style
Fore = Style = ColorFallback()
db = sqlite3.connect(args.db_path)
comments_per_uri = defaultdict(list)
for result in db.execute(QUERY).fetchall():
comment = Comment(*result, replies=[])
comments_per_uri[comment.uri].append(comment)
root_comments_per_sort_date = {}
for comments in comments_per_uri.values():
comments_per_id = {comment.id: comment for comment in comments}
root_comments, sort_date = [], None
for comment in comments:
if comment.parent: # == this is a "reply" comment
comments_per_id[comment.parent].replies.append(comment)
if args.sort_by_last_reply and (sort_date is None or comment.created > sort_date):
sort_date = comment.created
else:
root_comments.append(comment)
if sort_date is None or comment.created > sort_date:
sort_date = comment.created
root_comments_per_sort_date[sort_date] = root_comments
for _, root_comments in sorted(root_comments_per_sort_date.items(), key=lambda pair: pair[0]):
print(Fore.MAGENTA + args.url_prefix + root_comments[0].uri + Fore.RESET)
for comment in root_comments:
print_comment(INDENT, comment)
for comment in comment.replies:
print_comment(INDENT * 2, comment)
print()
def print_comment(prefix, comment):
author = comment.author or 'Anonymous'
email = comment.email or ''
website = comment.website or ''
when = date.fromtimestamp(comment.created)
popularity = ''
if comment.likes:
popularity = '+{.likes}'.format(comment)
if comment.dislikes:
if popularity:
popularity += '/'
popularity = '-{.dislikes}'.format(comment)
print(prefix + '{Style.BRIGHT}{author}{Style.RESET_ALL} {Style.DIM}- {email} {website}{Style.RESET_ALL} {when} {Style.DIM}{popularity}{Style.RESET_ALL}'.format(Style=Style, **locals()))
print(indent(comment.text, prefix))
def parse_args():
parser = argparse.ArgumentParser(description='Dump all Isso comments in chronological order, grouped by replies',
formatter_class=ArgparseHelpFormatter)
parser.add_argument('db_path', help='File path to Isso Sqlite DB')
parser.add_argument('--sort-by-last-reply', action='store_true', help='By default comments are sorted by "parent" comment date, this sort comments based on the last replies')
parser.add_argument('--url-prefix', default='', help='Optional domain name to prefix to pages URLs')
parser.add_argument('--no-colors', action='store_false', dest='colors', default=True, help='Disabled colored output')
return parser.parse_args()
class ArgparseHelpFormatter(argparse.RawTextHelpFormatter, argparse.ArgumentDefaultsHelpFormatter):
pass
if __name__ == '__main__':
main()

@ -0,0 +1,123 @@
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
"""Comment importer from Blogger
This python script can convert comments posted to a Blogger-powered blog to a
JSON file with can then be imported into Isso (by following the procedure
explained in docs/docs/extras/advanced-migration.rst.
The script can be run like this:
python import_blogger.py -p 'http://myblog.com/' blogger.xml out.json
where `blogger.xml` is a dump of the blog produced by the Blogger platform, and
the URL following the `-p` option is a prefix that will be applied to all post
URLs: the original host will be stripped and the path will be appended to the
string you specify here (this can be useful in the case that your blog moved to
a different domain, subdomain, or just into a new directory).
The `out.json` file is the file which will be generated by this tool, and which
can then be fed into isso:
isso -c /path/to/isso.cfg import -t generic out.json
"""
from __future__ import unicode_literals
import json
import feedparser
import time
from urllib.parse import urlparse
class Post:
def __init__(self, url):
self.url = url
self.title = None
self.comments = []
def add_comment(self, comment):
comment['id'] = len(self.comments) + 1
self.comments.append(comment)
def encode_post(post):
ret = {}
ret['id'] = post.url
ret['title'] = post.title
ret['comments'] = post.comments
return ret
class ImportBlogger:
TYPE_COMMENT = 'http://schemas.google.com/blogger/2008/kind#comment'
TYPE_POST = 'http://schemas.google.com/blogger/2008/kind#post'
def __init__(self, filename_in, filename_out, prefix):
self.channel = feedparser.parse(filename_in)
self.filename_out = filename_out
self.prefix = prefix
def run(self):
self.posts = {}
for item in self.channel.entries:
terms = [tag.term for tag in item.tags]
if not terms:
continue
if terms[0] == self.TYPE_COMMENT:
post = self.ensure_post(item)
post.add_comment(self.process_comment(item))
elif terms[0] == self.TYPE_POST:
self.process_post(item)
data = [encode_post(p) for p in self.posts.values() if p.comments]
with open(self.filename_out, 'w') as fp:
json.dump(data, fp, indent=2)
def process_post(self, item):
pid = self.post_id(item)
if pid in self.posts:
post = self.posts[pid]
else:
post = Post(pid)
self.posts[pid] = post
post.title = item.title
def ensure_post(self, item):
pid = self.post_id(item)
post = self.posts.get(pid, None)
if not post:
post = Post(pid)
self.posts[pid] = post
return post
def process_comment(self, item):
comment = {}
comment['author'] = item.author_detail.name
comment['email'] = item.author_detail.email
comment['website'] = item.author_detail.get('href', '')
t = time.strftime('%Y-%m-%d %H:%M:%S', item.published_parsed)
comment['created'] = t
comment['text'] = item.content[0].value
comment['remote_addr'] = '127.0.0.1'
return comment
def post_id(self, item):
u = urlparse(item.link)
return self.prefix + u.path
if __name__ == '__main__':
import argparse
parser = argparse.ArgumentParser(
description='Convert comments from blogger.com')
parser.add_argument('input', help='input file')
parser.add_argument('output', help='output file')
parser.add_argument('-p', dest='prefix',
help='prefix to be added to paths (ID)',
type=str, default='')
args = parser.parse_args()
importer = ImportBlogger(args.input, args.output, args.prefix)
importer.run()

@ -10,7 +10,8 @@
VERSION: '{{ release|e }}',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '{{ '' if no_search_suffix else file_suffix }}',
HAS_SOURCE: {{ has_source|lower }}
HAS_SOURCE: {{ has_source|lower }},
SOURCELINK_SUFFIX: '{{ sourcelink_suffix }}'
};
</script>
{%- for scriptfile in script_files %}

@ -9,4 +9,3 @@ class IssoTranslator(HTMLTranslator):
if self.section_level == 1:
raise nodes.SkipNode
HTMLTranslator.visit_title(self, node)

@ -28,4 +28,5 @@
{{ doc("docs/extras/deployment", "Deployment") }}
{{ doc("docs/extras/advanced-integration", "Advanced Integration") }}
{{ doc("docs/extras/api", "API") }}
{{ doc("docs/extras/contribs", "Community tools") }}
</ul>

@ -26,7 +26,7 @@ except pkg_resources.DistributionNotFound:
dist = type("I'm a Version", (object, ), {})
with io.open(join(dirname(__file__), "../setup.py")) as fp:
for line in fp:
m = re.match("\s*version='([^']+)'\s*", line)
m = re.match("\\s*version='([^']+)'\\s*", line)
if m:
dist.version = m.group(1)
break
@ -64,7 +64,7 @@ master_doc = 'docs/index'
# General information about the project.
project = u'Isso'
copyright = u'2014, Martin Zimmermann'
copyright = u'2016, Martin Zimmermann'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
@ -171,7 +171,7 @@ html_static_path = ['_static']
# Additional templates that should be rendered to pages, maps page names to
# template names.
html_additional_pages = {"index": "docs/index.html"}
html_additional_pages = {"index": "index.html"}
# If false, no module index is generated.
html_domain_indices = False
@ -200,22 +200,22 @@ htmlhelp_basename = 'Issodoc'
# -- Options for LaTeX output ---------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#'preamble': '',
# Additional stuff for the LaTeX preamble.
#'preamble': '',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
('index', 'Isso.tex', u'Isso Documentation',
u'Martin Zimmermann', 'manual'),
('index', 'Isso.tex', u'Isso Documentation',
u'Martin Zimmermann', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
@ -260,9 +260,9 @@ man_pages = [
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'Isso', u'Isso Documentation',
u'Martin Zimmermann', 'Isso', 'a commenting server similar to Disqus',
'Miscellaneous'),
('index', 'Isso', u'Isso Documentation',
u'Martin Zimmermann', 'Isso', 'a commenting server similar to Disqus',
'Miscellaneous'),
]
# Documents to append as an appendix to all manuals.

@ -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

@ -7,23 +7,39 @@ preferably in the script tag which embeds the JS:
.. code-block:: html
<script data-isso="/prefix/"
data-isso-id="thread-id"
data-isso-css="true"
data-isso-lang="ru"
data-isso-reply-to-self="false"
data-isso-require-author="false"
data-isso-require-email="false"
data-isso-reply-notifications="false"
data-isso-max-comments-top="10"
data-isso-max-comments-nested="5"
data-isso-reveal-on-click="5"
data-isso-avatar="true"
data-isso-avatar-bg="#f0f0f0"
data-isso-avatar-fg="#9abf88 #5698c4 #e279a3 #9163b6 ..."
data-isso-vote="true"
data-isso-vote-levels=""
data-isso-feed="false"
src="/prefix/js/embed.js"></script>
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
<section id="isso-thread" data-title="Foo!"></section>
<section id="isso-thread" data-title="Foo!" data-isso-id="/path/to/resource"></section>
Additionally, you can override any translation string for any language by adding
a ``data-isso-`` attribute that is equal to the translation key (found `here`__) with
``-text-[lang]`` appended to it. So, for example, if you want to override the
english translation of the ``postbox-notification`` message, you could add:
``data-isso-postbox-notification-text-en="Select to be notified of replies to your comment"``
.. __: https://github.com/posativ/isso/blob/master/isso/js/app/i18n/en.js
data-isso
---------
@ -49,14 +65,33 @@ Defaults to `true`.
data-isso-lang
--------------
Override useragent's preferred language. Currently available: german (de),
english (en), french (fr), italian (it), esperanto (eo) and russian (ru).
Override useragent's preferred language. Isso has been translated in over 12
languages. The language is configured by its `ISO 639-1
<https://en.wikipedia.org/wiki/ISO_639-1>`_ (two letter) code.
You find a list of all supported languages on `GitHub
<https://github.com/posativ/isso/tree/master/isso/js/app/i18n>`_.
data-isso-reply-to-self
-----------------------
Set to `true` when spam guard is configured with `reply-to-self = true`.
data-isso-require-author
------------------------
Set to `true` when spam guard is configured with `require-author = true`.
data-isso-require-email
-----------------------
Set to `true` when spam guard is configured with `require-email = true`.
data-isso-reply-notifications
-----------------------------
Set to `true` when reply notifications is configured with `reply-notifications = true`.
data-isso-max-comments-top and data-isso-max-comments-nested
------------------------------------------------------------
@ -88,14 +123,36 @@ scheme is based in `this color palette <http://colrd.com/palette/19308/>`_.
Multiple colors must be separated by space. If you use less than eight colors
and not a multiple of 2, the color distribution is not even.
data-isso-id
------------
data-isso-gravatar
------------------
Broken do not use. https://github.com/posativ/isso/issues/27
Uses gravatar images instead of generating svg images. You have to set
"data-isso-avatar" to **false** when you want to use this. Otherwise
both the gravatar and avatar svg image will show up. Please also set
option "gravatar" to **true** in the server configuration...
Set a custom thread id, defaults to current URI. If you a comment counter, add
this attribute to the link tag, too.
data-isso-vote
--------------
.. code-block:: html
Enable or disable voting feature on the client side.
data-isso-vote-levels
---------------------
List of vote levels used to customize comment appearance based on score.
Provide a comma-separated values (eg. `"0,5,10,25,100"`) or a JSON array (eg. `"[-5,5,15]"`).
For example, the value `"-5,5"` will cause each `isso-comment` to be given one of these 3 classes:
- `isso-vote-level-0` for scores lower than `-5`
- `isso-vote-level-1` for scores between `-5` and `4`
- `isso-vote-level-2` for scores of `5` and greater
These classes can then be used to customize the appearance of comments (eg. put a star on popular comments)
data-isso-feed
--------------
<section data-isso-id="test.abc" id="isso-thread"></section>
Enable or disable the addition of a link to the feed for the comment
thread. The link will only be valid if the appropriate setting, in
``[rss]`` section, is also enabled server-side.

@ -55,7 +55,7 @@ name
not used otherwise.
host
Your website(s). If Isso is unable to connect to at least on site, you'll
Your website(s). If Isso is unable to connect to at least one site, you'll
get a warning during startup and comments are most likely non-functional.
You'll need at least one host/website to run Isso. This is due to security
@ -81,15 +81,40 @@ notify
Available backends:
stdout
Log to standard output. Default, if none selected.
Log to standard output. Default, if none selected. Note, this
functionality is broken since a few releases.
smtp
Send notifications via SMTP on new comments with activation (if
moderated) and deletion links.
reply-notifications
Allow users to request E-mail notifications for replies to their post.
It is highly recommended to also turn on moderation when enabling this
setting, as Isso can otherwise be easily exploited for sending spam.
Do not forget to configure the client accordingly.
log-file
Log console messages to file instead of standard out.
gravatar
When set to ``true`` this will add the property "gravatar_image"
containing the link to a gravatar image to every comment. If a comment
does not contain an email address, gravatar will render a random icon.
This is only true when using the default value for "gravatar-url"
which contains the query string param ``d=identicon`` ...
gravatar-url
Url for gravatar images. The "{}" is where the email hash will be placed.
Defaults to "https://www.gravatar.com/avatar/{}?d=identicon"
latest-enabled
If True it will enable the ``/latest`` endpoint. Optional, defaults
to False.
.. _CORS: https://developer.mozilla.org/en/docs/HTTP/Access_control_CORS
@ -103,13 +128,21 @@ Enable moderation queue and handling of comments still in moderation queue
[moderation]
enabled = false
approve-if-email-previously-approved = false
purge-after = 30d
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.
approve-if-email-previously-approved
automatically approve comments by an email address if that address has
had a comment approved within the last 6 months. No ownership verification
is done on the entered email address. This means that if someone is able
to guess correctly the email address used by a previously approved author,
they will be able to have their new comment auto-approved.
purge-after
remove unprocessed comments in moderation queue after given time.
@ -143,6 +176,12 @@ listen
Does not apply for `uWSGI`.
public-endpoint
public URL that Isso is accessed from by end users. Should always be
a http:// or https:// absolute address. If left blank, automatic
detection is attempted. Normally only needs to be specified if
different than the `listen` setting.
reload
reload application, when the source code has changed. Useful for
development. Only works with the internal webserver.
@ -151,6 +190,13 @@ profile
show 10 most time consuming function in Isso after each request. Do
not use in production.
trusted-proxies
an optional list of reverse proxies IPs behind which you have deployed
your Isso web service (e.g. `127.0.0.1`).
This allow for proper remote address resolution based on a
`X-Forwarded-For` HTTP header, which is important for the mechanism
forbiding several comment votes coming from the same subnet.
.. _configure-smtp:
SMTP
@ -216,6 +262,8 @@ for IPv4, ``/48`` for IPv6).
ratelimit = 2
direct-reply = 3
reply-to-self = false
require-author = false
require-email = false
enabled
enable guard, recommended in production. Not useful for debugging
@ -233,7 +281,19 @@ reply-to-self
the comment. After the editing timeframe is gone, commenters can reply to
their own comments anyways.
Do not forget to configure the client.
Do not forget to configure the `client <client>`_ accordingly
require-author
force commenters to enter a value into the author field. No validation is
performed on the provided value.
Do not forget to configure the `client <client>`_ accordingly.
require-email
force commenters to enter a value into the email field. No validation is
performed on the provided value.
Do not forget to configure the `client <client>`_ accordingly.
Markup
------
@ -245,12 +305,20 @@ supported, but new languages are relatively easy to add.
[markup]
options = strikethrough, superscript, autolink
flags = skip-html, escape, hard-wrap
allowed-elements =
allowed-attributes =
options
`Misaka-specific Markdown extensions <http://misaka.61924.nl/api/>`_, all
flags starting with `EXT_` can be used there, separated by comma.
`Misaka-specific Markdown extensions <https://misaka.61924.nl/#api>`_, all
extension flags can be used there, separated by comma, either by their name
or as `EXT_`_.
flags
`Misaka-specific HTML rendering flags
<https://misaka.61924.nl/#html-render-flags>`_, all html rendering flags
can be used here, separated by comma, either by their name or as `HTML_`_.
Per Misaka's defaults, no flags are set.
allowed-elements
Additional HTML tags to allow in the generated output, comma-separated. By
@ -293,6 +361,45 @@ algorithm
Arguments have to be in that order, but can be reduced to `pbkdf2:4096`
for example to override the iterations only.
.. _configure-rss:
RSS
---
Isso can provide an Atom feed for each comment thread. Users can use
them to subscribe to comments and be notified of changes. Atom feeds
are enabled as soon as there is a base URL defined in this section.
.. code-block:: ini
[rss]
base =
limit = 100
base
base URL to use to build complete URI to pages (by appending the URI from Isso)
limit
number of most recent comments to return for a thread
Admin
-----
Isso has an optional web administration interface that can be used to moderate
comments. The interface is available under ``/admin`` on your isso URL.
.. code-block:: ini
[admin]
enabled = true
password = secret
enabled
whether to enable the admin interface
password
the plain text password to use for logging into the administration interface
Appendum
--------
@ -305,3 +412,18 @@ Timedelta
You can add different types: `1m30s` equals to 90 seconds, `3h45m12s`
equals to 3 hours, 45 minutes and 12 seconds (12512 seconds).
Environment variables
---------------------
.. _environment-variables:
Isso also support configuration through some environment variables:
ISSO_CORS_ORIGIN
By default, `isso` will use the `Host` or else the `Referrer` HTTP header
of the request to defines a CORS `Access-Control-Allow-Origin` HTTP header
in the response.
This environent variable allows you to define a broader fixed value,
in order for example to share a single Isso instance among serveral of your
subdomains : `ISSO_CORS_ORIGIN=*.example.test`

@ -21,5 +21,36 @@ Now, either include `count.min.js` if you want to show only the comment count
(e.g. on an index page) or `embed.min.js` for the full comment client (see
:doc:`../quickstart`); do not mix both.
You can have as many comments counters as you want in a page but be aware that it
implies one `GET` request per comment anchor.
You can have as many comments counters as you want in a page, and they will be
merged into a single `GET` request.
Asynchronous comments loading
-----------------------------
Isso will automatically fetch comments after `DOMContentLoaded` event. However
in the case where your website is creating content dynamically (eg. via ajax),
you need to re-fetch comment thread manually. Here is how you can re-fetch the
comment thread:
.. code-block:: js
window.Isso.fetchComments()
It will delete all comments under the thread but not the PostBox, fetch
comments with `data-isso-id` attribute of the element `section#isso-thread` (if
that attribute does not exist, fallback to `window.location.pathname`), then
fill comments into the thread. In other words, you should change `data-isso-id`
attribute of the element `section#isso-thread` (or modify the pathname with
`location.pushState`) before you can get new comments. And the thread element
itself should *NOT* be touched or removed.
If you removed the `section#isso-thread` element, just create another element
with same TagName and ID in which you wish comments to be placed, then call the
`init` method of `Isso`:
.. code-block:: js
window.Isso.init()
Then Isso will initialize the comment section and fetch comments, as if the page
was loaded.

@ -0,0 +1,70 @@
Advanced Migration
==================
In quickstart we saw you can import comments from Disqus or WordPress. But there
are a many other comments system and you could be using one of them.
Isso provides a way to import such comments, however it's up to you to to:
- dump comments
- fit the data to the following JSON format::
A list of threads, each item being a dict with the following data:
- id: a text representing the unique thread id (note: by default isso
associates this ID to the article URL, but it can be changed on
client side with "data-isso-id" - see :doc:`client configuration <../configuration/client>` )
- title: the title of the thread
- comments: the list of comments
Each item in that list of comments is a dict with the following data:
- id: an integer with the unique id of the comment inside the thread
(it can be repeated among different threads); this will be used to
order the comment inside the thread
- author: the author's name
- email: the author's email
- website: the author's website
- remote_addr: the author's IP
- created: a timestamp, in the format "%Y-%m-%d %H:%M:%S"
Example:
.. code-block:: json
[
{
"id": "/blog/article1",
"title": "First article!",
"comments": [
{
"author": "James",
"created": "2018-11-28 17:24:23",
"email": "email@mail.com",
"id": "1",
"remote_addr": "127.0.0.1",
"text": "Great article!",
"website": "http://fefzfzef.frzr"
},
{
"author": "Harold",
"created": "2018-11-28 17:58:03",
"email": "email2@mail.com",
"id": "2",
"remote_addr": "",
"text": "I hated it...",
"website": ""
}
]
}
]
Keep in mind that isso expects to have an array, so keep the opening and ending square bracket even if you have only one article thread!
Next you can import you json dump:
.. code-block:: sh
~> isso -c /path/to/isso.cfg import -t generic comment-dump.json
[100%] 53 threads, 192 comments

@ -23,12 +23,11 @@ Isso:
"mode": 1,
"hash": "4505c1eeda98",
"author": null,
"email": null,
"website": null
"website": null,
"created": 1387321261.572392,
"modified": null,
"likes": 3,
"dislikes": 0,
"dislikes": 0
}
id :
@ -71,7 +70,7 @@ modified :
List comments
-------------
List all publicely visible comments for thread `uri`:
List all publicly visible comments for thread `uri`:
.. code-block:: text
@ -84,6 +83,19 @@ plain :
pass plain=1 to get the raw comment text, defaults to 0.
Get the latest N comments for all threads:
.. code-block:: text
GET /latest?limit=N
The N parameter limits how many of the latest comments to retrieve; it's
mandatory, and must be an integer greater than 0.
This endpoint needs to be enabled in the configuration (see the
``latest-enabled`` option in the ``general`` section).
Create comment
--------------
@ -186,3 +198,16 @@ uri :
returns an integer
Get Atom feed
-------------
Get an Atom feed of comments for thread `uri`:
.. code-block:: text
GET /feed?uri=%2Fhello-world%2F
uri :
URI to get comments for, required.
Returns an XML document as the Atom feed.

@ -0,0 +1,20 @@
Community tools
===============
Utility scripts
---------------
Some utility scripts have been developed by isso users.
They are stored in the `GitHub contrib/ directory
<https://github.com/posativ/isso/tree/master/contrib>`_ :
* `dump_comments.py` : dump isso comments as text, optionally with color
* `import_blogger.py` : comment importer from Blogger
Related projects
----------------
* `wonderfall/isso Docker image <https://github.com/Wonderfall/docker-isso>`
* `a grav plugin to integrate isso comments <https://github.com/Sommerregen/grav-plugin-jscomments>`
* `a Pelican theme supporting isso comments <https://github.com/Lucas-C/pelican-mg>`

@ -4,7 +4,7 @@ Deployment
Isso ships with a built-in web server, which is useful for the initial setup
and may be used in production for low-traffic sites (up to 20 requests per
second). Running a "real" WSGI server supports nice things such as UNIX domain
sockets, daemonization and solid HTTP handler while being more stable, secure
sockets, daemonization and solid HTTP handler. WSGI servers are more stable, secure
and web-scale than the built-in web server.
* gevent_, coroutine-based network library
@ -13,10 +13,11 @@ and web-scale than the built-in web server.
* mod_wsgi_, Apache interface to WSGI
* mod_fastcgi_, Apache interface to FastCGI
* uberspace.de, `try this guide (in german) <http://blog.posativ.org/2014/isso-und-uberspace-de/>`_
* Openshift, Isso has a one click installer
`gevent <http://gunicorn.org/>`__
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
`gevent <http://www.gevent.org/>`__
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Probably the easiest deployment method. Install with PIP (requires libevent):
@ -97,34 +98,108 @@ To execute Isso, use a command similar to:
`mod_wsgi <https://code.google.com/p/modwsgi/>`__
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note:: This information may be incorrect, if you have more knowledge on how
to deploy Python via `mod_wsgi`, consider extending/correcting this section.
First, create a startup script, called `isso.wsgi`. If Isso is in your system module
search path, then the script is quite simple. This script is included in the
isso distribution as `run.py`:
For more information, see `Flask: Configuring Apache
<http://flask.pocoo.org/docs/deploying/mod_wsgi/#configuring-apache>`_.
.. code-block:: python
.. code-block:: apache
from __future__ import unicode_literals
<VirtualHost *>
ServerName example.org
import os
WSGIDaemonProcess isso user=www-data group=www-data threads=5
WSGIScriptAlias / /var/www/isso.wsgi
</VirtualHost>
from isso import make_app
from isso import dist, config
application = make_app(
config.load(
os.path.join(dist.location, dist.project_name, "defaults.ini"),
"/path/to/isso.cfg"),
multiprocessing=True)
If you have installed Isso in a virtual environment, then you will have to add the path
of the virtualenv to the site-specific paths of Python:
.. code-block:: python
from __future__ import unicode_literals
import site
site.addsitedir("/path/to/isso_virtualenv")
import os
from isso import make_app
from isso import dist, config
Next, copy'n'paste to `/var/www/isso.wsgi`:
application = make_app(
config.load(
os.path.join(dist.location, dist.project_name, "defaults.ini"),
"/path/to/isso.cfg",
multiprocessing=True)
Using the aforementioned script will load system modules when available and modules
from the virtualenv otherwise. Should you want the opposite behavior, where modules from
the virtualenv have priority over system modules, the following script does the trick:
.. code-block:: python
from __future__ import unicode_literals
import os
import site
import sys
# Remember original sys.path.
prev_sys_path = list(sys.path)
# Add the new site-packages directory.
site.addsitedir("/path/to/isso_virtualenv")
# Reorder sys.path so new directories at the front.
new_sys_path = []
for item in list(sys.path):
if item not in prev_sys_path:
new_sys_path.append(item)
sys.path.remove(item)
sys.path[:0] = new_sys_path
from isso import make_app
from isso.core import Config
from isso import dist, config
application = make_app(Config.load("/path/to/isso.cfg"))
application = make_app(
config.load(
os.path.join(dist.location, dist.project_name, "defaults.ini"),
"/path/to/isso.cfg",
multiprocessing=True)
The last two scripts are based on those given by
`mod_wsgi documentation <https://code.google.com/p/modwsgi/wiki/VirtualEnvironments>`_.
The Apache configuration will then be similar to the following:
.. code-block:: apache
<VirtualHost *>
ServerName example.org
WSGIDaemonProcess isso user=www-data group=www-data threads=5
WSGIScriptAlias /mounted_isso_path /path/to/isso.wsgi
</VirtualHost>
You will need to adjust the user and group according to your Apache installation and
security policy. Be aware that the directory containing the comments database must
be writable by the user or group running the WSGI daemon process: having a writable
database only is not enough, since SQLite will need to create a lock file in the same
directory.
`mod_fastcgi <http://www.fastcgi.com/mod_fastcgi/docs/mod_fastcgi.html>`__
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
You can use this method if your hosting provider doesn't allow you to have long
running processes. If FastCGI has not yet been configured in your server,
please follow these steps:
.. note:: This information may be incorrect, if you have more knowledge on how
to deploy Python via `mod_fastcgi`, consider extending/correcting this section.
@ -148,19 +223,51 @@ Next, copy'n'paste to `/var/www/isso.wsgi`:
</Location>
</VirtualHost>
Next, copy'n'paste to `/var/www/isso.fcgi` (or whatever location you prefer):
Next, to run isso as a FastCGI script you'll need to install ``flup`` with
PIP:
.. code-block:: sh
$ pip install flup
Finally, copy'n'paste to `/var/www/isso.fcgi` (or whatever location you prefer):
.. code-block:: python
#!/usr/bin/env python
#: uncomment if you're using a virtualenv
# import sys
# sys.insert(0, '<your_local_path>/lib/python2.7/site-packages')
# sys.path.insert(0, '<your_local_path>/lib/python2.7/site-packages')
from isso import make_app
from isso.core import Config
from isso import make_app, dist, config
import os
from flup.server.fcgi import WSGIServer
application = make_app(Config.load("/path/to/isso.cfg"))
application = make_app(config.load(
os.path.join(dist.location, dist.project_name, "defaults.ini"),
"/path/to/isso.cfg"))
WSGIServer(application).run()
`Openshift <http://openshift.com>`__
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
With `Isso Openshift Deployment Kit`_, Isso can be installed on Open
Shift with just one click. Make sure you already have installed ``rhc``
(`instructions`_) and completed the setup.
1. Run the following, you will get an Open Shift instance installed with
Isso:
::
rhc create-app appname python-2.7 --from-code https://github.com/avinassh/isso-openshift.git
2. Above step also clones Git repository of your Open Shift instance, in
current directory. Make changes to the configuration file and push
back to Openshift, it will be redeployed with new settings.
3. Visit ``http://<yourappname>-<openshift-namespace>.com/info`` to
verify Isso is deployed properly and is working.
.. _Isso Openshift Deployment Kit: https://github.com/avinassh/isso-openshift
.. _instructions: https://developers.openshift.com/en/managing-client-tools.html

@ -2,7 +2,7 @@ Overview
========
Welcome to Isso's documentation. This documentation will help you get started
fast. If you get any problems when using Isso, you can find the answer in
fast. If you run into any problems when using Isso, you can find the answer in
troubleshooting guide or you can ask me on IRC or GitHub.
Documentation overview:

@ -1,15 +1,17 @@
Installation
============
Isso is a web application written in Python. If pip and virtualenv mean
anything to you, continue with :ref:`install-from-pypi`. If you are running
Debian/Ubuntu or Gentoo, you can use :ref:`prebuilt-package`. If not, read the
next section carefully.
Isso is a web application written in Python. If pip and virtualenv mean anything
to you, continue with :ref:`install-from-pypi`. If you are running
Debian/Ubuntu, Gentoo, Archlinux or Fedora, you can use
:ref:`prebuilt-package`. If not, read the next section carefully.
.. contents::
:local:
:depth: 1
.. _install-interludium:
Interludium: Python is not PHP
------------------------------
@ -20,12 +22,12 @@ libraries, but most likely not all required by Isso (or in an up-to-date
version looking at you, Debian!).
That's why most Python developers use the `Python Package Index`_ to get their
dependencies. But the most important rule: never install *anything* from PyPi
dependencies. The most important rule to follow is to never install *anything* from PyPi
as root. Not because of malicious software, but because you *will* break your
system.
``easy_install`` is one tool to mess up your system. Another package manager is
``pip``. If you ever searched for an issue with Python/pip and Stackoverflow is
suggesting your ``easy_install pip`` or ``pip install --upgrade pip`` (as root
suggesting you ``easy_install pip`` or ``pip install --upgrade pip`` (as root
of course!), you are doing it wrong. `Why you should not use Python's
easy_install carelessly on Debian`_ is worth the read.
@ -37,18 +39,18 @@ package manager.
.. code-block:: sh
# for Debian/Ubuntu
~> sudo apt-get install python-setuptools python-virtualenv
~> sudo apt-get install python-setuptools python-virtualenv python-dev
# Fedora/Red Hat
~> sudo yum install python-setuptools python-virtualenv
~> sudo yum install python-setuptools python-virtualenv python-devel
The next steps should be done as regular user, not as root (although possible
but not recommended):
.. code-block:: sh
~> virtualenv /path/to/isso
~> source /path/to/isso/bin/activate
~> virtualenv /opt/isso
~> source /opt/isso/bin/activate
After calling `source`, you can now install packages from PyPi locally into this
virtual environment. If you don't like Isso anymore, you just `rm -rf` the
@ -56,6 +58,11 @@ folder. Inside this virtual environment, you may also execute the example
commands from above to upgrade your Python Package Manager (although it barely
makes sense), it is completely independent from your global system.
To use Isso installed in a virtual environment outside of the virtual
environment, you just need to add */opt/isso/bin* to your :envvar:`PATH` or
execute */opt/isso/bin/isso* directly. It will launch Isso from within the
virtual environment.
With a virtualenv active, you may now continue to :ref:`install-from-pypi`!
Of course you may not need a virtualenv when you are running dedicated virtual
machines or a shared host (e.g. Uberspace.de).
@ -72,7 +79,7 @@ Install from PyPi
Requirements
^^^^^^^^^^^^
- Python 2.6, 2.7 or 3.3+ (+ devel headers)
- Python 2.7 or 3.4+ (+ devel headers)
- SQLite 3.3.8 or later
- a working C compiler
@ -110,7 +117,7 @@ For easier execution, you can symlink the executable to a location in your
.. code-block:: sh
~> ln -s /path/to/isso-venv/bin/isso /usr/local/bin/isso
~> ln -s /opt/isso/bin/isso /usr/local/bin/isso
Upgrade
^^^^^^^
@ -119,7 +126,7 @@ To upgrade Isso, activate your virtual environment again, and run
.. code-block:: sh
~> source /path/to/isso/bin/activate # optional
~> source /opt/isso/bin/activate # optional
~> pip install --upgrade isso
.. _prebuilt-package:
@ -127,11 +134,7 @@ To upgrade Isso, activate your virtual environment again, and run
Prebuilt Packages
-----------------
* Debian: https://packages.crapouillou.net/ built from PyPi. Includes
startup scripts and vhost configurations for Lighttpd, Apache and Nginx
[`source <https://github.com/jgraichen/debian-isso>`__].
`#729218 <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=729218>`_ is an
ITP for Debian.
* Debian (since Buster): https://packages.debian.org/search?keywords=isso
* Gentoo: http://eroen.eu/cgit/cgit.cgi/eroen-overlay/tree/www-apps/isso?h=isso
not yet available in Portage, but you can use the ebuild to build Isso.
@ -139,7 +142,21 @@ Prebuilt Packages
* Arch Linux: https://aur.archlinux.org/packages/isso/
install with `yaourt isso`.
* Docker Image: https://registry.hub.docker.com/u/bl4n/isso/
* Fedora: https://copr.fedoraproject.org/coprs/jujens/isso/ — copr
repository. Built from Pypi, includes a systemctl unit script.
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
-------------------
@ -147,7 +164,7 @@ Install from Source
If you want to hack on Isso or track down issues, there's an alternate
way to set up Isso. It requires a lot more dependencies and effort:
- Python 2.6, 2.7 or 3.3+ (+ devel headers)
- Python 2.7 or 3.4+ (+ devel headers)
- Virtualenv
- SQLite 3.3.8 or later
- a working C compiler
@ -180,7 +197,7 @@ Install JavaScript modules:
~> make init
Integration without previous optimization:
Integration without optimization:
.. code-block:: html
@ -191,7 +208,7 @@ Optimization:
.. code-block:: sh
~> npm install -g requirejs uglifyjs jade
~> npm install -g requirejs uglify-js jade
~> make js
.. _init-scripts:
@ -200,10 +217,58 @@ Init scripts
------------
Init scripts to run Isso as a service (check your distribution's documentation
for your init-system; e.g. Debian uses SysVinit, Fedora uses SystemD) if you
for your init-system; e.g. Debian uses SysVinit, Fedora uses systemd) if you
don't use FastCGi or uWSGI:
- SystemD: https://github.com/jgraichen/debian-isso/blob/master/debian/isso.service
- SysVinit: https://github.com/jgraichen/debian-isso/blob/master/debian/isso.init
- systemd (Isso + Gunicorn): https://github.com/jgraichen/debian-isso/blob/master/debian/isso.service
- SysVinit (Isso + Gunicorn): https://github.com/jgraichen/debian-isso/blob/master/debian/isso.init
- OpenBSD: https://gist.github.com/noqqe/7397719
- FreeBSD: https://gist.github.com/ckoepp/52f6f0262de04cee1b88ef4a441e276d
- Supervisor: https://github.com/posativ/isso/issues/47
If you're writing your own init script, you can utilize ``start-stop-daemon``
to run Isso in the background (Isso runs in the foreground usually). Below you
will find a very basic SysVinit script which you can use for inspiration:
.. code-block:: sh
#!/bin/sh
### BEGIN INIT INFO
# Provides: isso
# Required-Start: $local_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: lightweight Disqus alternative
### END INIT INFO
EXEC=/opt/isso/bin/isso
EXEC_OPTS="-c /etc/isso.cfg run"
RUNAS=isso
PIDFILE=/var/run/isso.pid
start() {
echo 'Starting service…' >&2
start-stop-daemon --start --user "$RUNAS" --background --make-pidfile --pidfile $PIDFILE \
--exec $EXEC -- $EXEC_OPTS
}
stop() {
echo 'Stopping service…' >&2
start-stop-daemon --stop --user "$RUNAS" --pidfile $PIDFILE --exec $EXEC
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
*)
echo "Usage: $0 {start|stop|restart}"
esac

@ -6,7 +6,7 @@ What's Isso?
Isso is a lightweight commenting server similar to Disqus. It allows anonymous
comments, maintains identity and is simple to administrate. It uses JavaScript
and cross-origin ressource sharing for easy integration into static websites.
and cross-origin resource sharing for easy integration into static websites.
No, I meant "Isso"
------------------

@ -2,13 +2,12 @@ Quickstart
==========
Assuming you have successfully :doc:`installed <install>` Isso, here's
a quickstart quide that covers the most common setup. Sections covered:
a quickstart guide that covers the most common setup. Sections covered:
.. contents::
:local:
:depth: 1
Configuration
-------------
@ -19,7 +18,8 @@ sane defaults.
.. code-block:: ini
[general]
; database location, check permissions, automatically created if not exists
; database location, check permissions, automatically created if it
does not exist
dbpath = /var/lib/isso/comments.db
; your website or blog (not the location of Isso!)
host = http://example.tld/
@ -32,7 +32,7 @@ sane defaults.
https://example.tld/
Note, that multiple, *different* websites are **not** supported in a single
configuration. To serve comments for diffent websites, refer to
configuration. To serve comments for different websites, refer to
:ref:`Multiple Sites <configure-multiple-sites>`.
The moderation is done with signed URLs sent by email or logged to stdout.
@ -45,7 +45,7 @@ enable moderation queue, add:
enabled = true
To moderate comments, either use the activation or deletion URL in the logs or
:ref:`use SMTP <configure-smtp>` to get notified on new comments including the
:ref:`use SMTP <configure-smtp>` to get notified of new comments, including the
URLs for activation and deletion:
.. code-block:: ini
@ -61,21 +61,23 @@ For more options, see :doc:`server <configuration/server>` and :doc:`client
Migration
---------
You can import comments from Disqus_ or WordPress_.
Isso provides a tool for importing comments from Disqus_ or WordPress_.
You can also import comments from any other comment system, but this topic is more
complex and is covered in :doc:`advanced migration <extras/advanced-migration>`.
To export your comments from Disqus, log into Disqus, go to your website, click
on *Discussions* and select the *Export* tab. You'll receive an email with your
comments. Unfortunately, Disqus does not export up- and downvotes.
To export comments from your previous WordPress installation, go to *Tools*,
export your data. WordPress WXR import is quite new and may not work for you;
please report any failures.
export your data. It has been reported that WordPress may generate broken XML.
Try to repair the file using ``xmllint`` before you continue with the import.
Now import the XML dump:
.. code-block:: sh
~> isso -c /path/to/isso.cfg import disqus-or-wordpress.xml
~> isso -c /path/to/isso.cfg import -t [disqus|wordpress] disqus-or-wordpress.xml
[100%] 53 threads, 192 comments
.. _Disqus: https://disqus.com/
@ -139,7 +141,7 @@ a comment to see if the setup works. If not, see :doc:`troubleshooting`.
Going Further
-------------
There are several server and client configuration options uncovered in this
There are several server and client configuration options not covered in this
quickstart, check out :doc:`configuration/server` and
:doc:`configuration/client` for more information. For further website
integration, see :doc:`extras/advanced-integration`.

@ -5,8 +5,8 @@ Multiple Sites
--------------
Isso is designed to serve comments for a single website and therefore stores
comments for a relative URL to support HTTP, HTTPS and even domain transfers
without manual intervention. But you can chain Isso to support multiple
comments for a relative URL. This is done to support HTTP, HTTPS and even domain transfers
without manual intervention. You can chain Isso to support multiple
websites on different domains.
The following example uses `gunicorn <http://gunicorn.org/>`_ as WSGI server (

@ -1,4 +1,39 @@
Troubleshooting
===============
To be written.
For uberspace users
-------------------
Some uberspace users experienced problems with isso and they solved their
issues by adding `DirectoryIndex disabled` as the first line in the `.htaccess`
file for the domain the isso server is running on.
pkg_ressources.DistributionNotFound
-----------------------------------
This is usually caused by messing up the system's Python with newer packages
from PyPi (e.g. by executing `easy_install --upgrade pip` as root) and is not
related to Isso at all.
Install Isso in a virtual environment as described in
:ref:`install-interludium`. Alternatively, you can use `pip install --user`
to install Isso into the user's home.
UnicodeDecodeError: 'ascii' codec can't decode byte 0xff
--------------------------------------------------------
Likely an issue with your environment, check you set your preferred file
encoding either in :envvar:`LANG`, :envvar:`LANGUAGE`, :envvar:`LC_ALL` or
:envvar:`LC_CTYPE`:
.. code-block:: text
$ env LANG=C.UTF-8 isso [-h] [--version] ...
If none of the mentioned variables are set, the interaction with Isso will
likely fail (unable to print non-ascii characters to stdout/err, unable to
parse configuration file with non-ascii characters and so forth).
The web console shows 404 Not Found responses
---------------------------------------------
That's fine. Isso returns "404 Not Found" to indicate "No comments".

@ -1,32 +1,17 @@
Frequently asked question
=========================
Why not use Gravatar/Libravatar/... ?
-------------------------------------
Various people asked or complained about the generated icons next to their
comments. First, it is not an avatar, it is an identicon used to
*identify* an author of multiple comments without leaking personal
informations (unlike Gravatar).
If you are in need of Gravatar_, then use Disqus. If you run your own
Libravatar_ server, you can work on a patch for Isso which adds *optional*
support for avatars.
.. _Gravatar: https://secure.gravatar.com/
.. _Libravatar: http://libravatar.org/
Why SQLite3?
------------
Although partially answered on the index page, here a more complete answer: If
Although partially answered on the index page, here is a more complete answer: If
you manage massive amounts of comments, Isso is a really bad choice. Isso is
designed to be simple and easy to setup, not optimizied for high-traffic
designed to be simple and easy to setup, it is not optimized for high-traffic
websites (use a `dedicated Disqus`_ instance then).
comments are not big data
Comments are not big data.
For example, 209 threads and 778 comments in total only need 620K (kilobyte)
memory. Excellent use case for SQLite.
For example, if you have 209 threads and 778 comments in total this only needs 620 kilobytes
of memory. This is an excellent use case for SQLite.
.. _dedicated Disqus:

@ -0,0 +1,10 @@
Releasing steps
===============
* Run ``python3 setup.py nosetests``, ``python2 setup.py nosetests``
* Update version number in ``setup.py`` and ``CHANGES.rst``
* ``git commit -m "Preparing ${VERSION}" setup.py CHANGES.rst``
* ``git tag -as ${VERSION}``
* ``make init all``
* ``python3 setup.py sdist``
* ``twine upload --sign dist/isso-${VERSION}.tar.gz``

@ -35,7 +35,8 @@ import sys
if sys.argv[0].startswith("isso"):
try:
import gevent.monkey; gevent.monkey.patch_all()
import gevent.monkey
gevent.monkey.patch_all()
except ImportError:
pass
@ -48,16 +49,19 @@ from os.path import dirname, join
from argparse import ArgumentParser
from functools import partial, reduce
import pkg_resources
werkzeug = pkg_resources.get_distribution("werkzeug")
from itsdangerous import URLSafeTimedSerializer
from werkzeug.routing import Map
from werkzeug.exceptions import HTTPException, InternalServerError
from werkzeug.wsgi import SharedDataMiddleware
from werkzeug.middleware.shared_data import SharedDataMiddleware
from werkzeug.local import Local, LocalManager
from werkzeug.serving import run_simple
from werkzeug.contrib.fixers import ProxyFix
from werkzeug.contrib.profiler import ProfilerMiddleware
from werkzeug.middleware.proxy_fix import ProxyFix
from werkzeug.middleware.profiler import ProfilerMiddleware
local = Local()
local_manager = LocalManager([local])
@ -78,26 +82,38 @@ logging.basicConfig(
logger = logging.getLogger("isso")
class ProxyFixCustom(ProxyFix):
def __init__(self, app):
# This is needed for werkzeug.wsgi.get_current_url called in isso/views/comments.py
# to work properly when isso is hosted under a sub-path
# cf. https://werkzeug.palletsprojects.com/en/1.0.x/middleware/proxy_fix/
super().__init__(app, x_prefix=1)
class Isso(object):
def __init__(self, conf):
self.conf = conf
self.db = db.SQLite3(conf.get('general', 'dbpath'), conf)
self.signer = URLSafeTimedSerializer(self.db.preferences.get("session-key"))
self.signer = URLSafeTimedSerializer(
self.db.preferences.get("session-key"))
self.markup = html.Markup(conf.section('markup'))
self.hasher = hash.new(conf.section("hash"))
super(Isso, self).__init__(conf)
subscribers = []
smtp_backend = False
for backend in conf.getlist("general", "notify"):
if backend == "stdout":
subscribers.append(Stdout(None))
elif backend in ("smtp", "SMTP"):
subscribers.append(SMTP(self))
smtp_backend = True
else:
logger.warn("unknown notification backend '%s'", backend)
if smtp_backend or conf.getboolean("general", "reply-notifications"):
subscribers.append(SMTP(self))
self.signal = ext.Signal(*subscribers)
@ -119,7 +135,8 @@ class Isso(object):
local.request = request
local.host = wsgi.host(request.environ)
local.origin = origin(self.conf.getiter("general", "host"))(request.environ)
local.origin = origin(self.conf.getiter(
"general", "host"))(request.environ)
adapter = self.urls.bind_to_environ(request.environ)
@ -133,7 +150,8 @@ class Isso(object):
except HTTPException as e:
return e
except Exception:
logger.exception("%s %s", request.method, request.environ["PATH_INFO"])
logger.exception("%s %s", request.method,
request.environ["PATH_INFO"])
return InternalServerError()
else:
return response
@ -178,20 +196,24 @@ def make_app(conf=None, threading=True, multiprocessing=False, uwsgi=False):
if isso.conf.getboolean("server", "profile"):
wrapper.append(partial(ProfilerMiddleware,
sort_by=("cumulative", ), restrictions=("isso/(?!lib)", 10)))
sort_by=("cumulative", ), restrictions=("isso/(?!lib)", 10)))
wrapper.append(partial(SharedDataMiddleware, exports={
'/js': join(dirname(__file__), 'js/'),
'/css': join(dirname(__file__), 'css/'),
'/img': join(dirname(__file__), 'img/'),
'/demo': join(dirname(__file__), 'demo/')
}))
}))
wrapper.append(partial(wsgi.CORSMiddleware,
origin=origin(isso.conf.getiter("general", "host")),
allowed=("Origin", "Referer", "Content-Type"),
exposed=("X-Set-Cookie", "Date")))
origin=origin(isso.conf.getiter("general", "host")),
allowed=("Origin", "Referer", "Content-Type"),
exposed=("X-Set-Cookie", "Date")))
wrapper.extend([wsgi.SubURI, ProxyFixCustom])
wrapper.extend([wsgi.SubURI, ProxyFix])
if werkzeug.version.startswith("0.8"):
wrapper.append(wsgi.LegacyWerkzeugMiddleware)
return reduce(lambda x, f: f(x), wrapper, isso)
@ -201,21 +223,26 @@ def main():
parser = ArgumentParser(description="a blog comment hosting service")
subparser = parser.add_subparsers(help="commands", dest="command")
parser.add_argument('--version', action='version', version='%(prog)s ' + dist.version)
parser.add_argument('--version', action='version',
version='%(prog)s ' + dist.version)
parser.add_argument("-c", dest="conf", default="/etc/isso.conf",
metavar="/etc/isso.conf", help="set configuration file")
metavar="/etc/isso.conf", help="set configuration file")
imprt = subparser.add_parser('import', help="import Disqus XML export")
imprt.add_argument("dump", metavar="FILE")
imprt.add_argument("-n", "--dry-run", dest="dryrun", action="store_true",
help="perform a trial run with no changes made")
imprt.add_argument("-t", "--type", dest="type", default=None,
choices=["disqus", "wordpress"], help="export type")
choices=["disqus", "wordpress", "generic"], help="export type")
imprt.add_argument("--empty-id", dest="empty_id", action="store_true",
help="workaround for weird Disqus XML exports, #135")
serve = subparser.add_parser("run", help="run server")
# run Isso as stand-alone server
subparser.add_parser("run", help="run server")
args = parser.parse_args()
conf = config.load(join(dist.location, "share", "isso.conf"), args.conf)
conf = config.load(
join(dist.location, dist.project_name, "defaults.ini"), args.conf)
if args.command == "import":
conf.set("guard", "enabled", "off")
@ -227,7 +254,7 @@ def main():
dbpath = conf.get("general", "dbpath")
mydb = db.SQLite3(dbpath, conf)
migrate.dispatch(args.type, mydb, args.dump)
migrate.dispatch(args.type, mydb, args.dump, args.empty_id)
sys.exit(0)

@ -1,28 +1,26 @@
# -*- encoding: utf-8 -*-
import sys
PY2K = sys.version_info[0] == 2
if not PY2K:
map, zip, filter = map, zip, filter
from functools import reduce
iteritems = lambda dikt: iter(dikt.items())
try:
text_type = unicode # Python 2
string_types = (str, unicode)
PY2K = True
except NameError: # Python 3
PY2K = False
text_type = str
string_types = (str, )
if not PY2K:
buffer = memoryview
filter, map, zip = filter, map, zip
def iteritems(dikt):
return iter(dikt.items()) # noqa: E731
from functools import reduce
else:
buffer = buffer
from itertools import ifilter, imap, izip
filter, map, zip = ifilter, imap, izip
from itertools import imap, izip, ifilter
map, zip, filter = imap, izip, ifilter
def iteritems(dikt):
return dikt.iteritems() # noqa: E731
reduce = reduce
iteritems = lambda dikt: dikt.iteritems()
text_type = unicode
string_types = (str, unicode)
buffer = buffer

@ -7,18 +7,16 @@ import logging
import datetime
from email.utils import parseaddr, formataddr
from configparser import ConfigParser
try:
from backports.configparser import ConfigParser
except ImportError:
from configparser import ConfigParser
from isso.compat import text_type as str
logger = logging.getLogger("isso")
# Python 2.6 compatibility
def total_seconds(td):
return (td.microseconds + (td.seconds + td.days * 24 * 3600) * 10**6) / 10**6
def timedelta(string):
"""
Parse :param string: into :class:`datetime.timedelta`, you can use any
@ -40,7 +38,7 @@ def timedelta(string):
"""
keys = ["weeks", "days", "hours", "minutes", "seconds"]
regex = "".join(["((?P<%s>\d+)%s ?)?" % (k, k[0]) for k in keys])
regex = "".join(["((?P<%s>\\d+)%s ?)?" % (k, k[0]) for k in keys])
kwargs = {}
for k, v in re.match(regex, string).groupdict(default="0").items():
kwargs[k] = int(v)
@ -98,7 +96,7 @@ class IssoParser(ConfigParser):
try:
return int(delta.total_seconds())
except AttributeError:
return int(total_seconds(delta))
return int(delta.total_seconds())
def getlist(self, section, key):
return list(map(str.strip, self.get(section, key).split(',')))
@ -125,8 +123,9 @@ def new(options=None):
def load(default, user=None):
# return set of (section, option)
setify = lambda cp: set((section, option) for section in cp.sections()
for option in cp.options(section))
def setify(cp):
return set((section, option) for section in cp.sections()
for option in cp.options(section))
parser = new()
parser.read(default)

@ -19,7 +19,8 @@ if PY2K:
else:
import _thread as thread
from werkzeug.contrib.cache import NullCache, SimpleCache
from flask_caching.backends.null import NullCache
from flask_caching.backends.simple import SimpleCache
logger = logging.getLogger("isso")
@ -122,7 +123,9 @@ class uWSGIMixin(Mixin):
self.cache = uWSGICache
timedelta = conf.getint("moderation", "purge-after")
purge = lambda signum: self.db.comments.purge(timedelta)
def purge(signum):
return self.db.comments.purge(timedelta)
uwsgi.register_signal(1, "", purge)
uwsgi.add_timer(1, timedelta)

@ -0,0 +1,134 @@
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
h1, h2, h3, h4, h5, h6 {
font-style: normal;
font-weight: normal;
}
input {
text-align: center;
}
.header::before, .header::after {
content: " ";
display: table;
}
.header::after {
clear: both;
}
.header::before, .header::after {
content: " ";
display: table;
}
.header {
margin-left: auto;
margin-right: auto;
max-width: 68em;
padding-bottom: 1em;
padding-top: 1em;
}
.header header {
display: block;
float: left;
font-weight: normal;
margin-right: 16.0363%;
width: 41.9818%;
}
.header header .logo {
float: left;
max-height: 60px;
padding-right: 12px;
}
.header header h1 {
font-size: 1.55em;
margin-bottom: 0.3em;
}
.header header h2 {
font-size: 1.05em;
}
.header a, .header a:visited {
color: #4d4c4c;
text-decoration: none;
}
.outer {
background-color: #eeeeee;
box-shadow: 0 0 0.5em #c0c0c0 inset;
}
.outer .filters::before, .outer .filters::after {
content: " ";
display: table;
}
.outer .filters::after {
clear: both;
}
.outer .filters::before, .outer .filters::after {
content: " ";
display: table;
}
.outer .filters {
margin-left: auto;
margin-right: auto;
max-width: 68em;
padding: 1em;
}
a {
text-decoration: none;
color: #4d4c4c;
}
.label {
background-color: #ddd;
border: 1px solid #ccc;
border-radius: 2px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
cursor: pointer;
line-height: 1.4em;
outline: 0 none;
padding: calc(0.6em - 1px);
}
.active {
box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.6) inset;
}
.label-valid {
background-color: #cfc;
border-color: #cfc;
}
.label-pending {
background-color: #ffc;
border-color: #ffc;
}
.mode {
float: left;
}
.pagination {
float: right;
}
.note .label {
margin: 9px;
padding: 3px;
}
#login {
margin-top: 40px;
text-align: center;
width: 100%;
}
.isso-comment-footer a {
cursor: pointer;
}
.thread-title {
margin-left: 3em;
}
.group {
float: left;
margin-left: 2em;
}
.editable {
border: 1px solid #aaa;
border-radius: 5px;
margin: 10px;
padding: 5px;
}
.hidden {
display: none;
}

@ -3,7 +3,7 @@
-moz-box-sizing: border-box;
box-sizing: border-box;
}
#isso-thread a {
#isso-thread .isso-comment-header a {
text-decoration: none;
}
@ -15,39 +15,42 @@
color: #555;
font-weight: bold;
}
#isso-thread > .isso-feedlink {
float: right;
padding-left: 1em;
}
#isso-thread > .isso-feedlink > a {
font-size: 0.8em;
vertical-align: bottom;
}
#isso-thread .textarea {
min-height: 58px;
outline: 0;
}
#isso-thread .textarea.placeholder {
color: #AAA;
color: #757575;
}
.isso-comment {
#isso-root .isso-comment {
max-width: 68em;
padding-top: 0.95em;
margin: 0.95em auto;
}
.isso-comment:not(:first-of-type),
#isso-root .preview .isso-comment {
padding-top: 0;
margin: 0;
}
#isso-root .isso-comment:not(:first-of-type),
.isso-follow-up .isso-comment {
border-top: 1px solid rgba(0, 0, 0, 0.1);
}
.isso-comment > div.avatar,
.isso-postbox > .avatar {
.isso-comment > div.avatar {
display: block;
float: left;
width: 7%;
margin: 3px 15px 0 0;
}
.isso-postbox > .avatar {
float: left;
margin: 5px 10px 0 5px;
width: 48px;
height: 48px;
overflow: hidden;
}
.isso-comment > div.avatar > svg,
.isso-postbox > .avatar > svg {
.isso-comment > div.avatar > svg {
max-width: 48px;
max-height: 48px;
border: 1px solid rgba(0, 0, 0, 0.2);
@ -90,7 +93,8 @@
font-weight: bold;
color: #555;
}
.isso-comment > div.text-wrapper > .textarea-wrapper .textarea {
.isso-comment > div.text-wrapper > .textarea-wrapper .textarea,
.isso-comment > div.text-wrapper > .textarea-wrapper .preview {
margin-top: 0.2em;
}
.isso-comment > div.text-wrapper > div.text p {
@ -108,7 +112,8 @@
font-size: 130%;
font-weight: bold;
}
.isso-comment > div.text-wrapper > div.textarea-wrapper .textarea {
.isso-comment > div.text-wrapper > div.textarea-wrapper .textarea,
.isso-comment > div.text-wrapper > div.textarea-wrapper .preview {
width: 100%;
border: 1px solid #f0f0f0;
border-radius: 2px;
@ -119,18 +124,21 @@
color: gray !important;
clear: left;
}
.isso-feedlink,
.isso-comment > div.text-wrapper > .isso-comment-footer a {
font-weight: bold;
text-decoration: none;
}
.isso-feedlink:hover,
.isso-comment > div.text-wrapper > .isso-comment-footer a:hover {
color: #111111 !important;
text-shadow: #aaaaaa 0 0 1px !important;
}
.isso-comment > div.text-wrapper > .isso-comment-footer a.reply,
.isso-comment > div.text-wrapper > .isso-comment-footer a.edit,
.isso-comment > div.text-wrapper > .isso-comment-footer a.cancel,
.isso-comment > div.text-wrapper > .isso-comment-footer a.delete {
.isso-comment > div.text-wrapper > .isso-comment-footer > a {
position: relative;
top: .2em;
}
.isso-comment > div.text-wrapper > .isso-comment-footer > a + a {
padding-left: 1em;
}
.isso-comment > div.text-wrapper > .isso-comment-footer .votes {
@ -144,10 +152,14 @@
.isso-comment .isso-postbox {
margin-top: 0.8em;
}
.isso-comment.isso-no-votes > * > .isso-comment-footer span.votes {
display: none;
}
.isso-postbox {
max-width: 68em;
margin: 0 auto 2em;
clear: right;
}
.isso-postbox > .form-wrapper {
display: block;
@ -157,7 +169,8 @@
.isso-postbox > .form-wrapper > .auth-section .post-action {
display: block;
}
.isso-postbox > .form-wrapper .textarea {
.isso-postbox > .form-wrapper .textarea,
.isso-postbox > .form-wrapper .preview {
margin: 0 0 .3em;
padding: .4em .8em;
border-radius: 3px;
@ -165,6 +178,16 @@
border: 1px solid rgba(0, 0, 0, 0.2);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.isso-postbox > .form-wrapper input[type=checkbox] {
vertical-align: middle;
position: relative;
bottom: 1px;
margin-left: 0;
}
.isso-postbox > .form-wrapper .notification-section {
font-size: 0.90em;
padding-top: .3em;
}
#isso-thread .textarea:focus,
#isso-thread input:focus {
border-color: rgba(0, 0, 0, 0.8);
@ -187,7 +210,7 @@
.isso-postbox > .form-wrapper > .auth-section .post-action {
display: inline-block;
float: right;
margin: 0;
margin: 0 0 0 5px;
}
.isso-postbox > .form-wrapper > .auth-section .post-action > input {
padding: calc(.3em - 1px);
@ -205,6 +228,32 @@
.isso-postbox > .form-wrapper > .auth-section .post-action > input:active {
background-color: #BBB;
}
.isso-postbox > .form-wrapper .preview,
.isso-postbox > .form-wrapper input[name="edit"],
.isso-postbox.preview-mode > .form-wrapper input[name="preview"],
.isso-postbox.preview-mode > .form-wrapper .textarea {
display: none;
}
.isso-postbox.preview-mode > .form-wrapper .preview {
display: block;
}
.isso-postbox.preview-mode > .form-wrapper input[name="edit"] {
display: inline;
}
.isso-postbox > .form-wrapper .preview {
background-color: #f8f8f8;
background: repeating-linear-gradient(
-45deg,
#f8f8f8,
#f8f8f8 10px,
#fff 10px,
#fff 20px
);
}
.isso-postbox > .form-wrapper > .notification-section {
display: none;
padding-bottom: 10px;
}
@media screen and (max-width:600px) {
.isso-postbox > .form-wrapper > .auth-section .input-wrapper {
display: block;
@ -214,9 +263,4 @@
.isso-postbox > .form-wrapper > .auth-section .input-wrapper input {
width: 100%;
}
.isso-postbox > .form-wrapper > .auth-section .post-action {
display: block;
float: none;
text-align: right;
}
}

@ -9,6 +9,8 @@ from collections import defaultdict
logger = logging.getLogger("isso")
from isso.compat import buffer
from isso.db.comments import Comments
from isso.db.threads import Threads
from isso.db.spam import Guard
@ -96,10 +98,12 @@ class SQLite3:
# limit max. nesting level to 1
if self.version == 2:
first = lambda rv: list(map(operator.itemgetter(0), rv))
def first(rv):
return list(map(operator.itemgetter(0), rv))
with sqlite3.connect(self.path) as con:
top = first(con.execute("SELECT id FROM comments WHERE parent IS NULL").fetchall())
top = first(con.execute(
"SELECT id FROM comments WHERE parent IS NULL").fetchall())
flattened = defaultdict(set)
for id in top:
@ -107,13 +111,15 @@ class SQLite3:
ids = [id, ]
while ids:
rv = first(con.execute("SELECT id FROM comments WHERE parent=?", (ids.pop(), )))
rv = first(con.execute(
"SELECT id FROM comments WHERE parent=?", (ids.pop(), )))
ids.extend(rv)
flattened[id].update(set(rv))
for id in flattened.keys():
for n in flattened[id]:
con.execute("UPDATE comments SET parent=? WHERE id=?", (id, n))
con.execute(
"UPDATE comments SET parent=? WHERE id=?", (id, n))
con.execute('PRAGMA user_version = 3')
logger.info("%i rows changed", con.total_changes)

@ -1,11 +1,18 @@
# -*- encoding: utf-8 -*-
import logging
import time
from isso.utils import Bloomfilter
from isso.compat import buffer
logger = logging.getLogger("isso")
MAX_LIKES_AND_DISLIKES = 142
class Comments:
"""Hopefully DB-independend SQL to store, modify and retrieve all
comment-related actions. Here's a short scheme overview:
@ -19,8 +26,11 @@ class Comments:
The tuple (tid, id) is unique and thus primary key.
"""
fields = ['tid', 'id', 'parent', 'created', 'modified', 'mode', 'remote_addr',
'text', 'author', 'email', 'website', 'likes', 'dislikes', 'voters']
fields = ['tid', 'id', 'parent', 'created', 'modified',
'mode', # status of the comment 1 = valid, 2 = pending,
# 4 = soft-deleted (cannot hard delete because of replies)
'remote_addr', 'text', 'author', 'email', 'website',
'likes', 'dislikes', 'voters', 'notification']
def __init__(self, db):
@ -30,7 +40,12 @@ class Comments:
' tid REFERENCES threads(id), id INTEGER PRIMARY KEY, parent INTEGER,',
' created FLOAT NOT NULL, modified FLOAT, mode INTEGER, remote_addr VARCHAR,',
' text VARCHAR, author VARCHAR, email VARCHAR, website VARCHAR,',
' likes INTEGER DEFAULT 0, dislikes INTEGER DEFAULT 0, voters BLOB NOT NULL);'])
' likes INTEGER DEFAULT 0, dislikes INTEGER DEFAULT 0, voters BLOB NOT NULL,',
' notification INTEGER DEFAULT 0);'])
try:
self.db.execute(['ALTER TABLE comments ADD COLUMN notification INTEGER DEFAULT 0;'])
except Exception:
pass
def add(self, uri, c):
"""
@ -47,16 +62,16 @@ class Comments:
'INSERT INTO comments (',
' tid, parent,'
' created, modified, mode, remote_addr,',
' text, author, email, website, voters )',
' text, author, email, website, voters, notification)',
'SELECT',
' threads.id, ?,',
' ?, ?, ?, ?,',
' ?, ?, ?, ?, ?',
' ?, ?, ?, ?, ?, ?',
'FROM threads WHERE threads.uri = ?;'], (
c.get('parent'),
c.get('created') or time.time(), None, c["mode"], c['remote_addr'],
c['text'], c.get('author'), c.get('email'), c.get('website'), buffer(
Bloomfilter(iterable=[c['remote_addr']]).array),
Bloomfilter(iterable=[c['remote_addr']]).array), c.get('notification'),
uri)
)
@ -73,6 +88,34 @@ class Comments:
' mode=1',
'WHERE id=? AND mode=2'], (id, ))
def is_previously_approved_author(self, email):
"""
Search for previously activated comments with this author email.
"""
# if the user has not entered email, email is None, in which case we can't check if they have previous comments
if email is not None:
# search for any activated comments within the last 6 months by email
# this SQL should be one of the fastest ways of doing this check
# https://stackoverflow.com/questions/18114458/fastest-way-to-determine-if-record-exists
rv = self.db.execute([
'SELECT CASE WHEN EXISTS(',
' select * from comments where email=? and mode=1 and ',
' created > strftime("%s", DATETIME("now", "-6 month"))',
') THEN 1 ELSE 0 END;'], (email,)).fetchone()
return rv[0] == 1
else:
return False
def unsubscribe(self, email, id):
"""
Turn off email notifications for replies to this comment.
"""
self.db.execute([
'UPDATE comments SET',
' notification=0',
'WHERE email=? AND (id=? OR parent=?);'], (email, id, id))
def update(self, id, data):
"""
Update comment :param:`id` with values from :param:`data` and return
@ -80,7 +123,7 @@ class Comments:
"""
self.db.execute([
'UPDATE comments SET',
','.join(key + '=' + '?' for key in data),
','.join(key + '=' + '?' for key in data),
'WHERE id=?;'],
list(data.values()) + [id])
@ -91,19 +134,78 @@ class Comments:
Search for comment :param:`id` and return a mapping of :attr:`fields`
and values.
"""
rv = self.db.execute('SELECT * FROM comments WHERE id=?', (id, )).fetchone()
rv = self.db.execute(
'SELECT * FROM comments WHERE id=?', (id, )).fetchone()
if rv:
return dict(zip(Comments.fields, rv))
return None
def fetch(self, uri, mode=5, after=0, parent='any', order_by='id', limit=None):
def count_modes(self):
"""
Return comment mode counts for admin
"""
comment_count = self.db.execute(
'SELECT mode, COUNT(comments.id) FROM comments '
'GROUP BY comments.mode').fetchall()
return dict(comment_count)
def fetchall(self, mode=5, after=0, parent='any', order_by='id',
limit=100, page=0, asc=1):
"""
Return comments for admin with :param:`mode`.
"""
fields_comments = ['tid', 'id', 'parent', 'created', 'modified',
'mode', 'remote_addr', 'text', 'author',
'email', 'website', 'likes', 'dislikes']
fields_threads = ['uri', 'title']
sql_comments_fields = ', '.join(['comments.' + f
for f in fields_comments])
sql_threads_fields = ', '.join(['threads.' + f
for f in fields_threads])
sql = ['SELECT ' + sql_comments_fields + ', ' + sql_threads_fields + ' '
'FROM comments INNER JOIN threads '
'ON comments.tid=threads.id '
'WHERE comments.mode = ? ']
sql_args = [mode]
if parent != 'any':
if parent is None:
sql.append('AND comments.parent IS NULL')
else:
sql.append('AND comments.parent=?')
sql_args.append(parent)
# custom sanitization
if order_by not in ['id', 'created', 'modified', 'likes', 'dislikes', 'tid']:
sql.append('ORDER BY ')
sql.append("comments.created")
if not asc:
sql.append(' DESC')
else:
sql.append('ORDER BY ')
sql.append('comments.' + order_by)
if not asc:
sql.append(' DESC')
sql.append(", comments.created")
if limit:
sql.append('LIMIT ?,?')
sql_args.append(page * limit)
sql_args.append(limit)
rv = self.db.execute(sql, sql_args).fetchall()
for item in rv:
yield dict(zip(fields_comments + fields_threads, item))
def fetch(self, uri, mode=5, after=0, parent='any',
order_by='id', asc=1, limit=None):
"""
Return comments for :param:`uri` with :param:`mode`.
"""
sql = [ 'SELECT comments.* FROM comments INNER JOIN threads ON',
' threads.uri=? AND comments.tid=threads.id AND (? | comments.mode) = ?',
' AND comments.created>?']
sql = ['SELECT comments.* FROM comments INNER JOIN threads ON',
' threads.uri=? AND comments.tid=threads.id AND (? | comments.mode) = ?',
' AND comments.created>?']
sql_args = [uri, mode, mode, after]
@ -114,8 +216,13 @@ class Comments:
sql.append('AND comments.parent=?')
sql_args.append(parent)
sql.append('ORDER BY ? ASC')
sql_args.append(order_by)
# custom sanitization
if order_by not in ['id', 'created', 'modified', 'likes', 'dislikes']:
order_by = 'id'
sql.append('ORDER BY ')
sql.append(order_by)
if not asc:
sql.append(' DESC')
if limit:
sql.append('LIMIT ?')
@ -151,7 +258,8 @@ class Comments:
In the second case this comment can be safely removed without any side
effects."""
refs = self.db.execute('SELECT * FROM comments WHERE parent=?', (id, )).fetchone()
refs = self.db.execute(
'SELECT * FROM comments WHERE parent=?', (id, )).fetchone()
if refs is None:
self.db.execute('DELETE FROM comments WHERE id=?', (id, ))
@ -161,7 +269,8 @@ class Comments:
self.db.execute('UPDATE comments SET text=? WHERE id=?', ('', id))
self.db.execute('UPDATE comments SET mode=? WHERE id=?', (4, id))
for field in ('author', 'website'):
self.db.execute('UPDATE comments SET %s=? WHERE id=?' % field, (None, id))
self.db.execute('UPDATE comments SET %s=? WHERE id=?' %
field, (None, id))
self._remove_stale()
return self.get(id)
@ -178,13 +287,18 @@ class Comments:
if rv is None:
return None
operation_name = 'Upvote' if upvote else 'Downvote'
likes, dislikes, voters = rv
if likes + dislikes >= 142:
return {'likes': likes, 'dislikes': dislikes}
if likes + dislikes >= MAX_LIKES_AND_DISLIKES:
message = '{} denied due to a "likes + dislikes" total too high ({} >= {})'.format(operation_name, likes + dislikes, MAX_LIKES_AND_DISLIKES)
logger.debug('Comments.vote(id=%s): %s', id, message)
return {'likes': likes, 'dislikes': dislikes, 'message': message}
bf = Bloomfilter(bytearray(voters), likes + dislikes)
if remote_addr in bf:
return {'likes': likes, 'dislikes': dislikes}
message = '{} denied because a vote has already been registered for this remote address: {}'.format(operation_name, remote_addr)
logger.debug('Comments.vote(id=%s): %s', id, message)
return {'likes': likes, 'dislikes': dislikes, 'message': message}
bf.add(remote_addr)
self.db.execute([

@ -7,7 +7,7 @@ import binascii
class Preferences:
defaults = [
("session-key", binascii.b2a_hex(os.urandom(24))),
("session-key", binascii.b2a_hex(os.urandom(24)).decode('utf-8')),
]
def __init__(self, db):
@ -24,7 +24,7 @@ class Preferences:
def get(self, key, default=None):
rv = self.db.execute(
'SELECT value FROM preferences WHERE key=?', (key, )).fetchone()
'SELECT value FROM preferences WHERE key=?', (key, )).fetchone()
if rv is None:
return default

@ -49,7 +49,8 @@ class Guard:
if len(rv) >= self.conf.getint("direct-reply"):
return False, "%i direct responses to %s" % (len(rv), uri)
elif self.conf.getboolean("reply-to-self") == False:
# block replies to self unless :param:`reply-to-self` is enabled
elif self.conf.getboolean("reply-to-self") is False:
rv = self.db.execute([
'SELECT id FROM comments WHERE'
' remote_addr = ?',
@ -61,6 +62,14 @@ class Guard:
if len(rv) > 0:
return False, "edit time frame is still open"
# require email if :param:`require-email` is enabled
if self.conf.getboolean("require-email") and not comment.get("email"):
return False, "email address required but not provided"
# require author if :param:`require-author` is enabled
if self.conf.getboolean("require-author") and not comment.get("author"):
return False, "author address required but not provided"
return True, ""
def _spam(self, uri, comment):

@ -25,6 +25,10 @@ class Threads(object):
def __getitem__(self, uri):
return Thread(*self.db.execute("SELECT * FROM threads WHERE uri=?", (uri, )).fetchone())
def get(self, id):
return Thread(*self.db.execute("SELECT * FROM threads WHERE id=?", (id, )).fetchone())
def new(self, uri, title):
self.db.execute("INSERT INTO threads (uri, title) VALUES (?, ?)", (uri, title))
self.db.execute(
"INSERT INTO threads (uri, title) VALUES (?, ?)", (uri, title))
return self[uri]

@ -0,0 +1 @@
../share/isso.conf

@ -7,6 +7,7 @@
<div id="page" style="text-align:center;">
<div id="wrapper" style="width: 900px; text-align: left; margin-left: auto; margin-right: auto;">
<h2><a href="index.html">Isso Demo</a></h2>
<script src="../js/embed.min.js"></script>
<section id="isso-thread" data-title="Isso Test"></section>

@ -8,7 +8,7 @@ import logging
from glob import glob
from werkzeug.wsgi import DispatcherMiddleware
from werkzeug.middleware.dispatcher import DispatcherMiddleware
from werkzeug.wrappers import Response
from isso import dist, make_app, wsgi, config
@ -22,13 +22,13 @@ class Dispatcher(DispatcherMiddleware):
a relative URI, e.g. /foo.example and /other.bar.
"""
default = os.path.join(dist.location, "share", "isso.conf")
def __init__(self, *confs):
self.isso = {}
for i, conf in enumerate(map(config.load(Dispatcher.default, conf))):
default = os.path.join(
dist.location, dist.project_name, "defaults.ini")
for i, path in enumerate(confs):
conf = config.load(default, path)
if not conf.get("general", "name"):
logger.warn("unable to dispatch %r, no 'name' set", confs[i])
@ -46,7 +46,8 @@ class Dispatcher(DispatcherMiddleware):
return super(Dispatcher, self).__call__(environ, start_response)
def default(self, environ, start_response):
resp = Response("\n".join(self.isso.keys()), 404, content_type="text/plain")
resp = Response("\n".join(self.isso.keys()),
404, content_type="text/plain")
return resp(environ, start_response)

@ -14,6 +14,11 @@ from email.utils import formatdate
from email.header import Header
from email.mime.text import MIMEText
try:
from urllib.parse import quote
except ImportError:
from urllib import quote
import logging
logger = logging.getLogger("isso")
@ -31,16 +36,59 @@ else:
from _thread import start_new_thread
class SMTPConnection(object):
def __init__(self, conf):
self.conf = conf
def __enter__(self):
klass = (smtplib.SMTP_SSL if self.conf.get(
'security') == 'ssl' else smtplib.SMTP)
self.client = klass(host=self.conf.get('host'),
port=self.conf.getint('port'),
timeout=self.conf.getint('timeout'))
if self.conf.get('security') == 'starttls':
if sys.version_info >= (3, 4):
import ssl
self.client.starttls(context=ssl.create_default_context())
else:
self.client.starttls()
username = self.conf.get('username')
password = self.conf.get('password')
if username and password:
if PY2K:
username = username.encode('ascii')
password = password.encode('ascii')
self.client.login(username, password)
return self.client
def __exit__(self, exc_type, exc_value, traceback):
self.client.quit()
class SMTP(object):
def __init__(self, isso):
self.isso = isso
self.conf = isso.conf.section("smtp")
self.public_endpoint = isso.conf.get("server", "public-endpoint")
# rstrips potential trailing '/', without having to `repr` the `local` object.
if self.public_endpoint:
self.public_endpoint = self.public_endpoint.rstrip('/')
else:
self.public_endpoint = local("host")
self.admin_notify = any((n in ("smtp", "SMTP")) for n in isso.conf.getlist("general", "notify"))
self.reply_notify = isso.conf.getboolean("general", "reply-notifications")
# test SMTP connectivity
try:
with self:
with SMTPConnection(self.conf):
logger.info("connected to SMTP server")
except (socket.error, smtplib.SMTPException):
logger.exception("unable to connect to SMTP server")
@ -49,7 +97,8 @@ class SMTP(object):
def spooler(args):
try:
self._sendmail(args[b"subject"].decode("utf-8"),
args["body"].decode("utf-8"))
args["body"].decode("utf-8"),
args[b"to"].decode("utf-8"))
except smtplib.SMTPConnectError:
return uwsgi.SPOOL_RETRY
else:
@ -57,37 +106,16 @@ class SMTP(object):
uwsgi.spooler = spooler
def __enter__(self):
klass = (smtplib.SMTP_SSL if self.conf.get('security') == 'ssl' else smtplib.SMTP)
self.client = klass(host=self.conf.get('host'),
port=self.conf.getint('port'),
timeout=self.conf.getint('timeout'))
if self.conf.get('security') == 'starttls':
if sys.version_info >= (3, 4):
import ssl
self.client.starttls(context=ssl.create_default_context())
else:
self.client.starttls()
if self.conf.get('username') and self.conf.get('password'):
self.client.login(self.conf.get('username'),
self.conf.get('password'))
return self.client
def __exit__(self, exc_type, exc_value, traceback):
self.client.quit()
def __iter__(self):
yield "comments.new:after-save", self.notify
yield "comments.new:after-save", self.notify_new
yield "comments.activate", self.notify_activated
def format(self, thread, comment):
def format(self, thread, comment, parent_comment, recipient=None, admin=False):
rv = io.StringIO()
author = comment["author"] or "Anonymous"
if comment["email"]:
if admin and comment["email"]:
author += " <%s>" % comment["email"]
rv.write(author + " wrote:\n")
@ -95,39 +123,80 @@ class SMTP(object):
rv.write(comment["text"] + "\n")
rv.write("\n")
if comment["website"]:
rv.write("User's URL: %s\n" % comment["website"])
if admin:
if comment["website"]:
rv.write("User's URL: %s\n" % comment["website"])
rv.write("IP address: %s\n" % comment["remote_addr"])
rv.write("IP address: %s\n" % comment["remote_addr"])
rv.write("Link to comment: %s\n" % (local("origin") + thread["uri"] + "#isso-%i" % comment["id"]))
rv.write("Link to comment: %s\n" %
(local("origin") + thread["uri"] + "#isso-%i" % comment["id"]))
rv.write("\n")
rv.write("---\n")
uri = local("host") + "/id/%i" % comment["id"]
key = self.isso.sign(comment["id"])
if admin:
uri = self.public_endpoint + "/id/%i" % comment["id"]
key = self.isso.sign(comment["id"])
rv.write("---\n")
rv.write("Delete comment: %s\n" % (uri + "/delete/" + key))
rv.write("Delete comment: %s\n" % (uri + "/delete/" + key))
if comment["mode"] == 2:
rv.write("Activate comment: %s\n" % (uri + "/activate/" + key))
if comment["mode"] == 2:
rv.write("Activate comment: %s\n" % (uri + "/activate/" + key))
rv.seek(0)
return rv.read()
else:
uri = self.public_endpoint + "/id/%i" % parent_comment["id"]
key = self.isso.sign(('unsubscribe', recipient))
def notify(self, thread, comment):
rv.write("Unsubscribe from this conversation: %s\n" % (uri + "/unsubscribe/" + quote(recipient) + "/" + key))
body = self.format(thread, comment)
rv.seek(0)
return rv.read()
def notify_new(self, thread, comment):
if self.admin_notify:
body = self.format(thread, comment, None, admin=True)
subject = "New comment posted"
if thread['title']:
subject = "%s on %s" % (subject, thread["title"])
self.sendmail(subject, body, thread, comment)
if comment["mode"] == 1:
self.notify_users(thread, comment)
def notify_activated(self, thread, comment):
self.notify_users(thread, comment)
def notify_users(self, thread, comment):
if self.reply_notify and "parent" in comment and comment["parent"] is not None:
# Notify interested authors that a new comment is posted
notified = []
parent_comment = self.isso.db.comments.get(comment["parent"])
comments_to_notify = [parent_comment] if parent_comment is not None else []
comments_to_notify += self.isso.db.comments.fetch(thread["uri"], mode=1, parent=comment["parent"])
for comment_to_notify in comments_to_notify:
email = comment_to_notify["email"]
if "email" in comment_to_notify and comment_to_notify["notification"] and email not in notified \
and comment_to_notify["id"] != comment["id"] and email != comment["email"]:
body = self.format(thread, comment, parent_comment, email, admin=False)
subject = "Re: New comment posted on %s" % thread["title"]
self.sendmail(subject, body, thread, comment, to=email)
notified.append(email)
def sendmail(self, subject, body, thread, comment, to=None):
to = to or self.conf.get("to")
if not subject:
# Fallback, just in case as an empty subject does not work
subject = 'isso notification'
if uwsgi:
uwsgi.spool({b"subject": thread["title"].encode("utf-8"),
b"body": body.encode("utf-8")})
uwsgi.spool({b"subject": subject.encode("utf-8"),
b"body": body.encode("utf-8"),
b"to": to.encode("utf-8")})
else:
start_new_thread(self._retry, (thread["title"], body))
start_new_thread(self._retry, (subject, body, to))
def _sendmail(self, subject, body):
def _sendmail(self, subject, body, to_addr):
from_addr = self.conf.get("from")
to_addr = self.conf.get("to")
msg = MIMEText(body, 'plain', 'utf-8')
msg['From'] = from_addr
@ -135,13 +204,13 @@ class SMTP(object):
msg['Date'] = formatdate(localtime=True)
msg['Subject'] = Header(subject, 'utf-8')
with self as con:
with SMTPConnection(self.conf) as con:
con.sendmail(from_addr, to_addr, msg.as_string())
def _retry(self, subject, body):
def _retry(self, subject, body, to):
for x in range(5):
try:
self._sendmail(subject, body)
self._sendmail(subject, body, to)
except smtplib.SMTPConnectError:
time.sleep(60)
else:
@ -168,10 +237,11 @@ class Stdout(object):
logger.info("comment created: %s", json.dumps(comment))
def _edit_comment(self, comment):
logger.info('comment %i edited: %s', comment["id"], json.dumps(comment))
logger.info('comment %i edited: %s',
comment["id"], json.dumps(comment))
def _delete_comment(self, id):
logger.info('comment %i deleted', id)
def _activate_comment(self, id):
logger.info("comment %s activated" % id)
def _activate_comment(self, thread, comment):
logger.info("comment %(id)s activated" % thread)

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 11 KiB

@ -0,0 +1,100 @@
function ajax(req) {
var r = new XMLHttpRequest();
r.open(req.method, req.url, true);
r.onreadystatechange = function () {
if (r.readyState != 4 || r.status != 200) {
if (req.failure) {
req.failure();
}
return;
}
req.success(r.responseText);
};
r.send(req.data);
}
function fade(element) {
var op = 1; // initial opacity
var timer = setInterval(function () {
if (op <= 0.1){
clearInterval(timer);
element.style.display = 'none';
}
element.style.opacity = op;
element.style.filter = 'alpha(opacity=' + op * 100 + ")";
op -= op * 0.1;
}, 10);
}
function moderate(com_id, hash, action, isso_host_script) {
ajax({method: "POST",
url: isso_host_script + "/id/" + com_id + "/" + action + "/" + hash,
success: function(){
fade(document.getElementById("isso-" + com_id));
}});
}
function edit(com_id, hash, author, email, website, comment, isso_host_script) {
ajax({method: "POST",
url: isso_host_script + "/id/" + com_id + "/edit/" + hash,
data: JSON.stringify({text: comment,
author: author,
email: email,
website: website}),
success: function(ret){
console.log("edit successed: ", ret);// TODO display some pretty stuff & update msg
},
error: function(ret){
console.log("Error: ", ret); // TODO flash msg/notif
}});
}
function validate_com(com_id, hash, isso_host_script) {
moderate(com_id, hash, "activate", isso_host_script);
}
function delete_com(com_id, hash, isso_host_script) {
moderate(com_id, hash, "delete", isso_host_script);
}
function unset_editable(elt_id) {
var elt = document.getElementById(elt_id);
if (elt) {
elt.contentEditable = false;
elt.classList.remove("editable");
}
}
function set_editable(elt_id) {
var elt = document.getElementById(elt_id);
if (elt) {
elt.contentEditable = true;
elt.classList.add("editable");
}
}
function start_edit(com_id) {
var editable_elements = ['isso-author-' + com_id,
'isso-email-' + com_id,
'isso-website-' + com_id,
'isso-text-' + com_id];
for (var idx=0; idx <= editable_elements.length; idx++) {
set_editable(editable_elements[idx]);
}
document.getElementById('edit-btn-' + com_id).classList.toggle('hidden');
document.getElementById('stop-edit-btn-' + com_id).classList.toggle('hidden');
document.getElementById('send-edit-btn-' + com_id).classList.toggle('hidden');
}
function stop_edit(com_id) {
var editable_elements = ['isso-author-' + com_id,
'isso-email-' + com_id,
'isso-website-' + com_id,
'isso-text-' + com_id];
for (var idx=0; idx <= editable_elements.length; idx++) {
unset_editable(editable_elements[idx]);
}
document.getElementById('edit-btn-' + com_id).classList.toggle('hidden');
document.getElementById('stop-edit-btn-' + com_id).classList.toggle('hidden');
document.getElementById('send-edit-btn-' + com_id).classList.toggle('hidden');
}
function send_edit(com_id, hash, isso_host_script) {
var author = document.getElementById('isso-author-' + com_id).textContent;
var email = document.getElementById('isso-email-' + com_id).textContent;
var website = document.getElementById('isso-website-' + com_id).textContent;
var comment = document.getElementById('isso-text-' + com_id).textContent;
edit(com_id, hash, author, email, website, comment, isso_host_script);
stop_edit(com_id);
}

@ -3,7 +3,7 @@ define(["app/lib/promise", "app/globals"], function(Q, globals) {
"use strict";
var salt = "Eech7co8Ohloopo9Ol6baimi",
location = window.location.pathname;
location = function() { return window.location.pathname };
var script, endpoint,
js = document.getElementsByTagName("script");
@ -52,7 +52,9 @@ define(["app/lib/promise", "app/globals"], function(Q, globals) {
}
if (xhr.status >= 500) {
reject(xhr.body);
if (reject) {
reject(xhr.body);
}
} else {
resolve({status: xhr.status, body: xhr.responseText});
}
@ -89,8 +91,14 @@ define(["app/lib/promise", "app/globals"], function(Q, globals) {
var create = function(tid, data) {
var deferred = Q.defer();
curl("POST", endpoint + "/new?" + qs({uri: tid || location}), JSON.stringify(data),
function (rv) { deferred.resolve(JSON.parse(rv.body)); });
curl("POST", endpoint + "/new?" + qs({uri: tid || location()}), JSON.stringify(data),
function (rv) {
if (rv.status === 201 || rv.status === 202) {
deferred.resolve(JSON.parse(rv.body));
} else {
deferred.reject(rv.body);
}
});
return deferred.promise;
};
@ -134,7 +142,7 @@ define(["app/lib/promise", "app/globals"], function(Q, globals) {
if (typeof(nested_limit) === 'undefined') { nested_limit = "inf"; }
if (typeof(parent) === 'undefined') { parent = null; }
var query_dict = {uri: tid || location, after: lastcreated, parent: parent};
var query_dict = {uri: tid || location(), after: lastcreated, parent: parent};
if(limit !== "inf") {
query_dict['limit'] = limit;
@ -183,6 +191,24 @@ define(["app/lib/promise", "app/globals"], function(Q, globals) {
return deferred.promise;
};
var feed = function(tid) {
return endpoint + "/feed?" + qs({uri: tid || location()});
};
var preview = function(text) {
var deferred = Q.defer();
curl("POST", endpoint + "/preview", JSON.stringify({text: text}),
function(rv) {
if (rv.status === 200) {
deferred.resolve(JSON.parse(rv.body).text);
} else {
deferred.reject(rv.body);
}
});
return deferred.promise;
};
return {
endpoint: endpoint,
salt: salt,
@ -194,6 +220,8 @@ define(["app/lib/promise", "app/globals"], function(Q, globals) {
fetch: fetch,
count: count,
like: like,
dislike: dislike
dislike: dislike,
feed: feed,
preview: preview
};
});

@ -5,13 +5,20 @@ define(function() {
"css": true,
"lang": (navigator.language || navigator.userLanguage).split("-")[0],
"reply-to-self": false,
"require-email": false,
"require-author": false,
"reply-notifications": false,
"max-comments-top": "inf",
"max-comments-nested": 5,
"reveal-on-click": 5,
"gravatar": false,
"avatar": true,
"avatar-bg": "#f0f0f0",
"avatar-fg": ["#9abf88", "#5698c4", "#e279a3", "#9163b6",
"#be5168", "#f19670", "#e4bf80", "#447c69"].join(" ")
"#be5168", "#f19670", "#e4bf80", "#447c69"].join(" "),
"vote": true,
"vote-levels": null,
"feed": false
};
var js = document.getElementsByTagName("script");

@ -4,7 +4,7 @@ define(["app/api", "app/dom", "app/i18n"], function(api, $, i18n) {
var objs = {};
$.each("a", function(el) {
if (! el.href.match(/#isso-thread$/)) {
if (! el.href.match || ! el.href.match(/#isso-thread$/)) {
return;
}

@ -2,101 +2,137 @@ define(function() {
"use strict";
window.Element.prototype.replace = function(el) {
var element = DOM.htmlify(el);
this.parentNode.replaceChild(element, this);
return element;
};
function Element(node) {
this.obj = node;
window.Element.prototype.prepend = function(el) {
var element = DOM.htmlify(el);
this.insertBefore(element, this.firstChild);
return element;
};
this.replace = function (el) {
var element = DOM.htmlify(el);
node.parentNode.replaceChild(element.obj, node);
return element;
};
window.Element.prototype.append = function(el) {
var element = DOM.htmlify(el);
this.appendChild(element);
return element;
};
this.prepend = function (el) {
var element = DOM.htmlify(el);
node.insertBefore(element.obj, node.firstChild);
return element;
};
window.Element.prototype.insertAfter = function(el) {
var element = DOM.htmlify(el);
this.parentNode.insertBefore(element, this.nextSibling);
return element;
};
this.append = function (el) {
var element = DOM.htmlify(el);
node.appendChild(element.obj);
return element;
};
window.Element.prototype.on = function(type, listener, prevent) {
/*
Shortcut for `Element.addEventListener`, prevents default event
by default, set :param prevents: to `false` to change that behavior.
*/
this.addEventListener(type, function(event) {
listener(event);
if (prevent === undefined || prevent) {
event.preventDefault();
}
});
};
this.insertAfter = function(el) {
var element = DOM.htmlify(el);
node.parentNode.insertBefore(element.obj, node.nextSibling);
return element;
};
window.Element.prototype.toggle = function(type, on, off) {
/*
Toggle between two internal states on event :param type: e.g. to
cycle form visibility. Callback :param on: is called on first event,
:param off: next time.
/**
* Shortcut for `Element.addEventListener`, prevents default event
* by default, set :param prevents: to `false` to change that behavior.
*/
this.on = function(type, listener, prevent) {
node.addEventListener(type, function(event) {
listener(event);
if (prevent === undefined || prevent) {
event.preventDefault();
}
});
};
You can skip to the next state without executing the callback with
`toggler.next()`. You can prevent a cycle when you call `toggler.wait()`
during an event.
/**
* Toggle between two internal states on event :param type: e.g. to
* cycle form visibility. Callback :param a: is called on first event,
* :param b: next time.
*
* You can skip to the next state without executing the callback with
* `toggler.next()`. You can prevent a cycle when you call `toggler.wait()`
* during an event.
*/
this.toggle = function(type, a, b) {
function Toggle(el, on, off) {
this.state = false;
this.el = el;
this.on = on;
this.off = off;
}
var toggler = new Toggle(a, b);
this.on(type, function() {
toggler.next();
});
};
Toggle.prototype.next = function next() {
if (! this.state) {
this.state = true;
this.on(this);
} else {
this.state = false;
this.off(this);
}
this.detach = function() {
// Detach an element from the DOM and return it.
node.parentNode.removeChild(this.obj);
return this;
};
Toggle.prototype.wait = function wait() {
this.state = ! this.state;
this.remove = function() {
// IE quirks
node.parentNode.removeChild(this.obj);
};
var toggler = new Toggle(this, on, off);
this.on(type, function() {
toggler.next();
});
};
this.show = function() {
node.style.display = "block";
};
window.Element.prototype.detach = function() {
/*
Detach an element from the DOM and return it.
*/
this.hide = function() {
node.style.display = "none";
};
this.parentNode.removeChild(this);
return this;
};
this.setText = function(text) {
node.textContent = text;
};
window.Element.prototype.remove = function() {
// Mimimi, I am IE and I am so retarded, mimimi.
this.parentNode.removeChild(this);
};
this.setHtml = function(html) {
node.innerHTML = html;
};
window.Element.prototype.show = function() {
this.style.display = "block";
};
this.blur = function() { node.blur() };
this.focus = function() { node.focus() };
this.scrollIntoView = function(args) { node.scrollIntoView(args) };
this.checked = function() { return node.checked; };
this.setAttribute = function(key, value) { node.setAttribute(key, value) };
this.getAttribute = function(key) { return node.getAttribute(key) };
this.classList = node.classList;
Object.defineProperties(this, {
"textContent": {
get: function() { return node.textContent; },
set: function(textContent) { node.textContent = textContent; }
},
"innerHTML": {
get: function() { return node.innerHTML; },
set: function(innerHTML) { node.innerHTML = innerHTML; }
},
"value": {
get: function() { return node.value; },
set: function(value) { node.value = value; }
},
"placeholder": {
get: function() { return node.placeholder; },
set: function(placeholder) { node.placeholder = placeholder; }
}
});
}
var Toggle = function(a, b) {
this.state = false;
window.Element.prototype.hide = function() {
this.style.display = "none";
this.next = function() {
if (! this.state) {
this.state = true;
a(this);
} else {
this.state = false;
b(this);
}
};
this.wait = function() {
this.state = ! this.state;
};
};
var DOM = function(query, root, single) {
@ -115,31 +151,43 @@ define(function() {
root = window.document;
}
var elements = root.querySelectorAll(query);
if (root instanceof Element) {
root = root.obj;
}
var elements = [].slice.call(root.querySelectorAll(query), 0);
if (elements.length === 0) {
return null;
}
if (elements.length === 1 && single) {
return elements[0];
return new Element(elements[0]);
}
return elements;
// convert NodeList to Array
elements = [].slice.call(elements, 0);
return elements.map(function(el) {
return new Element(el);
});
};
DOM.htmlify = function(html) {
DOM.htmlify = function(el) {
/*
Convert :param html: into an Element (if not already).
*/
*/
if (html instanceof window.Element) {
return html;
if (el instanceof Element) {
return el;
}
if (el instanceof window.Element) {
return new Element(el);
}
var wrapper = DOM.new("div");
wrapper.innerHTML = html;
return wrapper.firstChild;
wrapper.innerHTML = el;
return new Element(wrapper.firstChild);
};
DOM.new = function(tag, content) {
@ -159,10 +207,13 @@ define(function() {
el.href = "#";
}
if (!content && content !== 0) {
content = "";
}
if (["TEXTAREA", "INPUT"].indexOf(el.nodeName) > -1) {
el.value = content || "";
el.value = content;
} else {
el.textContent = content || "";
el.textContent = content;
}
return el;
};
@ -173,4 +224,4 @@ define(function() {
};
return DOM;
});
});

@ -10,7 +10,7 @@ define(function() {
};
Offset.prototype.localTime = function() {
return new Date((new Date()).getTime() + this.values.reduce(
return new Date((new Date()).getTime() - this.values.reduce(
function(a, b) { return a + b; }) / this.values.length);
};
@ -18,4 +18,4 @@ define(function() {
offset: new Offset()
};
});
});

@ -1,13 +1,34 @@
define(["app/config", "app/i18n/de", "app/i18n/en", "app/i18n/fr", "app/i18n/ru", "app/i18n/it", "app/i18n/eo"], function(config, de, en, fr, ru, it, eo) {
define(["app/config", "app/i18n/bg", "app/i18n/cs", "app/i18n/da",
"app/i18n/de", "app/i18n/en", "app/i18n/fa", "app/i18n/fi",
"app/i18n/fr", "app/i18n/hr", "app/i18n/hu", "app/i18n/ru", "app/i18n/it",
"app/i18n/eo", "app/i18n/oc", "app/i18n/pl", "app/i18n/pt_BR", "app/i18n/sk", "app/i18n/sv", "app/i18n/nl", "app/i18n/el_GR",
"app/i18n/es", "app/i18n/vi", "app/i18n/zh_CN", "app/i18n/zh_CN", "app/i18n/zh_TW"],
function(config, bg, cs, da, de, en, fa, fi, fr, hr, hu, ru, it, eo, oc, pl, pt_BR, sk, sv, nl, el, es, vi, zh, zh_CN, zh_TW) {
"use strict";
var pluralforms = function(lang) {
switch (lang) {
case "en":
case "bg":
case "cs":
case "da":
case "de":
case "it":
case "el":
case "en":
case "es":
case "eo":
case "fa":
case "fi":
case "hr":
case "hu":
case "it":
case "pt_BR":
case "sv":
case "nl":
case "vi":
case "zh":
case "zh_CN":
case "zh_TW":
return function(msgs, n) {
return msgs[n === 1 ? 0 : 1];
};
@ -25,6 +46,30 @@ define(["app/config", "app/i18n/de", "app/i18n/en", "app/i18n/fr", "app/i18n/ru"
return typeof msgs[2] !== "undefined" ? msgs[2] : msgs[1];
}
};
case "oc":
return function(msgs, n) {
return msgs[n > 1 ? 1 : 0];
};
case "pl":
return function(msgs, n) {
if (n === 1) {
return msgs[0];
} else if (n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20)) {
return msgs[1];
} else {
return typeof msgs[2] !== "undefined" ? msgs[2] : msgs[1];
}
};
case "sk":
return function(msgs, n) {
if (n === 1) {
return msgs[0];
} else if (n === 2 || n === 3 || n === 4) {
return msgs[1];
} else {
return typeof msgs[2] !== "undefined" ? msgs[2] : msgs[1];
}
};
default:
return null;
}
@ -39,18 +84,41 @@ define(["app/config", "app/i18n/de", "app/i18n/en", "app/i18n/fr", "app/i18n/ru"
}
var catalogue = {
bg: bg,
cs: cs,
da: da,
de: de,
el: el,
en: en,
eo: eo,
es: es,
fa: fa,
fi: fi,
fr: fr,
ru: ru,
it: it,
eo: eo
hr: hr,
hu: hu,
oc: oc,
pl: pl,
pt: pt_BR,
pt_BR: pt_BR,
ru: ru,
sk: sk,
sv: sv,
nl: nl,
vi: vi,
zh: zh_CN,
zh_CN: zh_CN,
zh_TW: zh_TW
};
var plural = pluralforms(lang);
var translate = function(msgid) {
return catalogue[lang][msgid] || en[msgid] || "???";
return config[msgid + '-text-' + lang] ||
catalogue[lang][msgid] ||
en[msgid] ||
"???";
};
var pluralize = function(msgid, n) {

@ -0,0 +1,29 @@
define({
"postbox-text": "Въведете коментара си тук (поне 3 знака)",
"postbox-author": "Име/псевдоним (незадължително)",
"postbox-email": "Ел. поща (незадължително)",
"postbox-website": "Уебсайт (незадължително)",
"postbox-preview": "преглед",
"postbox-edit": "Редактиране",
"postbox-submit": "Публикуване",
"num-comments": "1 коментар\n{{ n }} коментара",
"no-comments": "Все още няма коментари",
"comment-reply": "Отговор",
"comment-edit": "Редактиране",
"comment-save": "Запис",
"comment-delete": "Изтриване",
"comment-confirm": "Потвърждение",
"comment-close": "Затваряне",
"comment-cancel": "Отказ",
"comment-deleted": "Коментарът е изтрит.",
"comment-queued": "Коментарът чака на опашката за модериране.",
"comment-anonymous": "анонимен",
"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 }} години"
});

@ -0,0 +1,29 @@
define({
"postbox-text": "Sem napiště svůj komentář (nejméně 3 znaky)",
"postbox-author": "Jméno (nepovinné)",
"postbox-email": "E-mail (nepovinný)",
"postbox-website": "Web (nepovinný)",
"postbox-preview": "Náhled",
"postbox-edit": "Upravit",
"postbox-submit": "Publikovat",
"num-comments": "Jeden komentář\n{{ n }} Komentářů",
"no-comments": "Zatím bez komentářů",
"comment-reply": "Odpovědět",
"comment-edit": "Upravit",
"comment-save": "Uložit",
"comment-delete": "Smazat",
"comment-confirm": "Potvrdit",
"comment-close": "Zavřít",
"comment-cancel": "Zrušit",
"comment-deleted": "Komentář smazán",
"comment-queued": "Komentář ve frontě na schválení",
"comment-anonymous": "Anonym",
"comment-hidden": "{{ n }} skryto",
"date-now": "právě teď",
"date-minute": "před minutou\npřed {{ n }} minutami",
"date-hour": "před hodinou\npřed {{ n }} hodinami",
"date-day": "včera\npřed {{ n }} dny",
"date-week": "minulý týden\npřed {{ n }} týdny",
"date-month": "minulý měsíc\npřed {{ n }} měsíci",
"date-year": "minulý rok\npřed {{ n }} lety"
});

@ -0,0 +1,32 @@
define({
"postbox-text": "Type Comment Here (at least 3 chars)",
"postbox-author": "Name (optional)",
"postbox-email": "E-mail (optional)",
"postbox-website": "Website (optional)",
"postbox-preview": "Eksempel",
"postbox-edit": "Rediger",
"postbox-submit": "Submit",
"num-comments": "One Comment\n{{ n }} Comments",
"no-comments": "Ingen kommentarer endnu",
"comment-reply": "Svar",
"comment-edit": "Rediger",
"comment-save": "Gem",
"comment-delete": "Fjern",
"comment-confirm": "Bekræft",
"comment-close": "Luk",
"comment-cancel": "Annuller",
"comment-deleted": "Kommentar slettet.",
"comment-queued": "Kommentar i kø for moderation.",
"comment-anonymous": "Anonym",
"comment-hidden": "{{ n }} Skjult",
"date-now": "lige nu",
"date-minute": "et minut siden\n{{ n }} minutter siden",
"date-hour": "en time siden\n{{ n }} timer siden",
"date-day": "Igår\n{{ n }} dage siden",
"date-week": "sidste uge\n{{ n }} uger siden",
"date-month": "sidste måned\n{{ n }} måneder siden",
"date-year": "sidste år\n{{ n }} år siden"
});

@ -1,11 +1,14 @@
define({
"postbox-text": "Kommentar hier eintippen (mindestens 3 Zeichen)",
"postbox-text": "Kommentar hier eingeben (mindestens 3 Zeichen)",
"postbox-author": "Name (optional)",
"postbox-email": "Email (optional)",
"postbox-email": "E-Mail (optional)",
"postbox-website": "Website (optional)",
"postbox-preview": "Vorschau",
"postbox-edit": "Bearbeiten",
"postbox-submit": "Abschicken",
"postbox-notification": "wenn auf meinen Kommentar geantwortet wird, möchte ich eine E-Mail bekommen",
"num-comments": "1 Kommentar\n{{ n }} Kommentare",
"no-comments": "Keine Kommentare bis jetzt",
"no-comments": "Bisher keine Kommentare",
"comment-reply": "Antworten",
"comment-edit": "Bearbeiten",
"comment-save": "Speichern",
@ -17,7 +20,7 @@ define({
"comment-queued": "Kommentar muss noch freigeschaltet werden.",
"comment-anonymous": "Anonym",
"comment-hidden": "{{ n }} versteckt",
"date-now": "eben jetzt",
"date-now": "eben gerade",
"date-minute": "vor einer Minute\nvor {{ n }} Minuten",
"date-hour": "vor einer Stunde\nvor {{ n }} Stunden",
"date-day": "Gestern\nvor {{ n }} Tagen",

@ -0,0 +1,29 @@
define({
"postbox-text": "Γράψτε το σχόλιο εδώ (τουλάχιστον 3 χαρακτήρες)",
"postbox-author": "Όνομα (προαιρετικό)",
"postbox-email": "E-mail (προαιρετικό)",
"postbox-website": "Ιστοσελίδα (προαιρετικό)",
"postbox-preview": "Πρεμιέρα",
"postbox-edit": "Επεξεργασία",
"postbox-submit": "Υποβολή",
"num-comments": "Ένα σχόλιο\n{{ n }} σχόλια",
"no-comments": "Δεν υπάρχουν σχόλια",
"comment-reply": "Απάντηση",
"comment-edit": "Επεξεργασία",
"comment-save": "Αποθήκευση",
"comment-delete": "Διαγραφή",
"comment-confirm": "Επιβεβαίωση",
"comment-close": "Κλείσιμο",
"comment-cancel": "Ακύρωση",
"comment-deleted": "Διαγραμμένο σχόλιο ",
"comment-queued": "Το σχόλιο αναμένει έγκριση",
"comment-anonymous": "Ανώνυμος",
"comment-hidden": "{{ n }} Κρυμμένα",
"date-now": "τώρα",
"date-minute": "πριν ένα λεπτό\nπριν {{ n }} λεπτά",
"date-hour": "πριν μία ώρα\nπριν {{ n }} ώρες",
"date-day": "Χτες\nπριν {{ n }} μέρες",
"date-week": "την προηγούμενη εβδομάδα\nπριν {{ n }} εβδομάδες",
"date-month": "τον προηγούμενο μήνα\nπριν {{ n }} μήνες",
"date-year": "πέρυσι\nπριν {{ n }} χρόνια"
});

@ -3,10 +3,14 @@ define({
"postbox-author": "Name (optional)",
"postbox-email": "E-mail (optional)",
"postbox-website": "Website (optional)",
"postbox-preview": "Preview",
"postbox-edit": "Edit",
"postbox-submit": "Submit",
"postbox-notification": "Subscribe to email notification of replies",
"num-comments": "One Comment\n{{ n }} Comments",
"no-comments": "No Comments Yet",
"atom-feed": "Atom feed",
"comment-reply": "Reply",
"comment-edit": "Edit",

@ -3,6 +3,8 @@ define({
"postbox-author": "Nomo (malnepra)",
"postbox-email": "Retadreso (malnepra)",
"postbox-website": "Retejo (malnepra)",
"postbox-preview": "Antaŭrigardo",
"postbox-edit": "Redaktu",
"postbox-submit": "Sendu",
"num-comments": "{{ n }} komento\n{{ n }} komentoj",
"no-comments": "Neniu komento ankoraŭ",

@ -0,0 +1,29 @@
define({
"postbox-text": "Escriba su comentario aquí (al menos 3 caracteres)",
"postbox-author": "Nombre (opcional)",
"postbox-email": "E-mail (opcional)",
"postbox-website": "Sitio web (opcional)",
"postbox-preview": "Vista preliminar",
"postbox-edit": "Editar",
"postbox-submit": "Enviar",
"num-comments": "Un Comentario\n{{ n }} Comentarios",
"no-comments": "Sin Comentarios Todavía",
"comment-reply": "Responder",
"comment-edit": "Editar",
"comment-save": "Guardar",
"comment-delete": "Eliminar",
"comment-confirm": "Confirmar",
"comment-close": "Cerrar",
"comment-cancel": "Cancelar",
"comment-deleted": "Comentario eliminado.",
"comment-queued": "Comentario en espera para moderación.",
"comment-anonymous": "Anónimo",
"comment-hidden": "{{ n }} Oculto(s)",
"date-now": "ahora",
"date-minute": "hace un minuto\nhace {{ n }} minutos",
"date-hour": "hace una hora\nhace {{ n }} horas",
"date-day": "ayer\nHace {{ n }} días",
"date-week": "la semana pasada\nhace {{ n }} semanas",
"date-month": "el mes pasado\nhace {{ n }} meses",
"date-year": "el año pasado\nhace {{ n }} años"
});

@ -0,0 +1,32 @@
define({
"postbox-text": "نظر خود را اینجا بنویسید (حداقل سه نویسه)",
"postbox-author": "اسم (اختیاری)",
"postbox-email": "ایمیل (اختیاری)",
"postbox-website": "سایت (اختیاری)",
"postbox-preview": "پیش‌نمایش",
"postbox-edit": "ویرایش",
"postbox-submit": "ارسال",
"num-comments": "یک نظر\n{{ n }} نظر",
"no-comments": "هنوز نظری نوشته نشده است",
"comment-reply": "پاسخ",
"comment-edit": "ویرایش",
"comment-save": "ذخیره",
"comment-delete": "حذف",
"comment-confirm": "تایید",
"comment-close": "بستن",
"comment-cancel": "انصراف",
"comment-deleted": "نظر حذف شد.",
"comment-queued": "نظر در صف بررسی مدیر قرار دارد.",
"comment-anonymous": "ناشناس",
"comment-hidden": "{{ n }} مخفی",
"date-now": "هم اکنون",
"date-minute": "یک دقیقه پیش\n{{ n }} دقیقه پیش",
"date-hour": "یک ساعت پیش\n{{ n }} ساعت پیش",
"date-day": "دیروز\n{{ n }} روز پیش",
"date-week": "یک هفته پیش\n{{ n }} هفته پیش",
"date-month": "یک ماه پیش\n{{ n }} ماه پیش",
"date-year": "یک سال پیش\n{{ n }} سال پیش"
});

@ -0,0 +1,32 @@
define({
"postbox-text": "Kirjoita kommentti tähän (vähintään 3 merkkiä)",
"postbox-author": "Nimi (valinnainen)",
"postbox-email": "Sähköposti (valinnainen)",
"postbox-website": "Web-sivu (valinnainen)",
"postbox-preview": "Esikatselu",
"postbox-edit": "Muokkaa",
"postbox-submit": "Lähetä",
"num-comments": "Yksi kommentti\n{{ n }} kommenttia",
"no-comments": "Ei vielä kommentteja",
"comment-reply": "Vastaa",
"comment-edit": "Muokkaa",
"comment-save": "Tallenna",
"comment-delete": "Poista",
"comment-confirm": "Vahvista",
"comment-close": "Sulje",
"comment-cancel": "Peru",
"comment-deleted": "Kommentti on poistettu.",
"comment-queued": "Kommentti on laitettu jonoon odottamaan moderointia.",
"comment-anonymous": "Nimetön",
"comment-hidden": "{{ n }} piilotettua",
"date-now": "hetki sitten",
"date-minute": "minuutti sitten\n{{ n }} minuuttia sitten",
"date-hour": "tunti sitten\n{{ n }} tuntia sitten",
"date-day": "eilen\n{{ n }} päivää sitten",
"date-week": "viime viikolla\n{{ n }} viikkoa sitten",
"date-month": "viime kuussa\n{{ n }} kuukautta sitten",
"date-year": "viime vuonna\n{{ n }} vuotta sitten"
});

@ -3,9 +3,13 @@ define({
"postbox-author": "Nom (optionnel)",
"postbox-email": "Courriel (optionnel)",
"postbox-website": "Site web (optionnel)",
"postbox-preview": "Aperçu",
"postbox-edit": "Éditer",
"postbox-submit": "Soumettre",
"postbox-notification": "Sabonner aux notifications de réponses",
"num-comments": "{{ n }} commentaire\n{{ n }} commentaires",
"no-comments": "Aucun commentaire pour l'instant",
"no-comments": "Aucun commentaire pour linstant",
"atom-feed": "Flux Atom",
"comment-reply": "Répondre",
"comment-edit": "Éditer",
"comment-save": "Enregistrer",
@ -17,7 +21,7 @@ define({
"comment-queued": "Commentaire en attente de modération.",
"comment-anonymous": "Anonyme",
"comment-hidden": "1 caché\n{{ n }} cachés",
"date-now": "À l'instant",
"date-now": "À linstant",
"date-minute": "Il y a une minute\nIl y a {{ n }} minutes",
"date-hour": "Il y a une heure\nIl y a {{ n }} heures ",
"date-day": "Hier\nIl y a {{ n }} jours",

@ -0,0 +1,29 @@
define({
"postbox-text": "Napiši komentar ovdje (najmanje 3 znaka)",
"postbox-author": "Ime (neobavezno)",
"postbox-email": "E-mail (neobavezno)",
"postbox-website": "Web stranica (neobavezno)",
"postbox-preview": "Pregled",
"postbox-edit": "Uredi",
"postbox-submit": "Pošalji",
"num-comments": "Jedan komentar\n{{ n }} komentara",
"no-comments": "Još nema komentara",
"comment-reply": "Odgovori",
"comment-edit": "Uredi",
"comment-save": "Spremi",
"comment-delete": "Obriši",
"comment-confirm": "Potvrdi",
"comment-close": "Zatvori",
"comment-cancel": "Odustani",
"comment-deleted": "Komentar obrisan",
"comment-queued": "Komentar u redu za provjeru.",
"comment-anonymous": "Anonimno",
"comment-hidden": "{{ n }} Skrivenih",
"date-now": "upravo",
"date-minute": "prije minutu\nprije {{ n }} minuta",
"date-hour": "prije sat vremena\nprije {{ n }} sati",
"date-day": "jučer\nprije {{ n }} dana",
"date-week": "prošli tjedan\nprije {{ n }} tjedana",
"date-month": "prošli mjesec\nprije {{ n }} mjeseci",
"date-year": "prošle godine\nprije {{ n }} godina"
});

@ -0,0 +1,29 @@
define({
"postbox-text": "Hozzászólást ide írd be (legalább 3 betűt)",
"postbox-author": "Név (nem kötelező)",
"postbox-email": "Email (nem kötelező)",
"postbox-website": "Website (nem kötelező)",
"postbox-preview": "Előnézet",
"postbox-edit": "Szerekesztés",
"postbox-submit": "Elküld",
"num-comments": "Egy hozzászólás\n{{ n }} hozzászólás",
"no-comments": "Eddig nincs hozzászólás",
"comment-reply": "Válasz",
"comment-edit": "Szerekesztés",
"comment-save": "Mentés",
"comment-delete": "Törlés",
"comment-confirm": "Megerősít",
"comment-close": "Bezár",
"comment-cancel": "Törlés",
"comment-deleted": "Hozzászólás törölve.",
"comment-queued": "A hozzászólást előbb ellenőrizzük.",
"comment-anonymous": "Névtelen",
"comment-hidden": "{{ n }} rejtve",
"date-now": "pillanatokkal ezelőtt",
"date-minute": "egy perce\n{{ n }} perce",
"date-hour": "egy órája\n{{ n }} órája",
"date-day": "tegnap\n{{ n }} napja",
"date-week": "múlt héten\n{{ n }} hete",
"date-month": "múlt hónapban\n{{ n }} hónapja",
"date-year": "tavaly\n{{ n }} éve"
});

@ -2,6 +2,9 @@ define({
"postbox-text": "Scrivi un commento qui (minimo 3 caratteri)",
"postbox-author": "Nome (opzionale)",
"postbox-email": "E-mail (opzionale)",
"postbox-website": "Sito web (opzionale)",
"postbox-preview": "Anteprima",
"postbox-edit": "Modifica",
"postbox-submit": "Invia",
"num-comments": "Un Commento\n{{ n }} Commenti",
"no-comments": "Ancora Nessun Commento",
@ -15,6 +18,7 @@ define({
"comment-deleted": "Commento eliminato.",
"comment-queued": "Commento in coda per moderazione.",
"comment-anonymous": "Anonimo",
"comment-hidden": "{{ n }} Nascosto",
"date-now": "poco fa",
"date-minute": "un minuto fa\n{{ n }} minuti fa",
"date-hour": "un ora fa\n{{ n }} ore fa",

@ -0,0 +1,29 @@
define({
"postbox-text": "Typ reactie hier (minstens 3 karakters)",
"postbox-author": "Naam (optioneel)",
"postbox-email": "E-mail (optioneel)",
"postbox-website": "Website (optioneel)",
"postbox-preview": "Voorbeeld",
"postbox-edit": "Bewerken",
"postbox-submit": "Versturen",
"num-comments": "Één reactie\n{{ n }} reacties",
"no-comments": "Nog geen reacties",
"comment-reply": "Beantwoorden",
"comment-edit": "Bewerken",
"comment-save": "Opslaan",
"comment-delete": "Verwijderen",
"comment-confirm": "Bevestigen",
"comment-close": "Sluiten",
"comment-cancel": "Annuleren",
"comment-deleted": "Reactie verwijderd.",
"comment-queued": "Reactie staat in de wachtrij voor goedkeuring.",
"comment-anonymous": "Anoniem",
"comment-hidden": "{{ n }} verborgen",
"date-now": "zojuist",
"date-minute": "een minuut geleden\n{{ n }} minuten geleden",
"date-hour": "een uur geleden\n{{ n }} uur geleden",
"date-day": "gisteren\n{{ n }} dagen geleden",
"date-week": "vorige week\n{{ n }} weken geleden",
"date-month": "vorige maand\n{{ n }} maanden geleden",
"date-year": "vorig jaar\n{{ n }} jaar geleden"
});

@ -0,0 +1,34 @@
define({
"postbox-text": "Escriure lo comentari aquí (almens 3 caractèrs)",
"postbox-author": "Nom (opcional)",
"postbox-email": "Corrièl (opcional)",
"postbox-website": "Site web (opcional)",
"postbox-preview": "Apercebut",
"postbox-edit": "Modificar",
"postbox-submit": "Enviar",
"postbox-notification": "S'abonar per corrièl a las notificacions de responsas",
"num-comments": "Un comentari\n{{ n }} comentaris",
"no-comments": "Cap de comentari pel moment",
"atom-feed": "Flux Atom",
"comment-reply": "Respondre",
"comment-edit": "Modificar",
"comment-save": "Salvar",
"comment-delete": "Suprimir",
"comment-confirm": "Confirmar",
"comment-close": "Tampar",
"comment-cancel": "Anullar",
"comment-deleted": "Comentari suprimit.",
"comment-queued": "Comentari en espèra de moderacion.",
"comment-anonymous": "Anonim",
"comment-hidden": "1 rescondut\n{{ n }} resconduts",
"date-now": "ara meteis",
"date-minute": "fa una minuta \nfa {{ n }} minutas",
"date-hour": "fa una ora\nfa {{ n }} oras",
"date-day": "Ièr\nfa {{ n }} jorns",
"date-week": "la setmana passada\nfa {{ n }} setmanas",
"date-month": "lo mes passat\nfa {{ n }} meses",
"date-year": "l'an passat\nfa {{ n }} ans"
});

@ -0,0 +1,34 @@
define({
"postbox-text": "Tutaj wpisz komentarz (co najmniej 3 znaki)",
"postbox-author": "Imię/nick (opcjonalnie)",
"postbox-email": "E-mail (opcjonalnie)",
"postbox-website": "Strona (opcjonalnie)",
"postbox-preview": "Podgląd",
"postbox-edit": "Edytuj",
"postbox-submit": "Wyślij",
"postbox-notification": "Otrzymuj powiadomienia o odpowiedziach na e-mail",
"num-comments": "Jeden komentarz\n{{ n }} komentarze\n{{ n }} komentarzy",
"no-comments": "Nie ma jeszcze komentarzy",
"atom-feed": "Kanał Atom",
"comment-reply": "Odpowiedz",
"comment-edit": "Edytuj",
"comment-save": "Zapisz",
"comment-delete": "Usuń",
"comment-confirm": "Potwierdź",
"comment-close": "Zamknij",
"comment-cancel": "Anuluj",
"comment-deleted": "Komentarz usunięty.",
"comment-queued": "Komentarz w kolejce do moderacji.",
"comment-anonymous": "Anonim",
"comment-hidden": "{{ n }} ukryty\n{{ n }} ukryte\n{{ n }} ukrytych",
"date-now": "teraz",
"date-minute": "minutę temu\n{{ n }} minuty temu\n{{ n }} minut temu",
"date-hour": "godzinę temu\n{{ n }} godziny temu\n{{ n }} godzin temu",
"date-day": "wczoraj\n{{ n }} dni temu",
"date-week": "w ubiegłym tygodniu\n{{ n }} tygodnie temu\n{{ n }} tygodni temu",
"date-month": "w ubiegłym miesiącu\n{{ n }} miesiące temu\n{{ n }} miesięcy temu",
"date-year": "w ubiegłym roku\n{{ n }} lata temu\n{{ n }} lat temu"
});

@ -0,0 +1,34 @@
define({
"postbox-text": "Digite seu comentário aqui (pelo menos 3 letras)",
"postbox-author": "Nome (opcional)",
"postbox-email": "E-mail (opcional)",
"postbox-website": "Website (opcional)",
"postbox-preview": "Prévia",
"postbox-edit": "Editar",
"postbox-submit": "Enviar",
"postbox-notification": "Receber emails de notificação de respostas",
"num-comments": "Um Comentário\n{{ n }} Comentários",
"no-comments": "Nenhum comentário ainda",
"atom-feed": "Feed Atom",
"comment-reply": "Responder",
"comment-edit": "Editar",
"comment-save": "Salvar",
"comment-delete": "Excluir",
"comment-confirm": "Confirmar",
"comment-close": "Fechar",
"comment-cancel": "Cancelar",
"comment-deleted": "Comentário apagado.",
"comment-queued": "Comentário na fila de moderação.",
"comment-anonymous": "Anônimo",
"comment-hidden": "{{ n }} Oculto(s)",
"date-now": "agora mesmo",
"date-minute": "um minuto atrás\n{{ n }} minutos atrás",
"date-hour": "uma hora atrás\n{{ n }} horas atrás",
"date-day": "ontem\n{{ n }} dias",
"date-week": "semana passada\n{{ n }} semanas atrás",
"date-month": "mês passado\n{{ n }} meses atrás",
"date-year": "ano passado\n{{ n }} anos atrás"
});

@ -1,25 +1,30 @@
define({
"postbox-text": "Комментировать здесь (миниум 3 символа)",
"postbox-text": "Оставить комментарий (минимум 3 символа)",
"postbox-author": "Имя (необязательно)",
"postbox-email": "Email (необязательно)",
"postbox-website": "Сайт (необязательно)",
"postbox-preview": "Предпросмотр",
"postbox-edit": "Правка",
"postbox-submit": "Отправить",
"num-comments": "1 Комментарий\n{{ n }} Комментарии",
"no-comments": "Нет Комментарев",
"postbox-notification": "Подписаться на уведомление об ответах",
"num-comments": "{{ n }} комментарий\n{{ n }} комментария\n{{ n }} комментариев",
"no-comments": "Пока нет комментариев",
"comment-reply": "Ответить",
"comment-edit": "Правка",
"comment-save": "Сохранить",
"comment-delete": "Удалить",
"comment-confirm": "Подтвердить",
"comment-confirm": "Подтвердить удаление",
"comment-close": "Закрыть",
"comment-cancel": "Отменить",
"comment-deleted": "Удалить комментарий",
"comment-queued": "Комментарий должен быть разблокирован",
"comment-anonymous": "Анонимный",
"date-now": "Сейчас",
"date-minute": "Минут назад\n{{ n }} минут",
"date-hour": "Час назад\n{{ n }} часов",
"date-day": "Вчера\n{{ n }} дней",
"date-week": "на прошлой недели\n{{ n }} недель",
"date-month": "в прошоим месяце\n{{ n }} месяцов",
"date-year": "в прошлом году\n{{ n }} года\n{{ n }} лет"
"comment-deleted": "Комментарий удалён",
"comment-queued": "Комментарий будет проверен модератором",
"comment-anonymous": "Аноним",
"comment-hidden": "Скрыт {{ n }} комментарий\nСкрыто {{ n }} комментария\nСкрыто {{ n }} комментариев",
"date-now": "Только что",
"date-minute": "{{ n }} минуту назад\n{{ n }} минуты назад\n{{ n }} минут назад",
"date-hour": "{{ n }} час назад\n{{ n }} часа назад\n{{ n }} часов назад",
"date-day": "{{ n }} день назад\n{{ n }} дня назад\n{{ n }} дней назад",
"date-week": "{{ n }} неделю назад\n{{ n }} недели назад\n{{ n }} недель назад",
"date-month": "{{ n }} месяц назад\n{{ n }} месяца назад\n{{ n }} месяцев назад",
"date-year": "{{ n }} год назад\n{{ n }} года назад\n{{ n }} лет назад"
});

@ -0,0 +1,29 @@
define({
"postbox-text": "Sem napíšte svoj komentár (minimálne 3 znaky)",
"postbox-author": "Meno (nepovinné)",
"postbox-email": "E-mail (nepovinný)",
"postbox-website": "Web (nepovinný)",
"postbox-preview": "Náhľad",
"postbox-edit": "Upraviť",
"postbox-submit": "Publikovať",
"num-comments": "Jeden komentár\n{{ n }} komentáre\n{{ n }} komentárov",
"no-comments": "Zatiaľ bez komentárov",
"comment-reply": "Odpovedať",
"comment-edit": "Upraviť",
"comment-save": "Uložiť",
"comment-delete": "Zmazať",
"comment-confirm": "Potvrdit",
"comment-close": "Zavrieť",
"comment-cancel": "Zrušiť",
"comment-deleted": "Komentár bol vymazaný",
"comment-queued": "Komentár zaradený na schválenie",
"comment-anonymous": "Anonym",
"comment-hidden": "{{ n }} skrytý\n{{ n }} skryté\n{{ n }} skrytých",
"date-now": "práve teraz",
"date-minute": "pred minútou\npred {{ n }} minútami",
"date-hour": "pred hodinou\npred {{ n }} hodinami",
"date-day": "včera\npred {{ n }} dňami",
"date-week": "minulý týždeň\npred {{ n }} týždňami",
"date-month": "minulý mesiac\npred {{ n }} mesiacmi",
"date-year": "minulý rok\npred {{ n }} rokmi"
});

@ -0,0 +1,29 @@
define({
"postbox-text": "Skriv din kommentar här (minst 3 tecken)",
"postbox-author": "Namn (frivilligt)",
"postbox-email": "E-mail (frivilligt)",
"postbox-website": "Hemsida (frivilligt)",
"postbox-preview": "Förhandsvisning",
"postbox-edit": "Redigera",
"postbox-submit": "Skicka",
"num-comments": "En kommentar\n{{ n }} kommentarer",
"no-comments": "Inga kommentarer än",
"comment-reply": "Svara",
"comment-edit": "Redigera",
"comment-save": "Spara",
"comment-delete": "Radera",
"comment-confirm": "Bekräfta",
"comment-close": "Stäng",
"comment-cancel": "Avbryt",
"comment-deleted": "Kommentar raderad.",
"comment-queued": "Kommentaren inväntar granskning.",
"comment-anonymous": "Anonym",
"comment-hidden": "{{ n }} Gömd",
"date-now": "just nu",
"date-minute": "en minut sedan\n{{ n }} minuter sedan",
"date-hour": "en timme sedan\n{{ n }} timmar sedan",
"date-day": "igår\n{{ n }} dagar sedan",
"date-week": "förra veckan\n{{ n }} veckor sedan",
"date-month": "förra månaden\n{{ n }} månader sedan",
"date-year": "förra året\n{{ n }} år sedan"
});

@ -0,0 +1,32 @@
define({
"postbox-text": "Nhập bình luận tại đây (tối thiểu 3 ký tự)",
"postbox-author": "Tên (tùy chọn)",
"postbox-email": "E-mail (tùy chọn)",
"postbox-website": "Website (tùy chọn)",
"postbox-preview": "Xem trước",
"postbox-edit": "Sửa",
"postbox-submit": "Gửi",
"num-comments": "Một bình luận\n{{ n }} bình luận",
"no-comments": "Chưa có bình luận nào",
"comment-reply": "Trả lời",
"comment-edit": "Sửa",
"comment-save": "Lưu",
"comment-delete": "Xóa",
"comment-confirm": "Xác nhận",
"comment-close": "Đóng",
"comment-cancel": "Hủy",
"comment-deleted": "Đã xóa bình luận.",
"comment-queued": "Bình luận đang chờ duyệt",
"comment-anonymous": "Nặc danh",
"comment-hidden": "{{ n }} đã ẩn",
"date-now": "vừa mới",
"date-minute": "một phút trước\n{{ n }} phút trước",
"date-hour": "một giờ trước\n{{ n }} giờ trước",
"date-day": "Hôm qua\n{{ n }} ngày trước",
"date-week": "Tuần qua\n{{ n }} tuần trước",
"date-month": "Tháng trước\n{{ n }} tháng trước",
"date-year": "Năm trước\n{{ n }} năm trước"
});

@ -0,0 +1,33 @@
define({
"postbox-text": "在此输入评论 (最少 3 个字符)",
"postbox-author": "名字 (可选)",
"postbox-email": "电子邮箱 (可选)",
"postbox-website": "网站 (可选)",
"postbox-preview": "预览",
"postbox-edit": "编辑",
"postbox-submit": "提交",
"postbox-notification": "有新回复时发送邮件通知",
"num-comments": "1 条评论\n{{ n }} 条评论",
"no-comments": "还没有评论",
"comment-reply": "回复",
"comment-edit": "编辑",
"comment-save": "保存",
"comment-delete": "删除",
"comment-confirm": "确认",
"comment-close": "关闭",
"comment-cancel": "取消",
"comment-deleted": "评论已删除.",
"comment-queued": "评论待审核.",
"comment-anonymous": "匿名",
"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 }} 年前"
});

@ -0,0 +1,33 @@
define({
"postbox-text": "在此輸入留言 (至少 3 個字元)",
"postbox-author": "名稱 (非必填)",
"postbox-email": "電子信箱 (非必填)",
"postbox-website": "個人網站 (非必填)",
"postbox-preview": "預覽",
"postbox-edit": "編輯",
"postbox-submit": "送出",
"postbox-notification": "訂閱回复的電子郵件通知",
"num-comments": "1 則留言\n{{ n }} 則留言",
"no-comments": "尚無留言",
"comment-reply": "回覆",
"comment-edit": "編輯",
"comment-save": "儲存",
"comment-delete": "刪除",
"comment-confirm": "確認",
"comment-close": "關閉",
"comment-cancel": "取消",
"comment-deleted": "留言已刪",
"comment-queued": "留言待審",
"comment-anonymous": "匿名",
"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 }} 年前"
});

@ -7,7 +7,13 @@ define(["app/dom", "app/utils", "app/config", "app/api", "app/jade", "app/i18n",
var Postbox = function(parent) {
var el = $.htmlify(jade.render("postbox"));
var localStorage = utils.localStorageImpl,
el = $.htmlify(jade.render("postbox", {
"author": JSON.parse(localStorage.getItem("author")),
"email": JSON.parse(localStorage.getItem("email")),
"website": JSON.parse(localStorage.getItem("website")),
"preview": ''
}));
// callback on success (e.g. to toggle the reply button)
el.onsuccess = function() {};
@ -19,26 +25,84 @@ define(["app/dom", "app/utils", "app/config", "app/api", "app/jade", "app/i18n",
$(".textarea", this).focus();
return false;
}
if (config["require-email"] &&
$("[name='email']", this).value.length <= 0)
{
$("[name='email']", this).focus();
return false;
}
if (config["require-author"] &&
$("[name='author']", this).value.length <= 0)
{
$("[name='author']", this).focus();
return false;
}
return true;
};
// only display notification checkbox if email is filled in
var email_edit = function() {
if (config["reply-notifications"] && $("[name='email']", el).value.length > 0) {
$(".notification-section", el).show();
} else {
$(".notification-section", el).hide();
}
};
$("[name='email']", el).on("input", email_edit);
email_edit();
// email is not optional if this config parameter is set
if (config["require-email"]) {
$("[name='email']", el).setAttribute("placeholder",
$("[name='email']", el).getAttribute("placeholder").replace(/ \(.*\)/, ""));
}
// author is not optional if this config parameter is set
if (config["require-author"]) {
$("[name='author']", el).placeholder =
$("[name='author']", el).placeholder.replace(/ \(.*\)/, "");
}
// preview function
$("[name='preview']", el).on("click", function() {
api.preview(utils.text($(".textarea", el).innerHTML)).then(
function(html) {
$(".preview .text", el).innerHTML = html;
el.classList.add('preview-mode');
});
});
// edit function
var edit = function() {
$(".preview .text", el).innerHTML = '';
el.classList.remove('preview-mode');
};
$("[name='edit']", el).on("click", edit);
$(".preview", el).on("click", edit);
// submit form, initialize optional fields with `null` and reset form.
// If replied to a comment, remove form completely.
$("[type=submit]", el).on("click", function() {
edit();
if (! el.validate()) {
return;
}
var author = $("[name=author]", el).value || null,
email = $("[name=email]", el).value || null,
website = $("[name=website]", el).value || null;
localStorage.setItem("author", JSON.stringify(author));
localStorage.setItem("email", JSON.stringify(email));
localStorage.setItem("website", JSON.stringify(website));
api.create($("#isso-thread").getAttribute("data-isso-id"), {
author: $("[name=author]", el).value || null,
email: $("[name=email]", el).value || null,
website: $("[name=website]", el).value || null,
author: author, email: email, website: website,
text: utils.text($(".textarea", el).innerHTML),
parent: parent || null
parent: parent || null,
title: $("#isso-thread").getAttribute("data-title") || null,
notification: $("[name=notification]", el).checked() ? 1 : 0,
}).then(function(comment) {
$("[name=author]", el).value = "";
$("[name=email]", el).value = "";
$("[name=website]", el).value = "";
$(".textarea", el).innerHTML = "";
$(".textarea", el).blur();
insert(comment, true);
@ -144,36 +208,58 @@ define(["app/dom", "app/utils", "app/config", "app/api", "app/jade", "app/i18n",
}
);
// update vote counter, but hide if votes sum to 0
var votes = function(value) {
var span = $("span.votes", footer);
if (span === null && value !== 0) {
footer.prepend($.new("span.votes", value));
} else {
if (value === 0) {
span.remove();
if (config.vote) {
var voteLevels = config['vote-levels'];
if (typeof voteLevels === 'string') {
// Eg. -5,5,15
voteLevels = voteLevels.split(',');
}
// update vote counter
var votes = function (value) {
var span = $("span.votes", footer);
if (span === null) {
footer.prepend($.new("span.votes", value));
} else {
span.textContent = value;
}
}
};
if (value) {
el.classList.remove('isso-no-votes');
} else {
el.classList.add('isso-no-votes');
}
if (voteLevels) {
var before = true;
for (var index = 0; index <= voteLevels.length; index++) {
if (before && (index >= voteLevels.length || value < voteLevels[index])) {
el.classList.add('isso-vote-level-' + index);
before = false;
} else {
el.classList.remove('isso-vote-level-' + index);
}
}
}
};
$("a.upvote", footer).on("click", function() {
api.like(comment.id).then(function(rv) {
votes(rv.likes - rv.dislikes);
$("a.upvote", footer).on("click", function () {
api.like(comment.id).then(function (rv) {
votes(rv.likes - rv.dislikes);
});
});
});
$("a.downvote", footer).on("click", function() {
api.dislike(comment.id).then(function(rv) {
votes(rv.likes - rv.dislikes);
$("a.downvote", footer).on("click", function () {
api.dislike(comment.id).then(function (rv) {
votes(rv.likes - rv.dislikes);
});
});
});
votes(comment.likes - comment.dislikes);
}
$("a.edit", footer).toggle("click",
function(toggler) {
var edit = $("a.edit", footer);
var avatar = $(".avatar", el, false)[0];
var avatar = config["avatar"] || config["gravatar"] ? $(".avatar", el, false)[0] : null;
edit.textContent = i18n.translate("comment-save");
edit.insertAfter($.new("a.cancel", i18n.translate("comment-cancel"))).on("click", function() {
@ -201,7 +287,7 @@ define(["app/dom", "app/utils", "app/config", "app/api", "app/jade", "app/i18n",
},
function(toggler) {
var textarea = $(".textarea", text);
var avatar = $(".avatar", el, false)[0];
var avatar = config["avatar"] || config["gravatar"] ? $(".avatar", el, false)[0] : null;
if (! toggler.canceled && textarea !== null) {
if (utils.text(textarea.innerHTML).length < 3) {

@ -7,6 +7,9 @@ define(["libjs-jade-runtime", "app/utils", "jade!app/text/postbox", "jade!app/te
var load = function(name, js) {
templates[name] = (function(jade) {
var fn;
if (js.compiled) {
return js(jade);
}
eval("fn = " + js);
return fn;
})(runtime);

@ -3,6 +3,7 @@ define(["app/dom", "app/i18n"], function($, i18n) {
"use strict";
return function(el) {
el = $.htmlify(el);
el.setAttribute("contentEditable", true);
el.on("focus", function() {
@ -21,5 +22,4 @@ define(["app/dom", "app/i18n"], function($, i18n) {
return el;
};
});
});

@ -47,7 +47,7 @@ define(["app/lib/promise", "app/config"], function(Q, config) {
}
Q.when(key, function(key) {
var hash = pad((parseInt(key, 16) % Math.pow(2, 18)).toString(2), 18),
var hash = pad((parseInt(key.substr(-16), 16) % Math.pow(2, 18)).toString(2), 18),
index = 0;
svg.setAttribute("data-hash", key);

@ -1,4 +1,7 @@
div(class='isso-comment' id='isso-#{comment.id}')
if conf.gravatar
div(class='avatar')
img(src='#{comment.gravatar_image}')
if conf.avatar
div(class='avatar')
svg(data-hash='#{comment.hash}')
@ -10,7 +13,7 @@ div(class='isso-comment' id='isso-#{comment.id}')
else
span(class='author')
= bool(comment.author) ? comment.author : i18n('comment-anonymous')
span(class="spacer")
span(class="spacer") &bull;
a(class='permalink' href='#isso-#{comment.id}')
time(title='#{humanize(comment.created)}' datetime='#{datetime(comment.created)}')
span(class='note')
@ -23,13 +26,12 @@ div(class='isso-comment' id='isso-#{comment.id}')
!= comment.text
div(class='isso-comment-footer')
if comment.likes - comment.dislikes != 0
span(class='votes') #{comment.likes - comment.dislikes}
a(class='upvote' href='#')
i!= svg['arrow-up']
span(class='spacer') |
a(class='downvote' href='#')
i!= svg['arrow-down']
if conf.vote
a(class='upvote' href='#')
!= svg['arrow-up']
span(class='spacer') |
a(class='downvote' href='#')
!= svg['arrow-down']
a(class='reply' href='#') #{i18n('comment-reply')}
a(class='edit' href='#') #{i18n('comment-edit')}
a(class='delete' href='#') #{i18n('comment-delete')}

@ -3,12 +3,29 @@ div(class='isso-postbox')
div(class='textarea-wrapper')
div(class='textarea placeholder' contenteditable='true')
= i18n('postbox-text')
div(class='preview')
div(class='isso-comment')
div(class='text-wrapper')
div(class='text')
section(class='auth-section')
p(class='input-wrapper')
input(type='text' name='author' placeholder=i18n('postbox-author'))
input(type='text' name='author' placeholder=i18n('postbox-author')
value=author !== null ? '#{author}' : '')
p(class='input-wrapper')
input(type='email' name='email' placeholder=i18n('postbox-email'))
input(type='email' name='email' placeholder=i18n('postbox-email')
value=email != null ? '#{email}' : '')
p(class='input-wrapper')
input(type='text' name='website' placeholder=i18n('postbox-website'))
input(type='text' name='website' placeholder=i18n('postbox-website')
value=website != null ? '#{website}' : '')
p(class='post-action')
input(type='submit' value=i18n('postbox-submit'))
p(class='post-action')
input(type='button' name='preview'
value=i18n('postbox-preview'))
p(class='post-action')
input(type='button' name='edit'
value=i18n('postbox-edit'))
section(class='notification-section')
label
input(type='checkbox' name='notification')
= i18n('postbox-notification')

@ -20,8 +20,8 @@ define(["app/i18n"], function(i18n) {
secs = 0;
}
var mins = Math.ceil(secs / 60), hours = Math.ceil(mins / 60),
days = Math.ceil(hours / 24);
var mins = Math.floor(secs / 60), hours = Math.floor(mins / 60),
days = Math.floor(hours / 24);
return secs <= 45 && i18n.translate("date-now") ||
secs <= 90 && i18n.pluralize("date-minute", 1) ||
@ -31,11 +31,11 @@ define(["app/i18n"], function(i18n) {
hours <= 36 && i18n.pluralize("date-day", 1) ||
days <= 5 && i18n.pluralize("date-day", days) ||
days <= 8 && i18n.pluralize("date-week", 1) ||
days <= 21 && i18n.pluralize("date-week", Math.ceil(days / 7)) ||
days <= 21 && i18n.pluralize("date-week", Math.floor(days / 7)) ||
days <= 45 && i18n.pluralize("date-month", 1) ||
days <= 345 && i18n.pluralize("date-month", Math.ceil(days / 30)) ||
days <= 345 && i18n.pluralize("date-month", Math.floor(days / 30)) ||
days <= 547 && i18n.pluralize("date-year", 1) ||
i18n.pluralize("date-year", Math.ceil(days / 365.25));
i18n.pluralize("date-year", Math.floor(days / 365.25));
};
var HTMLEntity = {
@ -68,11 +68,34 @@ define(["app/i18n"], function(i18n) {
.replace(/\n/gi, '<br>');
};
// Safari private browsing mode supports localStorage, but throws QUOTA_EXCEEDED_ERR
var localStorageImpl;
try {
localStorage.setItem("x", "y");
localStorage.removeItem("x");
localStorageImpl = localStorage;
} catch (ex) {
localStorageImpl = (function(storage) {
return {
setItem: function(key, val) {
storage[key] = val;
},
getItem: function(key) {
return typeof(storage[key]) !== 'undefined' ? storage[key] : null;
},
removeItem: function(key) {
delete storage[key];
}
};
})({});
}
return {
cookie: cookie,
pad: pad,
ago: ago,
text: text,
detext: detext
detext: detext,
localStorageImpl: localStorageImpl
};
});

@ -1,6 +1,6 @@
var requirejs = {
paths: {
"text": "components/requirejs-text/text",
"text": "components/text/text",
"jade": "lib/requirejs-jade/jade",
"libjs-jade": "components/jade/jade",
"libjs-jade-runtime": "components/jade/runtime"

@ -12,10 +12,16 @@ require(["app/lib/ready", "app/config", "app/i18n", "app/api", "app/isso", "app/
jade.set("pluralize", i18n.pluralize);
jade.set("svg", svg);
domready(function() {
var isso_thread;
var heading;
function init() {
isso_thread = $('#isso-thread');
heading = $.new("h4");
if (config["css"]) {
if (config["css"] && $("style#isso-style") === null) {
var style = $.new("style");
style.id = "isso-style";
style.type = "text/css";
style.textContent = css.inline;
$("head").append(style);
@ -23,20 +29,35 @@ require(["app/lib/ready", "app/config", "app/i18n", "app/api", "app/isso", "app/
count();
if ($("#isso-thread") === null) {
if (isso_thread === null) {
return console.log("abort, #isso-thread is missing");
}
$("#isso-thread").append($.new('h4'));
$("#isso-thread").append(new isso.Postbox(null));
$("#isso-thread").append('<div id="isso-root"></div>');
if (config["feed"]) {
var feedLink = $.new('a', i18n.translate('atom-feed'));
var feedLinkWrapper = $.new('span.isso-feedlink');
feedLink.href = api.feed(isso_thread.getAttribute("data-isso-id"));
feedLinkWrapper.appendChild(feedLink);
isso_thread.append(feedLinkWrapper);
}
isso_thread.append(heading);
isso_thread.append(new isso.Postbox(null));
isso_thread.append('<div id="isso-root"></div>');
}
function fetchComments() {
if ($('#isso-root').length == 0) {
return;
}
api.fetch($("#isso-thread").getAttribute("data-isso-id"),
$('#isso-root').textContent = '';
api.fetch(isso_thread.getAttribute("data-isso-id") || location.pathname,
config["max-comments-top"],
config["max-comments-nested"]).then(
function(rv) {
function (rv) {
if (rv.total_replies === 0) {
$("#isso-thread > h4").textContent = i18n.translate("no-comments");
heading.textContent = i18n.translate("no-comments");
return;
}
@ -44,18 +65,19 @@ require(["app/lib/ready", "app/config", "app/i18n", "app/api", "app/isso", "app/
var count = rv.total_replies;
rv.replies.forEach(function(comment) {
isso.insert(comment, false);
if(comment.created > lastcreated) {
if (comment.created > lastcreated) {
lastcreated = comment.created;
}
count = count + comment.total_replies;
});
$("#isso-thread > h4").textContent = i18n.pluralize("num-comments", count);
heading.textContent = i18n.pluralize("num-comments", count);
if(rv.hidden_replies > 0) {
if (rv.hidden_replies > 0) {
isso.insert_loader(rv, lastcreated);
}
if (window.location.hash.length > 0) {
if (window.location.hash.length > 0 &&
window.location.hash.match("^#isso-[0-9]+$")) {
$(window.location.hash).scrollIntoView();
}
},
@ -63,5 +85,16 @@ require(["app/lib/ready", "app/config", "app/i18n", "app/api", "app/isso", "app/
console.log(err);
}
);
}
domready(function() {
init();
fetchComments();
});
window.Isso = {
init: init,
fetchComments: fetchComments
};
});

@ -49,8 +49,12 @@ define(function() {
write: function(plugin, name, write) {
if (builds.hasOwnProperty(name)) {
write("define('" + plugin + "!" + name +"', function () {" +
" var fn = " + builds[name] + ";" +
" return fn;" +
" var wfn = function (jade) {" +
" var fn = " + builds[name] + ";" +
" return fn;" +
" };" +
"wfn.compiled = true;" +
"return wfn;" +
"});\n");
}
}

@ -2,11 +2,13 @@
from __future__ import division, print_function, unicode_literals
import sys
import os
import functools
import io
import re
import json
import logging
import os
import re
import sys
import textwrap
from time import mktime, strptime, time
@ -29,6 +31,7 @@ from xml.etree import ElementTree
logger = logging.getLogger("isso")
def strip(val):
if isinstance(val, string_types):
return val.strip()
@ -53,7 +56,7 @@ class Progress(object):
if time() - self.last > 0.2:
sys.stdout.write("\r{0}".format(" " * cols))
sys.stdout.write("\r[{0:.0%}] {1}".format(i/self.end, message))
sys.stdout.write("\r[{0:.0%}] {1}".format(i / self.end, message))
sys.stdout.flush()
self.last = time()
@ -67,12 +70,13 @@ class Disqus(object):
ns = '{http://disqus.com}'
internals = '{http://disqus.com/disqus-internals}'
def __init__(self, db, xmlfile):
def __init__(self, db, xmlfile, empty_id=False):
self.threads = set([])
self.comments = set([])
self.db = db
self.xmlfile = xmlfile
self.empty_id = empty_id
def insert(self, thread, posts):
@ -80,7 +84,8 @@ class Disqus(object):
remap = dict()
if path not in self.db.threads:
self.db.threads.new(path, thread.find(Disqus.ns + 'title').text.strip())
self.db.threads.new(path, thread.find(
Disqus.ns + 'title').text.strip())
for item in sorted(posts, key=lambda k: k['created']):
@ -97,29 +102,33 @@ class Disqus(object):
res = defaultdict(list)
for post in tree.findall(Disqus.ns + 'post'):
email = post.find('{0}author/{0}email'.format(Disqus.ns))
ip = post.find(Disqus.ns + 'ipAddress')
item = {
'dsq:id': post.attrib.get(Disqus.internals + 'id'),
'text': post.find(Disqus.ns + 'message').text,
'author': post.find('{0}author/{0}name'.format(Disqus.ns)).text,
'email': post.find('{0}author/{0}email'.format(Disqus.ns)).text,
'email': email.text if email is not None else '',
'created': mktime(strptime(
post.find(Disqus.ns + 'createdAt').text, '%Y-%m-%dT%H:%M:%SZ')),
'remote_addr': anonymize(post.find(Disqus.ns + 'ipAddress').text),
'remote_addr': anonymize(ip.text if ip is not None else '0.0.0.0'),
'mode': 1 if post.find(Disqus.ns + "isDeleted").text == "false" else 4
}
if post.find(Disqus.ns + 'parent') is not None:
item['dsq:parent'] = post.find(Disqus.ns + 'parent').attrib.get(Disqus.internals + 'id')
item['dsq:parent'] = post.find(
Disqus.ns + 'parent').attrib.get(Disqus.internals + 'id')
res[post.find('%sthread' % Disqus.ns).attrib.get(Disqus.internals + 'id')].append(item)
res[post.find('%sthread' % Disqus.ns).attrib.get(
Disqus.internals + 'id')].append(item)
progress = Progress(len(tree.findall(Disqus.ns + 'thread')))
for i, thread in enumerate(tree.findall(Disqus.ns + 'thread')):
progress.update(i, thread.find(Disqus.ns + 'id').text)
# skip (possibly?) duplicate, but empty thread elements
if thread.find(Disqus.ns + 'id').text is None:
if thread.find(Disqus.ns + 'id').text is None and not self.empty_id:
continue
id = thread.attrib.get(Disqus.internals + 'id')
@ -133,17 +142,21 @@ class Disqus(object):
progress.finish("{0} threads, {1} comments".format(
len(self.threads), len(self.comments)))
orphans = set(map(lambda e: e.attrib.get(Disqus.internals + "id"), tree.findall(Disqus.ns + "post"))) - self.comments
if orphans:
orphans = set(map(lambda e: e.attrib.get(Disqus.internals + "id"),
tree.findall(Disqus.ns + "post"))) - self.comments
if orphans and not self.threads:
print("Isso couldn't import any thread, try again with --empty-id")
elif orphans:
print("Found %i orphans:" % len(orphans))
for post in tree.findall(Disqus.ns + "post"):
if post.attrib.get(Disqus.internals + "id") not in orphans:
continue
email = post.find("{0}author/{0}email".format(Disqus.ns))
print(" * {0} by {1} <{2}>".format(
post.attrib.get(Disqus.internals + "id"),
post.find("{0}author/{0}name".format(Disqus.ns)).text,
post.find("{0}author/{0}email".format(Disqus.ns)).text))
email.text if email is not None else ""))
print(textwrap.fill(post.find(Disqus.ns + "message").text,
initial_indent=" ", subsequent_indent=" "))
print("")
@ -158,7 +171,7 @@ class WordPress(object):
self.xmlfile = xmlfile
self.count = 0
for line in io.open(xmlfile):
for line in io.open(xmlfile, encoding="utf-8"):
m = WordPress.detect(line)
if m:
self.ns = WordPress.ns.replace("1.0", m.group(1))
@ -238,7 +251,81 @@ class WordPress(object):
@classmethod
def detect(cls, peek):
return re.compile("http://wordpress.org/export/(1\.\d)/").search(peek)
return re.compile("http://wordpress.org/export/(1\\.\\d)/").search(peek)
class Generic(object):
"""A generic importer.
The source format is a json with the following format:
A list of threads, each item being a dict with the following data:
- id: a text representing the unique thread id
- title: the title of the thread
- comments: the list of comments
Each item in that list of comments is a dict with the following data:
- id: an integer with the unique id of the comment inside the thread (it can be repeated
among different threads); this will be used to order the comment inside the thread
- author: the author's name
- email: the author's email
- website: the author's website
- remote_addr: the author's IP
- created: a timestamp, in the format "%Y-%m-%d %H:%M:%S"
"""
def __init__(self, db, json_file):
self.db = db
self.json_file = json_file
self.count = 0
def insert(self, thread):
"""Process a thread and insert its comments in the DB."""
thread_id = thread['id']
title = thread['title']
self.db.threads.new(thread_id, title)
comments = list(map(self._build_comment, thread['comments']))
comments.sort(key=lambda comment: comment['id'])
self.count += len(comments)
for comment in comments:
self.db.comments.add(thread_id, comment)
def migrate(self):
"""Process the input file and fill the DB."""
with io.open(self.json_file, 'rt', encoding='utf8') as fh:
threads = json.load(fh)
progress = Progress(len(threads))
for i, thread in enumerate(threads):
progress.update(i, str(i))
self.insert(thread)
progress.finish("{0} threads, {1} comments".format(len(threads), self.count))
def _build_comment(self, raw_comment):
return {
"text": raw_comment['text'],
"author": raw_comment['author'],
"email": raw_comment['email'],
"website": raw_comment['website'],
"created": mktime(strptime(raw_comment['created'], "%Y-%m-%d %H:%M:%S")),
"mode": 1,
"id": int(raw_comment['id']),
"parent": None,
"remote_addr": raw_comment["remote_addr"],
}
@classmethod
def detect(cls, peek):
"""Return if peek looks like the beginning of a JSON file.
Note that we can not check the JSON properly as we only receive here
the original file truncated.
"""
return peek.startswith("[{")
def autodetect(peek):
@ -250,23 +337,31 @@ def autodetect(peek):
if m:
return WordPress
if Generic.detect(peek):
return Generic
return None
def dispatch(type, db, dump):
if db.execute("SELECT * FROM comments").fetchone():
if input("Isso DB is not empty! Continue? [y/N]: ") not in ("y", "Y"):
raise SystemExit("Abort.")
def dispatch(type, db, dump, empty_id=False):
if db.execute("SELECT * FROM comments").fetchone():
if input("Isso DB is not empty! Continue? [y/N]: ") not in ("y", "Y"):
raise SystemExit("Abort.")
if type == "disqus":
cls = Disqus
elif type == "wordpress":
cls = WordPress
else:
with io.open(dump) as fp:
cls = autodetect(fp.read(io.DEFAULT_BUFFER_SIZE))
if type == "disqus":
cls = Disqus
elif type == "wordpress":
cls = WordPress
elif type == "generic":
cls = Generic
else:
with io.open(dump, encoding="utf-8") as fp:
cls = autodetect(fp.read(io.DEFAULT_BUFFER_SIZE))
if cls is None:
raise SystemExit("Unknown format, abort.")
if cls is None:
raise SystemExit("Unknown format, abort.")
if cls is Disqus:
cls = functools.partial(cls, empty_id=empty_id)
cls(db, dump).migrate()
cls(db, dump).migrate()

@ -9,6 +9,6 @@ from isso import dist, config
application = make_app(
config.load(
os.path.join(dist.location, "share", "isso.conf"),
os.path.join(dist.location, dist.project_name, "defaults.ini"),
os.environ.get('ISSO_SETTINGS')),
multiprocessing=True)

@ -0,0 +1,153 @@
<html>
<head>
<title>Isso admin</title>
<link type="text/css" href="{{isso_host_script}}/css/isso.css" rel="stylesheet">
<link type="text/css" href="{{isso_host_script}}/css/admin.css" rel="stylesheet">
<script type="text/javascript" src="{{isso_host_script}}/js/admin.js"></script>
</head>
<body>
<div class="wrapper">
<div class="header">
<header>
<img class="logo" src="{{isso_host_script}}/img/isso.svg" alt="Wynaut by @veekun"/>
<div class="title">
<a href="./">
<h1>Isso</h1>
<h2>Administration</h2>
</a>
</div>
</header>
</div>
<div class="outer">
<div class="filters">
<div class="mode">
<a href="?mode=1&page={{page}}&order_by={{order_by}}">
<span class="label label-valid {% if mode == 1 %}active{% endif %}">
Valid ({{counts.get(1, 0)}})
</span>
</a>
<a href="?mode=2&page={{page}}&order_by={{order_by}}">
<span class="label label-pending {% if mode == 2 %}active{% endif %}">
Pending ({{counts.get(2, 0)}})
</span>
</a>
<a href="?mode=4&page={{page}}&order_by={{order_by}}">
<span class="label label-staled {% if mode == 4 %}active{% endif %}">
Staled ({{counts.get(4, 0)}})
</span>
</a>
</div>
<div class="group">
Group by thread: <input type="checkbox" {% if order_by == "tid" %}checked{% endif %} onClick="javascript:window.location='?mode={{mode}}&page={{page}}&order_by={% if order_by == "tid" %}id{% else %}tid{% endif %}';" />
</div>
<div class="pagination">
Pages:
{% if page > 0 %}
<a href="?mode={{mode}}&page={{page - 1}}">
«
</a>
{% endif %}
<input type="text" size="1" name="page" value="{{page}}" />
{% if page < max_page %}
<a href="?mode={{mode}}&page={{page + 1}}">
»
</a>
{% endif %}
/ {{ max_page }}
</div>
</div>
<div class="filters order">
Order:
{% for order in ['id', 'created', 'modified', 'likes', 'dislikes'] %}
<a href="?mode={{mode}}&page={{page}}&order_by={{order}}&asc={{1 - asc}}">
<span class="label label-valid {% if order == order_by %}active{% endif %}">
{{ order }}
{% if order == order_by %}
{% if asc %} ↑ {% else %} ↓ {% endif %}
{% else %}
{% endif %}
</span>
</a>
{% endfor %}
</div>
</div>
<div id="isso-root">
{% set thread_id = "no_id" %}
{% for comment in comments %}
{% if order_by == "tid" %}
{% if thread_id != comment.tid %}
{% set thread_id = comment.tid %}
<h2 class="thread-title">{{comment.title}} (<a href="{{comment.uri}}">{{comment.uri}}</a>)</h2>
{% endif %}
{% endif %}
<div class='isso-comment' id='isso-{{comment.id}}'>
{% if conf.avatar %}
<div class='avatar'>
svg(data-hash='#{{comment.hash}}')
</div>
{% endif %}
<div class='text-wrapper'>
<div class='isso-comment-header' role='meta'>
{% if order_by != "tid" %}
<div>Thread: {{comment.title}} (<a href="{{comment.uri}}">{{comment.uri}}</a>)</div><br />
{% endif %}
{% if comment.author %}
<span class='author' id="isso-author-{{comment.id}}">{{comment.author}}</span>
{% else %}
<span class='author' id="isso-author-{{comment.id}}">Anonymous</span>
{% endif %}
{% if comment.email %}
(<span id="isso-email-{{comment.id}}">{{comment.email}}</span> <a href="mailto:{{comment.email}}" rel='nofollow' class='email'>mailto</a>)
{% else %}
<span id="isso-email-{{comment.id}}"></span>
{% endif %}
{% if comment.website %}
(<span id="isso-website-{{comment.id}}">{{comment.website}}</span> <a href="{{comment.website}}" rel='nofollow' class='website'>open</a>)
{% else %}
<span id="isso-website-{{comment.id}}"></span>
{% endif %}
<span class="spacer"> &bull;</span>
<time>{{comment.created | datetimeformat}}</time>
<span class='note'>
{% if comment.mode == 1 %}
<span class="label label-valid">Valid</span>
{% elif comment.mode == 2 %}
<span class="label label-pending">Pending</span>
{% elif comment.mode == 4 %}
<span class="label label-staled">Staled</span>
{% endif %}
</span>
</div>
<div class='text'>
{% if comment.mode == 4 %}
<strong>HIDDEN</strong>. Original text: <br />
{% endif %}
<div id="isso-text-{{comment.id}}">{{comment.text}}</div>
</div>
<div class='isso-comment-footer'>
{% if conf.votes and comment.likes - comment.dislikes != 0 %}
<span class='votes'>{{comment.likes - comment.dislikes}}</span>
{% endif %}
<span class='spacer'></span>
<a id="edit-btn-{{comment.id}}" class="edit" onClick="javascript:start_edit({{comment.id}})">Edit</a>
<a id="stop-edit-btn-{{comment.id}}" class="hidden edit" onClick="javascript:stop_edit({{comment.id}})">Cancel</a>
<a id="send-edit-btn-{{comment.id}}" class="hidden edit" onClick="javascript:send_edit({{comment.id}}, '{{comment.hash}}','{{isso_host_script}}')">Send</a>
{% if comment.mode != 4 %}
<a class="delete"
onClick="javascript:delete_com({{comment.id}}, '{{comment.hash}}', '{{isso_host_script}}')">
Delete
</a>
{% endif %}
{% if comment.mode == 2 %}
<a class='validate'
onClick="javascript:validate_com({{comment.id}}, '{{comment.hash}}', '{{isso_host_script}}')">Validate</a>
{% endif %}
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</body>
</html>

@ -0,0 +1,28 @@
<html>
<head>
<title>Isso admin</title>
<link type="text/css" href="{{isso_host_script}}/css/isso.css" rel="stylesheet">
<link type="text/css" href="{{isso_host_script}}/css/admin.css" rel="stylesheet">
</head>
<body>
<div class="wrapper">
<div class="header">
<header>
<img class="logo" src="{{isso_host_script}}/img/isso.svg" alt="Wynaut by @veekun"/>
<div class="title">
<a href="./">
<h1>Isso</h1>
<h2>Administration</h2>
</a>
</div>
</header>
</div>
<main>
<div id="disabled">
Administration is disabled on this instance of isso. Set enabled=true
in the admin section of your isso configuration to enable it.
</div>
</main>
</div>
</body>
</html>

@ -0,0 +1,30 @@
<html>
<head>
<title>Isso admin</title>
<link type="text/css" href="{{isso_host_script}}/css/isso.css" rel="stylesheet">
<link type="text/css" href="{{isso_host_script}}/css/admin.css" rel="stylesheet">
</head>
<body>
<div class="wrapper">
<div class="header">
<header>
<img class="logo" src="{{isso_host_script}}/img/isso.svg" alt="Wynaut by @veekun"/>
<div class="title">
<a href="./">
<h1>Isso</h1>
<h2>Administration</h2>
</a>
</div>
</header>
</div>
<main>
<div id="login">
Administration secured by password:
<form method="POST" action="{{isso_host_script}}/login">
<input type="password" name="password" autofocus />
</form>
</div>
</main>
</div>
</body>
</html>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save