aboutsummaryrefslogtreecommitdiffhomepage
path: root/README.org
blob: b1779f8ced33eace3e83fab85128ff9fdfbe7000 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
* ๐Ÿงต๐Ÿˆ Threadcat
  /A radically simple, low feature, message board for shared *nix systems/

Why? Because its just 4 small shell scripts and some easy-to-do
directory config. 

** Basic Idea 

 You post to threadcat using =cat= or =echo=.  Here is an example:
#+begin_src shell 

cat <<EOF | threadcat write SomeThread
   
Here is a message! 
It can be multiline!
 
EOF 
#+end_src


The above would append the follwing message to a thread called =SomeThread=

#+begin_src

colin -- Mon Aug 15 08:23:10 AM CDT 2022

Here is a message!
It can be multiline!

#+end_src

You can post a short message with =echo=:

#+begin_src shell
echo Just saying Hey | threadcat write SomeOtherThread 
#+end_src

For very long messages, you can of course use a text editor of choice
to compose it. Just save it as a file, then post it like so:

#+begin_src shell

cat my-long-post.txt | threadcat write SomeThread

#+end_src

You can the list and search for threads with

#+begin_src shell
threadcat list                     # just lists all the threads, newest first
threadcat list | grep -i emacs     # lists threads whose names mention emacs
#+end_src

And you can read a particular thread by doing:

#+begin_src shell
threadcat read SomeThread 
#+end_src

This prints to the standard output. You can pipe it to =less= or
=head= or =tail= if you want to.

#+begin_src shell

threacat read SomeThread | less         # read the whole thread 
threacat read SomeThread | tail -n 50   # read last 50 lines
threacat read SomeThread | head -n 30   # readd first 30 lines  
#+end_src

See this [[https://asciinema.org/a/dyRz4AnQWKGsZe0A96oAnUP3O][screencast]] for basic use. (Also, let me know if the video
isn't there any more, I just posted it to asciinema and have no idea
how long those videos remain.)

** Install the client 

Assuming that =~/.local/bin= is in your =PATH=, just put the threadcat scripts there:

#+begin_src shell

git clone https://cicadas.surf/cgit/colin/threadcat.git threadcat 
cd threadcat 
cp *.sh ~/.local/bin 
cp threadcat ~/.local/bin 

#+end_src

That's all!  Type =threadcat= at the command line to get started!

** Server Setup 

#+begin_src shell

ssh you@yourhost.com 
sudo su

#make a group
groupadd threadcat 

# add your users, group available on next login
usermod -a -G threadcat <user1>
usermod -a -G threadcat <user2>

# make the threadcat directory
mkdir /opt/threadcat 

#and make it and its contents writable by threadcat group
chown root:threadcat /opt/threadcat
chmod g+rwxs /opt/threadcat

#+end_src

Thats it!