isso/README.md

97 lines
2.9 KiB
Markdown
Raw Normal View History

2012-10-17 20:44:35 +00:00
Isso Ich schrei sonst
=======================
You love static blog generators (especially [Acrylamid][1] *cough*) and the
only option to interact with the community is [Disqus][2]. There's nothing
wrong with it, but if you care about the privacy of your audience you are
better off with a comment system that is under your control. This is, were
Isso comes into play.
2012-10-17 20:44:35 +00:00
[1]: https://github.com/posativ/acrylamid
[2]: http://disqus.com/
2012-10-17 20:44:35 +00:00
Features
--------
2012-10-17 20:44:35 +00:00
* [CRUD][https://en.wikipedia.org/wiki/Create,_read,_update_and_delete] comments
* SQLite
* quite nice, but unfinished client-side JS
2012-10-17 20:44:35 +00:00
2012-12-16 13:00:40 +00:00
Roadmap
-------
2012-12-16 12:55:18 +00:00
- Ping/TrackBack™ support
- simple admin interface
- spam filtering using [http:bl][3]
2012-12-16 12:55:18 +00:00
[3]: https://www.projecthoneypot.org/
2012-10-25 14:20:16 +00:00
2012-12-16 13:00:40 +00:00
2012-12-16 12:55:18 +00:00
Installation
------------
2012-10-17 20:44:35 +00:00
Probably `git clone https://github.com/posativ/isso.git`, `python setup.py develop`
inside a virtualenv. Then start `isso` with
~> isso run
You can now leave a comment at <http://localhost:8080/static/post.html> hopefully.
The admin interface password is `p@$$w0rd`, you may change this with a custom cfg
file that I'll document later. You find the admin interface at <http://localhost:8080/admin/>.
2012-10-17 20:44:35 +00:00
2012-12-16 12:55:18 +00:00
Migration from Disqus
---------------------
Go to [Disqus.com](https://disqus.com/) and export your "forum" as XML.
~> isso import /path/to/ur/dump.xml
That's it. <del>Visit your admin page to see all threads.</del> If it doesn't work for
2012-12-16 13:00:40 +00:00
you, please file in a bug report \*including\* your dump.
API (a draft)
-------------
2012-10-17 20:44:35 +00:00
To fetch all comments for `http://example.tld/foo-bar/`, run
::
2012-10-17 20:44:35 +00:00
$ curl http://example.tld/isso?uri=%2Ffoo-bar%2F
2012-10-17 20:44:35 +00:00
2012-12-16 13:00:40 +00:00
To write a comment, you have to POST a JSON dictionary with the following
key-value pairs. Text is mandatory otherwise you'll get a 400 Bad Request.
You'll also get a 400 when your JSON is invalid.
2012-10-17 20:44:35 +00:00
2012-10-23 19:09:51 +00:00
Let's say you want to comment on /foo-bar/
$ curl http://example.tld/isso/new?uri=%2Ffoo-bar%2F -X POST -d \
2012-10-17 20:44:35 +00:00
'{
"text": "Lorem ipsum ...",
"name": "Hans", "email": "foo@bla.org", "website": "http://blog/log/"
}'
2012-10-17 20:44:35 +00:00
2012-12-16 13:00:40 +00:00
This will set a cookie, that expires in a few minutes (15 minutes per default).
This cookie allows you do modify or delete your comment. Don't try to modify
that cookie, it is cryptographically signed. If your cookie is outdated or
modified, you'll get a 403 Forbidden.
2012-10-17 20:44:35 +00:00
2012-12-16 13:00:40 +00:00
For each comment you'll post, you get an unique cookie. Let's try to remove
your comment::
2012-10-17 20:44:35 +00:00
$ curl -X DELETE 'http://example.tld/isso?uri=%2Ffoo-bar%2F&id=1'
2012-10-17 20:44:35 +00:00
2012-12-16 13:00:40 +00:00
If your comment has been referenced by another comment, your comment will be
cleared but not deleted to retain depending comments.
2012-10-17 20:44:35 +00:00
2012-12-16 12:55:18 +00:00
Alternatives
------------
2012-10-17 20:44:35 +00:00
- `talkatv <https://github.com/talkatv/talkatv>`_ Python
- `Juvia <https://github.com/phusion/juvia)>`_ Ruby on Rails
- `Tildehash.com <http://www.tildehash.com/?article=why-im-reinventing-disqus>`_ PHP
- `SO: Unobtrusive, self-hosted comments <http://stackoverflow.com/q/2053217>`_