[perl] Kareha resources (21)

1 Name: #!/usr/bin/anonymous : 2014-05-02 18:55 ID:IpwbeqOT This thread was merged from the former /code/ board. You can view the archive here.

We like Kareha here. What have you noticed in kareha? Have you made any hacks or otherwise made use of it?

I saw that Storlek used Kareha as a base for his blog in the past. This seems sane to me, and not all too hard to do. When you think about it, Kareha is (in essence) a community blog.

Entering "fusianasan" in the name field or "2ch-sep93" in config.pl's date field do two quite obvious things.

pseud0ch.css, interestingly enough, does not support italics by default.

2 Name: meltingwax!bUNUJnjNcg : 2014-05-03 05:41 ID:XTaTycJ8

Over at sageru.org I use a hacked verson of Kareha that removes dates and makes the rules section user-editable [1]. It also scrambles the thread identifiers (which are normally the thread creation time) so the age of threads cannot be inferred.

It also has a couple custom CSS stylesheets, mainly 7chan, Overchan, and MWN. Feel free to take the first two for your site, if interested.

[1] http://sageru.org/rules

3 Name: #!/usr/bin/anonymous : 2014-05-18 21:40 ID:Heaven

>>2
is the code for that rule changer thing available anywhere?

also, it seems i've found a bug:

> Traceback (most recent call last):
>  File "index.cgi", line 21, in <module>
>   main()
>  File "index.cgi", line 15, in main
>   do_get()
>  File "/home/meltingwax/sageru.org/rules/handlers.py", line 60, in do_get
>   """ % raw
> UnicodeEncodeError: 'ascii' codec can't encode character u'\ufffe' in position 869: ordinal not in range(128)

4 Name: #!/usr/bin/anonymous : 2014-05-18 22:00 ID:Heaven

>>3
i should probably explain how to reproduce that bug...

  1. go to http://sageru.org/rules/ in your browser.
  2. change the page encoding to utf-8 in your browser
  3. paste a unicode character with a value higher than 127 into the textarea
  4. submit the form
  5. go to http://sageru.org/rules/ again.

5 Name: meltingwax!bUNUJnjNcg : 2014-05-28 02:30 ID:XTaTycJ8

>>4
Thanks for reporting that bug. Even when you don't change the page encoding, it doesn't support unicode.

If you want the code to the rules, it's at this link:
http://meltingwax.net/stuph/rules.tar.gz

To install:

  1. Untar that so you have a folder called $KAREHA_ROOT/rules/.
  2. Then, in $KAREHA_ROOT/include/rules.html, put this where you want the rules to appear:
<div id="rules-to-be-loaded" />
<script type="text/javascript">
$.getJSON('/rules/store.json', function(data) {
$('#rules-to-be-loaded').html(data.message);
});
</script>

6 Name: #!/usr/bin/anonymous : 2014-08-15 07:10 ID:NKiVyO92

Kareha with PSGI/Plack support: https://github.com/marlencrabapple/kareha-psgi

Surprised it took this long for someone to do this. Its at least 10x faster than vanilla Kareha when run with starman behind nginx.

7 Name: #!/usr/bin/anonymous : 2014-08-18 23:19 ID:Heaven

>>6
So instead of ~2 seconds of cpu time per year, your board uses ~0.2 seconds of cpu time per year?

8 Name: #!/usr/bin/anonymous : 2014-08-20 23:13 ID:mrBSe2Wz

>>7
Its bi-annual on some sites. It might even be monthly here.

9 Name: #!/usr/bin/anonymous : 2014-12-04 08:04 ID:iMAkilQG

>>2
Seriously though, why did you remove the dates? What purpose did that serve?

10 Post deleted.

11 Name: #!/usr/bin/anonymous : 2014-12-07 07:19 ID:7NrtL/+s

>>9
all posts on sageru.org are timeless classics.

12 Name: #!/usr/bin/anonymous : 2014-12-11 19:37 ID:hZA9235F

I'd really like to see some people get together and work on Kareha and its CSS to make it all 2015 update.

Name: Link:
Leave these fields empty (spam trap):
More options...
Verification: