mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
Version bump
Former-commit-id: adc295b095c0b963911c3d0fe63c8a933f34eb29 [formerly 5cc558bafca350ee0870aa796733fa6668add6d3] [formerly 95debc30dbbc8e8b0fec10747964d510d3b3448c [formerly 2ce675e894305b541297ab637c8186bceb2b1396 [formerlyf2bc22e8d8
]]] Former-commit-id: a2c396414437d207a7b547d7e15761dd2723d63f [formerly cce67f77ec106ab31fc100c3aadd7db0a64b8063] Former-commit-id: 1b2f1389b2ff3e63b934966d1f67bc5ef0689f47 Former-commit-id:d5f3ae1b5f
This commit is contained in:
parent
629a2a026a
commit
6b5a4d0061
5
Makefile
5
Makefile
@ -3,7 +3,7 @@ SOURCES := $(shell find $(SOURCEDIR) -name '*.go')
|
|||||||
|
|
||||||
BINARY=cowyo
|
BINARY=cowyo
|
||||||
|
|
||||||
VERSION=1.1
|
VERSION=1.1.0
|
||||||
BUILD_TIME=`date +%FT%T%z`
|
BUILD_TIME=`date +%FT%T%z`
|
||||||
BUILD=`git rev-parse HEAD`
|
BUILD=`git rev-parse HEAD`
|
||||||
|
|
||||||
@ -19,6 +19,7 @@ $(BINARY): $(SOURCES)
|
|||||||
go get github.com/microcosm-cc/bluemonday
|
go get github.com/microcosm-cc/bluemonday
|
||||||
go get github.com/russross/blackfriday
|
go get github.com/russross/blackfriday
|
||||||
go get github.com/sergi/go-diff/diffmatchpatch
|
go get github.com/sergi/go-diff/diffmatchpatch
|
||||||
|
go get github.com/jcelliott/lumber
|
||||||
go build ${LDFLAGS} -o ${BINARY} ${SOURCES}
|
go build ${LDFLAGS} -o ${BINARY} ${SOURCES}
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
@ -34,7 +35,7 @@ binaries:
|
|||||||
env GOOS=linux GOARCH=amd64 go build ${LDFLAGS} -o ${BINARY} ${SOURCES}
|
env GOOS=linux GOARCH=amd64 go build ${LDFLAGS} -o ${BINARY} ${SOURCES}
|
||||||
zip -9 -r cowyo-linux-64bit.zip cowyo static/* templates/*
|
zip -9 -r cowyo-linux-64bit.zip cowyo static/* templates/*
|
||||||
rm -f cowyo
|
rm -f cowyo
|
||||||
env GOOS=windows GOARCH=amd64 go build ${LDFLAGS} -o ${BINARY} ${SOURCES}
|
env GOOS=windows GOARCH=amd64 go build ${LDFLAGS} -o ${BINARY}.exe ${SOURCES}
|
||||||
zip -9 -r cowyo-windows-64bit.zip cowyo.exe static/* templates/*
|
zip -9 -r cowyo-windows-64bit.zip cowyo.exe static/* templates/*
|
||||||
rm -f cowyo.exe
|
rm -f cowyo.exe
|
||||||
env GOOS=linux GOARCH=arm go build ${LDFLAGS} -o ${BINARY} ${SOURCES}
|
env GOOS=linux GOARCH=arm go build ${LDFLAGS} -o ${BINARY} ${SOURCES}
|
||||||
|
40
README.md
40
README.md
@ -2,12 +2,13 @@
|
|||||||
|
|
||||||
# [cowyo.com](http://cowyo.com/)
|
# [cowyo.com](http://cowyo.com/)
|
||||||
|
|
||||||
[![Version 1.0](https://img.shields.io/badge/version-1.0-brightgreen.svg)]() [![Go Report Card](https://goreportcard.com/badge/github.com/schollz/cowyo)](https://goreportcard.com/report/github.com/schollz/cowyo) [![Join the chat at https://gitter.im/schollz/cowyo](https://badges.gitter.im/schollz/cowyo.svg)](https://gitter.im/schollz/cowyo?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
[![Version 1.1.0](https://img.shields.io/badge/version-1.1.0-brightgreen.svg)]() [![Go Report Card](https://goreportcard.com/badge/github.com/schollz/cowyo)](https://goreportcard.com/report/github.com/schollz/cowyo) [![Join the chat at https://gitter.im/schollz/cowyo](https://badges.gitter.im/schollz/cowyo.svg)](https://gitter.im/schollz/cowyo?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||||
|
|
||||||
This is a self-contained notepad 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, syntax highlighting, command line support, content-delivery, and listifying. Read on to learn more about the features.
|
This is a self-contained notepad 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, syntax highlighting, command line support, content-delivery, and listifying. Read on to learn more about the features.
|
||||||
|
|
||||||
# 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://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 `[[AnythingYouWant]]`.
|
|
||||||
|
**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 `[[AnythingYouWant]]`.
|
||||||
|
|
||||||
![Simply type to edit.](https://raw.githubusercontent.com/schollz/cowyo/master/static/img/help1.gif)
|
![Simply type to edit.](https://raw.githubusercontent.com/schollz/cowyo/master/static/img/help1.gif)
|
||||||
|
|
||||||
@ -35,7 +36,6 @@ This is a self-contained notepad webserver that makes sharing easy and _fast_. T
|
|||||||
|
|
||||||
![Mission impossible style self-destruction.](https://raw.githubusercontent.com/schollz/cowyo/master/static/img/help5.gif)
|
![Mission impossible style self-destruction.](https://raw.githubusercontent.com/schollz/cowyo/master/static/img/help5.gif)
|
||||||
|
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
**Security**. HTTPS support is provided and everything is sanitized to prevent XSS attacks. Though all URLs are publicly accessible, you are free to obfuscate your website by using an obscure/random address (read: the site is still publicly accessible, just hard to find!). In addition to TLS support, you can PGP-encrypt your messages using a passphrase (_Note: This will delete the version tree_).
|
**Security**. HTTPS support is provided and everything is sanitized to prevent XSS attacks. Though all URLs are publicly accessible, you are free to obfuscate your website by using an obscure/random address (read: the site is still publicly accessible, just hard to find!). In addition to TLS support, you can PGP-encrypt your messages using a passphrase (_Note: This will delete the version tree_).
|
||||||
@ -51,6 +51,7 @@ This is a self-contained notepad webserver that makes sharing easy and _fast_. T
|
|||||||
<br>
|
<br>
|
||||||
|
|
||||||
**CLI tools**. Want to upload/download from the command line? Its super easy. Upload/download files using `curl` with a simple command:
|
**CLI tools**. Want to upload/download from the command line? Its super easy. Upload/download files using `curl` with a simple command:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ echo "Hello, world!" > hi.txt
|
$ echo "Hello, world!" > hi.txt
|
||||||
$ curl -L --upload-file hi.txt cowyo.com
|
$ curl -L --upload-file hi.txt cowyo.com
|
||||||
@ -58,13 +59,16 @@ $ curl -L --upload-file hi.txt cowyo.com
|
|||||||
$ curl -L cowyo.com/test.txt
|
$ curl -L cowyo.com/test.txt
|
||||||
Hello, world!
|
Hello, world!
|
||||||
```
|
```
|
||||||
|
|
||||||
or just skip the file-creation step and let `cowyo` figure out a name for you:
|
or just skip the file-creation step and let `cowyo` figure out a name for you:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ echo "Wow, so easy" | curl -L --upload-file "-" cowyo.com
|
$ echo "Wow, so easy" | curl -L --upload-file "-" cowyo.com
|
||||||
File uploaded to http://cowyo.com/CautiousCommonLoon
|
File uploaded to http://cowyo.com/CautiousCommonLoon
|
||||||
$ curl -L cowyo.com/CautiousCommonLoon
|
$ curl -L cowyo.com/CautiousCommonLoon
|
||||||
Wow, so easy
|
Wow, so easy
|
||||||
```
|
```
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
**Content Delivery**. Want use a script on your own domain? Just use the extension `/raw` with optional versioning (e.g. `/raw?version=1`). `cowyo` will serve these files with a wildcard Access-Control-Allow-Origin so they will work anywhere. Check out a live example [on this JSFiddle](https://jsfiddle.net/9mm3afao/).
|
**Content Delivery**. Want use a script on your own domain? Just use the extension `/raw` with optional versioning (e.g. `/raw?version=1`). `cowyo` will serve these files with a wildcard Access-Control-Allow-Origin so they will work anywhere. Check out a live example [on this JSFiddle](https://jsfiddle.net/9mm3afao/).
|
||||||
@ -75,8 +79,6 @@ $ curl -L cowyo.com/CautiousCommonLoon
|
|||||||
|
|
||||||
**Math support**. Math is supported with [Katex](https://github.com/Khan/KaTeX) using `$\frac{1}{2}$` for inline equations and `$$\frac{1}{2}$$` for regular equations.
|
**Math support**. Math is supported with [Katex](https://github.com/Khan/KaTeX) using `$\frac{1}{2}$` for inline equations and `$$\frac{1}{2}$$` for regular equations.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Install
|
# Install
|
||||||
|
|
||||||
If you haven't done so, first [install Go](https://golang.org/doc/install).
|
If you haven't done so, first [install Go](https://golang.org/doc/install).
|
||||||
@ -96,14 +98,16 @@ Admin key: VRSgtuVpkrwtWrfphsooOYeErzdbVHHqecMcqcbkLFNFNPwakH
|
|||||||
Now open your browser to `http://SOMEADDRESS:8003` to see your cowyo! For more information type `./cowyo --help`.
|
Now open your browser to `http://SOMEADDRESS:8003` to see your cowyo! For more information type `./cowyo --help`.
|
||||||
|
|
||||||
# Contact
|
# Contact
|
||||||
If you'd like help or 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>
|
|
||||||
|
If you'd like help or you find a bug, please submit [an issue](https://github.com/schollz/cowyo/issues). Any other comments, questions or anything at all, just [tweet me @zack_118](https://twitter.com/intent/tweet?screen_name=zack_118)
|
||||||
|
|
||||||
# Acknowledgements
|
# Acknowledgements
|
||||||
|
|
||||||
Thanks to [tscholl2](https://github.com/tscholl2) and [sjsafranek](https://github.com/sjsafranek).
|
Thanks to [tscholl2](https://github.com/tscholl2) and [sjsafranek](https://github.com/sjsafranek).
|
||||||
|
|
||||||
Icons made by [Freepik](http://www.freepik.com) from [www.flaticon.com](http://www.flaticon.com), licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a>.
|
Icons made by [Freepik](http://www.freepik.com) from [www.flaticon.com](http://www.flaticon.com), licensed by [CC 3.0 BY](http://creativecommons.org/licenses/by/3.0/ "Creative Commons BY 3.0").
|
||||||
|
|
||||||
File uploading from [transfer.sh](https://github.com/dutchcoders/transfer.sh/blob/98399c91dd86682077cf9542badbf1658fd9a8c1/transfersh-server/handlers.go#L293-L369), licensed by <a href="https://github.com/dutchcoders/transfer.sh/blob/40c9bf7675fb84e78d9a011052b9d0900ec7dde1/LICENSE">MIT license</a>.
|
File uploading from [transfer.sh](https://github.com/dutchcoders/transfer.sh/blob/98399c91dd86682077cf9542badbf1658fd9a8c1/transfersh-server/handlers.go#L293-L369), licensed by [MIT license](https://github.com/dutchcoders/transfer.sh/blob/40c9bf7675fb84e78d9a011052b9d0900ec7dde1/LICENSE).
|
||||||
|
|
||||||
# License
|
# License
|
||||||
|
|
||||||
@ -111,20 +115,8 @@ The MIT License (MIT)
|
|||||||
|
|
||||||
Copyright (c) 2016 Zack
|
Copyright (c) 2016 Zack
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
Loading…
Reference in New Issue
Block a user