mirror of https://github.com/Calamitous/iris.git
Fix up README.rb
This commit is contained in:
parent
9f9e4149d2
commit
0c02850243
180
README.md
180
README.md
|
@ -7,44 +7,148 @@ At its core, Iris is simply a single, executable Ruby script. It has been teste
|
||||||
|
|
||||||
Copy or symlink `iris.rb` somewhere the whole server can use it; `/usr/local/bin` is a good candidate:
|
Copy or symlink `iris.rb` somewhere the whole server can use it; `/usr/local/bin` is a good candidate:
|
||||||
|
|
||||||
`chmod 555 ./iris.rb`
|
|
||||||
`mv ./iris.rb /usr/local/bin/iris`
|
|
||||||
|
|
||||||
As a convenience to users, you may also want to set up a world-read/writeable directory for message files:
|
|
||||||
|
|
||||||
```
|
```
|
||||||
mkdir /var/iris
|
chmod 755 ./iris.rb
|
||||||
chmod 666 /var/iris
|
mv ./iris.rb /usr/local/bin/iris
|
||||||
```
|
```
|
||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
|
|
||||||
Iris has a readline interface that can be used to navigate the message corpus. It can also be used directly with parameters from the command line.
|
Iris has a readline interface that can be used to navigate the message corpus.
|
||||||
|
|
||||||
#### Command Line Example
|
|
||||||
```
|
|
||||||
%> iris --version
|
|
||||||
Iris version 1.0
|
|
||||||
|
|
||||||
%> iris --unread-count
|
|
||||||
There are 14 unread messages.
|
|
||||||
You have 2 unread replies.
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Readline Interface Example
|
#### Readline Interface Example
|
||||||
```
|
```
|
||||||
%> iris
|
%> iris
|
||||||
Welcome to Iris v. 1.0.0. Type "help" for a list of commands.
|
Welcome to Iris v. 1.0.0. Type "help" for a list of commands.
|
||||||
jimmy_foo@ctrl-c.club> list
|
jimmy_foo@ctrl-c.club> topics
|
||||||
|
|
||||||
|
| 1 | 2018-01-24T05:49:53Z | jimmy_foo@ctrl-c.club | Welcome!
|
||||||
|
| 2 | 2018-01-24T16:13:05Z | jerry_berry@ctrl-c.club | Suggestions for improv...
|
||||||
|
|
||||||
|
jimmy_foo@ctrl-c.club>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Commands
|
||||||
|
|
||||||
|
#### [t]opics
|
||||||
|
`topics, t - List all topics`
|
||||||
|
|
||||||
|
This outputs a list of top-level topics that have been composed by everyone on the server.
|
||||||
|
|
||||||
|
```
|
||||||
|
jimmy_foo@ctrl-c.club> topics
|
||||||
|
|
||||||
|
| 1 | 2018-01-24T05:49:53Z | jimmy_foo@ctrl-c.club | Welcome!
|
||||||
|
| 2 | 2018-01-24T16:13:05Z | jerry_berry@ctrl-c.club | Suggestions for improv...
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
1. The first column is the topic index. This is the reference number to use when displaying or replying to a topic.
|
||||||
|
1. The second column is the timestamp. This is the server-local time when the topic was composed.
|
||||||
|
1. The third column is the author. This is the user who composed the topic.
|
||||||
|
1. The fourth column is the title. This is the truncated first line of the topic.
|
||||||
|
|
||||||
|
#### Display topic
|
||||||
|
`# (topic id) - Read specified topic`
|
||||||
|
|
||||||
|
Type in the index of the topic you wish to read. This will display the topic and all its replies.
|
||||||
|
```
|
||||||
|
jimmy_foo@ctrl-c.club> topics
|
||||||
|
|
||||||
|
| 1 | 2018-01-24T05:49:53Z | jimmy_foo@ctrl-c.club | Welcome!
|
||||||
|
| 2 | 2018-01-24T16:13:05Z | jerry_berry@ctrl-c.club | Suggestions for improv...
|
||||||
|
|
||||||
|
jimmy_foo@ctrl-c.club> 1
|
||||||
|
*** On 2018-01-24T05:49:53Z, jimmy_foo@ctrl-c.club posted...
|
||||||
|
---------------------------------------------------------------------------------
|
||||||
|
Welcome!
|
||||||
|
It's good to see everyone here!
|
||||||
|
---------------------------------------------------------------------------------
|
||||||
|
=== On 2018-01-30T22:50:38Z, jerry_berry@ctrl-c.club replied...
|
||||||
|
---------------------------------------------------------------------------------
|
||||||
|
Thanks!
|
||||||
|
---------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
#### [c]ompose
|
||||||
|
`compose, c - Add a new topic`
|
||||||
|
|
||||||
|
This allows you to add a new top-level topic to the board. The first line of your new topic will be used as the topic title.
|
||||||
|
|
||||||
|
The line editor is quite basic. Enter your message, line-by-line, and type a single period on a line by itself to end the message.
|
||||||
|
|
||||||
|
If you post an empty message, the system will discard it.
|
||||||
|
|
||||||
|
```
|
||||||
|
jimmy_foo@ctrl-c.club~> compose
|
||||||
|
Writing a new topic. Type a period on a line by itself to end message.
|
||||||
|
|
||||||
|
new~> How do I spoo the fleem?
|
||||||
|
new~> It's not in the docs and my boss is asking. Any help is appreciated!
|
||||||
|
new~> .
|
||||||
|
Topic saved!
|
||||||
|
|
||||||
|
|
||||||
|
jimmy_foo@ctrl-c.club~> topics
|
||||||
|
|
||||||
|
| 1 | 2018-01-24T05:49:53Z | jimmy_foo@ctrl-c.club | Welcome!
|
||||||
|
| 2 | 2018-01-24T16:13:05Z | jerry_berry@ctrl-c.club | Suggestions for improv...
|
||||||
|
| 3 | 2018-01-23T00:13:44Z | jimmy_foo@ctrl-c.club | How do I spoo the fleem?
|
||||||
|
```
|
||||||
|
|
||||||
|
#### [r]eply
|
||||||
|
`reply #, r # - Reply to a specific topic`
|
||||||
|
|
||||||
|
Replies are responses to a specific topic -- they only appear when displaying the topic.
|
||||||
|
|
||||||
|
The line editor is quite basic. Enter your message, line-by-line, and type a single period on a line by itself to end the message.
|
||||||
|
|
||||||
|
If you post an empty message, the system will discard it.
|
||||||
|
|
||||||
|
```
|
||||||
|
jennie_minnie@ctrl-c.club~> reply 3
|
||||||
|
Writing a reply to topic 'How do I spoo the fleem?'. Type a period on a line by itself to end message.
|
||||||
|
|
||||||
|
reply~> Simple, you just boondoggle the flibbertigibbet. That should be in the manual.
|
||||||
|
reply~> .
|
||||||
|
Reply saved!
|
||||||
|
|
||||||
|
jennie_minnie@ctrl-c.club~> 3
|
||||||
|
|
||||||
|
*** On 2018-01-23T00:13:44Z, jimmy_foo@ctrl-c.club posted...
|
||||||
|
---------------------------------------------------------------------------------
|
||||||
|
How do I spoo the fleem?
|
||||||
|
It's not in the docs and my boss is asking. Any help is appreciated!
|
||||||
|
---------------------------------------------------------------------------------
|
||||||
|
=== On 2018-01-31T05:59:27Z, jennie_minnie@ctrl-c.club replied...
|
||||||
|
---------------------------------------------------------------------------------
|
||||||
|
Simple, you just boondoggle the flibbertigibbet. That should be in the manual.
|
||||||
|
---------------------------------------------------------------------------------
|
||||||
|
```
|
||||||
|
|
||||||
|
#### [f]reshen
|
||||||
|
`freshen, f - Reload to get any new messages`
|
||||||
|
|
||||||
|
This command reloads all users' message files to get any new messages that might have come in since you started the program.
|
||||||
|
|
||||||
|
#### reset OR clear
|
||||||
|
`reset, clear - Fix screen in case of text corruption`
|
||||||
|
|
||||||
|
This clears the screen and resets the cursor. If you experience screen corruption due to wide characters or terminal resizing, this may fix your visual issues.
|
||||||
|
|
||||||
|
#### [h]elp
|
||||||
|
`help, h, ? - Display this text`
|
||||||
|
|
||||||
|
This displays helpful reminders of the commands that Iris supports.
|
||||||
|
|
||||||
### Serverless? How does _that_ work?
|
### Serverless? How does _that_ work?
|
||||||
|
|
||||||
|
`<IN PROGRESS>`
|
||||||
|
|
||||||
### Conventions
|
### Conventions
|
||||||
|
|
||||||
Iris leans heavily on convention. While many parts are configurable, it's best to stick as close to convention as possible-- this will ease administration, minimize security risks, and limit odd issues.
|
Iris leans heavily on convention. Iris' security and message authentication is provided by filesystem permissions and message hashing. Details can be found in #Technical Bits
|
||||||
|
|
||||||
Iris' security and message authentication is provided by filesystem permissions and message hashing. Details can be found in #Technical Bits
|
|
||||||
|
|
||||||
|
|
||||||
#### Message Files
|
#### Message Files
|
||||||
|
@ -65,35 +169,9 @@ In order to operate correctly and safely, this file _must_ be:
|
||||||
-rw-r--r-- 1 jimmy_foo jimmy_foo /home/jimmy_foo/.iris.messages
|
-rw-r--r-- 1 jimmy_foo jimmy_foo /home/jimmy_foo/.iris.messages
|
||||||
```
|
```
|
||||||
|
|
||||||
Alternatively, if you do not want to provide read access to a file in your home directory and your system administrator has set up a common directory, you can use that instead. The same requirements apply:
|
|
||||||
|
|
||||||
```
|
|
||||||
%> ls -la /var/iris/jimmy_foo/.iris.messages
|
|
||||||
-rw-r--r-- 1 jimmy_foo jimmy_foo /var/iris/jimmy_foo/.iris.messages
|
|
||||||
```
|
|
||||||
|
|
||||||
#### User Configuration
|
|
||||||
|
|
||||||
User configuration is stored in the user's home directory, named `iris.config`. Although carefully considered permissions are recommended, nothing is required except that it be readable by the user.
|
|
||||||
|
|
||||||
`/home/jimmy_foo/.iris.config`
|
|
||||||
|
|
||||||
#### Read Messages
|
|
||||||
|
|
||||||
The Read Messages keeps track of what messages the user has seen/read. It is storedf in the user's home directory and named `iris.readlog`.
|
|
||||||
|
|
||||||
`/home/jimmy_foo/.iris.readlog`
|
|
||||||
|
|
||||||
The readlog must be owner read/writeable.
|
|
||||||
|
|
||||||
```
|
|
||||||
%> ls -la ~/.iris.readlog
|
|
||||||
-rw------- 1 jimmy_foo jimmy_foo /home/jimmy_foo/.iris.readlog
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Activity Log
|
|
||||||
|
|
||||||
### Technical Bits
|
### Technical Bits
|
||||||
|
|
||||||
### License
|
`<IN PROGRESS>`
|
||||||
|
|
||||||
|
### License
|
||||||
|
GPLv2
|
||||||
|
|
6
iris.rb
6
iris.rb
|
@ -1,8 +1,6 @@
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
|
|
||||||
# MVP:
|
# MVP: Complete!
|
||||||
# -----
|
|
||||||
# TODO: Finish up README.md
|
|
||||||
#
|
#
|
||||||
# Reading/Status:
|
# Reading/Status:
|
||||||
# TODO: Add "read" list
|
# TODO: Add "read" list
|
||||||
|
@ -26,6 +24,8 @@
|
||||||
# TODO: Pagination?
|
# TODO: Pagination?
|
||||||
# TODO: Make nicer topic display
|
# TODO: Make nicer topic display
|
||||||
# TODO: Add optional title for topics
|
# TODO: Add optional title for topics
|
||||||
|
# TODO: Add version, filenames, etc. to helptext
|
||||||
|
# TODO: Add line marker for topics to show if they have replies
|
||||||
#
|
#
|
||||||
# Features:
|
# Features:
|
||||||
# TODO: Add read-only mode if user doesn't want/can't have message file
|
# TODO: Add read-only mode if user doesn't want/can't have message file
|
||||||
|
|
Loading…
Reference in New Issue