mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
awwkoala -> cowyo
Former-commit-id: ff7f37722f73e0271faefe1e9530ef6229ba2eb7 [formerly cd8fb0492bda08a01a82f380fd91935c764c79d9] [formerly 6661abd4af87c27912e0bf6e6f0eeca24e64e192 [formerly e15dbf6bae
]]
Former-commit-id: b647f6cf1ed446d7e0d0941f6570f78cad1c30ec [formerly f80be33aa360b3e1feb701704c7e67f6c46fc2d0]
Former-commit-id: 1b5c02d2520721d7ea70891b187a47202c534926
This commit is contained in:
parent
a37dbb59cd
commit
a931361b83
34
README.md
34
README.md
@ -7,13 +7,13 @@
|
||||
This is a self-contained wiki webserver that makes sharing easy and _fast_. The most important feature here is *simplicity*. There are many other features as well including versioning, page locking, self-destructing messages, encryption, math support, and listifying. Read on to learn more about the features.
|
||||
|
||||
# Features
|
||||
**Simplicity**. The philosophy here is to *just type*. To jot a note, simply load the page at [`/`](http://cowyo.com/) and just start typing. No need to press edit, the browser will already be focused on the text. No need to press save - it will automatically save when you stop writing. The URL at [`/`](http://cowyo.com/) will redirect to an easy-to-remember name that you can use to reload the page at anytime, anywhere. But, you can also use any URL you want, e.g. [`/AnythingYouWant`](http://AwwKoala.com/AnythingYouWant). All pages can be rendered into HTML by adding `/view`. For example, the page [`/AnythingYouWant`](http://cowyo.com/AnythingYouWant) is rendered at [`/AnythingYouWant/view`](http://cowyo.com/AnythingYouWant/view). You can write in HTML or [Markdown](https://daringfireball.net/projects/markdown/) for page rendering. To quickly link to `/view` pages, just use `[[AnythingYouWnat]]`.
|
||||
**Simplicity**. The philosophy here is to *just type*. To jot a note, simply load the page at [`/`](http://cowyo.com/) and just start typing. No need to press edit, the browser will already be focused on the text. No need to press save - it will automatically save when you stop writing. The URL at [`/`](http://cowyo.com/) will redirect to an easy-to-remember name that you can use to reload the page at anytime, anywhere. But, you can also use any URL you want, e.g. [`/AnythingYouWant`](http://cowyo.com/AnythingYouWant). All pages can be rendered into HTML by adding `/view`. For example, the page [`/AnythingYouWant`](http://cowyo.com/AnythingYouWant) is rendered at [`/AnythingYouWant/view`](http://cowyo.com/AnythingYouWant/view). You can write in HTML or [Markdown](https://daringfireball.net/projects/markdown/) for page rendering. To quickly link to `/view` pages, just use `[[AnythingYouWnat]]`.
|
||||
|
||||
![Simply type to edit.](https://raw.githubusercontent.com/schollz/cowyo/master/static/img/help1.gif)
|
||||
|
||||
<br>
|
||||
|
||||
**Listifying**. If you are writing a list and you want to tick off things really easily, just add `/list`. For example, after editing [`/grocery`](http://AwwKoala.com/grocery), goto [`/grocery/list`](http://AwwKoala.com/grocery/list). In this page, whatever you click on will be struck through and moved to the end. This is helpful if you write a grocery list and then want to easily delete things from it.
|
||||
**Listifying**. If you are writing a list and you want to tick off things really easily, just add `/list`. For example, after editing [`/grocery`](http://cowyo.com/grocery), goto [`/grocery/list`](http://cowyo.com/grocery/list). In this page, whatever you click on will be struck through and moved to the end. This is helpful if you write a grocery list and then want to easily delete things from it.
|
||||
|
||||
![Lists are easy to make.](https://raw.githubusercontent.com/schollz/cowyo/master/static/img/help2.gif)
|
||||
|
||||
@ -62,10 +62,10 @@ First [install Go](https://golang.org/doc/install). Then continue.
|
||||
Then, if you want to host on your local network just do:
|
||||
|
||||
```
|
||||
git clone https://github.com/schollz/awwkoala.git
|
||||
cd awwkoala
|
||||
git clone https://github.com/schollz/cowyo.git
|
||||
cd cowyo
|
||||
make
|
||||
./awwkoala -p :8001 LOCALIPADDRESS
|
||||
./cowyo -p :8001 LOCALIPADDRESS
|
||||
```
|
||||
|
||||
and then goto the address `http://LOCALIPADDRESS:8001/`
|
||||
@ -81,8 +81,8 @@ sudo apt-get install nginx
|
||||
There is an example `NGINX` block in `install/`. If you want to use SSL instead, follow the instructions in `letsencrypt/README.md`. To automatically install, on Raspberry Pi / Ubuntu / Debian system use:
|
||||
|
||||
```
|
||||
git clone https://github.com/schollz/awwkoala.git
|
||||
cd awwkoala
|
||||
git clone https://github.com/schollz/cowyo.git
|
||||
cd cowyo
|
||||
nano Makefile <--- EDIT this Makefile to include YOUR EXTERNAL ADDRESS
|
||||
make && sudo make install
|
||||
```
|
||||
@ -90,33 +90,33 @@ make && sudo make install
|
||||
Now the program starts and stops with
|
||||
|
||||
```
|
||||
sudo /etc/init.d/AwwKoala start|stop|restart
|
||||
sudo /etc/init.d/cowyo start|stop|restart
|
||||
```
|
||||
|
||||
Edit your crontab (`sudo crontab -e`) to start on boot:
|
||||
|
||||
```
|
||||
@reboot /etc/init.d/AwwKoala start
|
||||
@reboot /etc/init.d/cowyo start
|
||||
```
|
||||
|
||||
# Usage
|
||||
|
||||
```
|
||||
$ awwkoala --help
|
||||
awwkoala: A Websocket Wiki and Kind Of A List Application
|
||||
$ cowyo --help
|
||||
cowyo: A Websocket Wiki and Kind Of A List Application
|
||||
run this to start the server and then visit localhost at the port you specify
|
||||
(see parameters).
|
||||
Example: 'awwkoala localhost'
|
||||
Example: 'awwkoala -p :8080 localhost:8080'
|
||||
Example: 'awwkoala -db /var/lib/awwkoala/db.bolt localhost:8003'
|
||||
Example: 'awwkoala -p :8080 -crt ssl/server.crt -key ssl/server.key localhost:8080'
|
||||
Example: 'cowyo localhost'
|
||||
Example: 'cowyo -p :8080 localhost:8080'
|
||||
Example: 'cowyo -db /var/lib/cowyo/db.bolt localhost:8003'
|
||||
Example: 'cowyo -p :8080 -crt ssl/server.crt -key ssl/server.key localhost:8080'
|
||||
Options:
|
||||
-a string
|
||||
key to access admin priveleges (default no admin priveleges)
|
||||
-crt string
|
||||
location of ssl crt
|
||||
-db string
|
||||
location of database file (default "/home/mu/awwkoala/data.db")
|
||||
location of database file (default "/home/mu/cowyo/data.db")
|
||||
-httptest.serve string
|
||||
if non-empty, httptest.NewServer serves on this address and blocks
|
||||
-key string
|
||||
@ -128,7 +128,7 @@ Options:
|
||||
If you set the admin flag, `-a` you can access a list of all the current files by going to `/ls/WhateverYouSetTheFlagTo`.
|
||||
|
||||
# Contact
|
||||
If you'd like help, go ahead and clone and send a pull request. If you find a bug, please submit [an issue](https://github.com/schollz/AwwKoala/issues). Any other comments, questions or anything at all, just <a href="https://twitter.com/intent/tweet?screen_name=zack_118" class="twitter-mention-button" data-related="zack_118">tweet me @zack_118</a>
|
||||
If you'd like help, go ahead and clone and send a pull request. If you find a bug, please submit [an issue](https://github.com/schollz/cowyo/issues). Any other comments, questions or anything at all, just <a href="https://twitter.com/intent/tweet?screen_name=zack_118" class="twitter-mention-button" data-related="zack_118">tweet me @zack_118</a>
|
||||
|
||||
# Contributors
|
||||
Thanks to [tscholl2](https://github.com/tscholl2).
|
||||
|
18
main.go
18
main.go
@ -12,7 +12,7 @@ import (
|
||||
)
|
||||
|
||||
// AllowedIPs is a white/black list of
|
||||
// IP addresses allowed to access awwkoala
|
||||
// IP addresses allowed to access cowyo
|
||||
var AllowedIPs = map[string]bool{
|
||||
"192.168.1.13": true,
|
||||
"192.168.1.12": true,
|
||||
@ -44,16 +44,16 @@ func main() {
|
||||
flag.StringVar(&RuntimeArgs.AdminKey, "a", RandStringBytesMaskImprSrc(50), "key to access admin priveleges")
|
||||
flag.StringVar(&RuntimeArgs.ServerCRT, "crt", "", "location of ssl crt")
|
||||
flag.StringVar(&RuntimeArgs.ServerKey, "key", "", "location of ssl key")
|
||||
flag.StringVar(&RuntimeArgs.WikiName, "w", "AwwKoala", "custom name for wiki")
|
||||
flag.StringVar(&RuntimeArgs.WikiName, "w", "cowyo", "custom name for wiki")
|
||||
dumpDataset := flag.Bool("dump", false, "flag to dump all data to 'dump' directory")
|
||||
flag.CommandLine.Usage = func() {
|
||||
fmt.Println(`AwwKoala (version ` + VersionNum + `): A Websocket Wiki and Kind Of A List Application
|
||||
fmt.Println(`cowyo (version ` + VersionNum + `): A Websocket Wiki and Kind Of A List Application
|
||||
run this to start the server and then visit localhost at the port you specify
|
||||
(see parameters).
|
||||
Example: 'awwkoala yourserver.com'
|
||||
Example: 'awwkoala -p :8080 localhost:8080'
|
||||
Example: 'awwkoala -db /var/lib/awwkoala/db.bolt localhost:8003'
|
||||
Example: 'awwkoala -p :8080 -crt ssl/server.crt -key ssl/server.key localhost:8080'
|
||||
Example: 'cowyo yourserver.com'
|
||||
Example: 'cowyo -p :8080 localhost:8080'
|
||||
Example: 'cowyo -db /var/lib/cowyo/db.bolt localhost:8003'
|
||||
Example: 'cowyo -p :8080 -crt ssl/server.crt -key ssl/server.key localhost:8080'
|
||||
Options:`)
|
||||
flag.CommandLine.PrintDefaults()
|
||||
}
|
||||
@ -107,14 +107,14 @@ Options:`)
|
||||
if RuntimeArgs.ServerCRT != "" && RuntimeArgs.ServerKey != "" {
|
||||
RuntimeArgs.Socket = "wss"
|
||||
fmt.Println("--------------------------")
|
||||
fmt.Println("AwwKoala (version " + VersionNum + ") is up and running on https://" + RuntimeArgs.ExternalIP)
|
||||
fmt.Println("cowyo (version " + VersionNum + ") is up and running on https://" + RuntimeArgs.ExternalIP)
|
||||
fmt.Println("Admin key: " + RuntimeArgs.AdminKey)
|
||||
fmt.Println("--------------------------")
|
||||
r.RunTLS(RuntimeArgs.Port, RuntimeArgs.ServerCRT, RuntimeArgs.ServerKey)
|
||||
} else {
|
||||
RuntimeArgs.Socket = "ws"
|
||||
fmt.Println("--------------------------")
|
||||
fmt.Println("AwwKoala (version " + VersionNum + ") is up and running on http://" + RuntimeArgs.ExternalIP)
|
||||
fmt.Println("cowyo (version " + VersionNum + ") is up and running on http://" + RuntimeArgs.ExternalIP)
|
||||
fmt.Println("Admin key: " + RuntimeArgs.AdminKey)
|
||||
fmt.Println("--------------------------")
|
||||
r.Run(RuntimeArgs.Port)
|
||||
|
Loading…
Reference in New Issue
Block a user