Skip to content

Commit

Permalink
Release v0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kawasima committed Sep 3, 2015
1 parent e64cafd commit 1cd149c
Show file tree
Hide file tree
Showing 9 changed files with 1,049 additions and 1,025 deletions.
33 changes: 16 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,31 @@
# Back channeling

![Back Channeling](./resources/public/img/logo.png)
![Back channeling](./resources/public/img/logo.png)

よくあるChatにありがちなチャネルによる分類ではなく、板>スレッド型の掲示板をリアルタイム化したようなものです。
あとJVM上で動くいい感じのWebチャットがないので、車輪の再発明したい。
Back channeling is a real-time BBS tool.

## Setup
It has the features as follows:

- Setup easily
- Supports markdown format
- Supports voice chat
- Curating of comments

## Get started

Currently, we support a development mode only.

Start datomic.
Start a datomic transactor.

```
% bin/transactor config/xxx.properties
% bin/transactor config/transactor.properties
```

Start a back channeling.

```
% lein with-profile production run
% DATOMIC_URL=datomic:free://localhost:4334/bc bin/back_channeling
```

A default port is 3009.

## Features

Back channeling is a realtime bbs.

### Create a thread

### Comment to a thread
The default port is 3009.

#### Thread
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.0-beta1
0.1.0
5 changes: 3 additions & 2 deletions bin/back_channeling
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/sh
#!/bin/bash

version=$(cat `dirname $0`/../VERSION)

java -cp dist/back-channeling-${version}.jar:"lib/*" clojure.main -m back-channeling.core
exec java -cp dist/back-channeling-${version}.jar:"lib/*" clojure.main -m back-channeling.core

17 changes: 9 additions & 8 deletions bin/transactor
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
#!/bin/transactor
#!/bin/bash

transactor_version=0.9.5198
transactor_jar=datomic-transactor-free-${transactor_version}.jar
datomic_version=0.9.5206
datomic_dir=datomic-free-${datomic_version}

function get_transactor () {
curl --progress-bar --location --url "https://my.datomic.com/downloads/free/${transactor_version}" --output datomic.zip

unzip -p datomic.zip datomic-free-${transactor_version}/${transactor_jar} > ${transactor_jar}
function get_datomic () {
curl --progress-bar --location --url "https://my.datomic.com/downloads/free/${datomic_version}" --output datomic.zip
unzip -x datomic.zip
}

if []; then
if [ ! -e "datomic-free-${datomic_version}" ]; then
get_datomic
fi

exec java -server -cp ${datomic_dir}/datomic-transactor-free-${datomic_version}.jar:"${datomic_dir}/lib/*" clojure.main -m datomic.launcher ${datomic_dir}/config/samples/free-transactor-template.properties

1,995 changes: 1,000 additions & 995 deletions resources/public/js/back-channeling.min.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/assembly/dist.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
<source>bin/back_channeling.bat</source>
<outputDirectory>bin</outputDirectory>
</file>
<file>
<source>bin/transactor</source>
<outputDirectory>bin</outputDirectory>
</file>
<file>
<source>VERSION</source>
</file>
Expand Down
5 changes: 5 additions & 0 deletions src/clj/back_channeling/style.clj
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
:background {:color "#fff"}
:border {:left "1px solid #ddd"
:right "1px solid #ddd"}}]
[:.ui.tabular
[:span.tab-name {:max-width (px 150)
:text-overflow "ellipsis"
:white-space "nowrap"
:overflow "hidden"}]]
[:.curation.content {:min-height "100%"
:max-width "90%"
:margin {:left "auto" :right "auto"}
Expand Down
2 changes: 1 addition & 1 deletion src/cljs/back_channeling/components/board.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@
"#/"
(str "#/board/" (:board/name board) "/" (:id tab)))))}
(when (= target-thread (:id tab)) {:class "active"}))
[:span (:name tab)]
[:span.tab-name (:name tab)]
(when (not= (:id tab) 0)
[:span
[:i.close.icon {:on-click (fn [e]
Expand Down
11 changes: 10 additions & 1 deletion src/cljs/back_channeling/components/curation.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,13 @@

(defn generate-markdown [curating-blocks]
(->> curating-blocks
(map #(if (= (get-in % [:curating-block/format :db/ident]) :curating-block.format/markdown)
(map #(case (get-in % [:curating-block/format :db/ident])
:curating-block.format/markdown
(:curating-block/content %)

:curating-block.format/voice
(str "\n[" (get-in % [:curating-block/posted-by :user/name]) " said](" (:curating-block/content %) ")\n")

(str "```\n" (:curating-block/content %) "\n```\n")))
(clojure.string/join "\n\n")))

Expand Down Expand Up @@ -207,5 +212,9 @@
:curating-block/posted-at (js/Date.)))))}})
(case (get-in curating-block [:curating-block/format :db/ident])
:curating-block.format/markdown {:dangerouslySetInnerHTML {:__html (js/marked (:curating-block/content curating-block))}}
:curating-block.format/voice [:audio {:controls true
:src (str "/voice/" (:curating-block/content comment))}]
(:curating-block/content curating-block)))]]))
(:article/blocks editing-article))]]]]]])))


0 comments on commit 1cd149c

Please sign in to comment.