Skip to content

lodestone/overshare

Repository files navigation

Overshare

Overshare

Overshare is ALPHA software. It is fragile and needs love to grow.

Overshare is a crystal web app that works a bit like Droplr/CloudApp. You send Overshare a file or url and you get back a shortened link. This is designed to be run on your OWN server for your privacy. Overshare will also automatically convert markdown and asciidoc into html. Also, Overshare is written in Crystal, so it’s pretty fast (benchmarks soon).

Design Goals

  • Save and Shorten URLs

  • Quick one-off file sharing

  • Turn shared markdown/asciidoc into html

  • Allow viewing/downloading markdown/asciidoc source

  • Landing pages for shared files #TODO

  • Act like Github gist service and show pretty code files #TODO

About Overshare

  • NOTE: Overshare does NOT use a database. It uses the filesystem as it primarily deals with FILES.

  • NOTE: Overshare is hosted by YOU.

  • NOTE: It is up to you to purge old files. This may change.

Internal/Details

  • Your files and data will be stored in the details_dir (see config/settings.yml)

  • Files saved by POSTing to the app live in a subdirectory by short id like this:

    • details/<SHORTID>/File.ext

    • details/<SHORTID>/data.yml

  • URLs are mapped like: http://your-host/-SHORTID

  • You can make arbitrary folders in your details directory. They do NOT have to have a data.yml to be served. So if you make details/blog/2018-04-05-My-Adventure.html then you can find it at http://your-host/-blog/2018-04-05-My-Adventure.html

Setup

  • git clone https://github.com/lodestone/overshare.git

  • cd overshare

  • cp config/settings.example.yml config/settings.yml

  • shards install to install dependencies

  • crystal src/overshare.cr — server to run the server

  • KEMAL_ENV=test crystal spec to run specs

Building the Binary:

  • Build the binary crystal build --release --no-debug src/overshare.cr

  • Run the server ./overshare server

Deployment

I recommend you use a service like DigitalOcean (Referral Link) to run a small personal server.

TODO: Fill out this section.

Curl Examples:

Here are some curl examples for reference, but I recommend you use the Alfred Workflow or shell script instead.

Save a url:

curl -F "endpoint=http://news.ycombinator.com" "http://user:pass@your-host/-"
{"message":"Created","url":"http://your-host/-byczr0"}

Save a file:

curl -F "endpoint=@path/to/file.md" "http://user:pass@your-host/-"
{"message":"Created","url":"http://your-host/-ab723i"}

Resources

Alfred Workflow

Alfred Workflow for easy macOS oversharing (I set ⌥+o to share with my Overshare instance)

Shell Script

Usage: oshare [filepath||url] resources/oshare

Helping

  1. Fork it (https://github.com/lodestone/overshare/fork)

  2. Create your feature branch (git checkout -b my-new-feature)

  3. Commit your changes (git commit -am 'Add some feature')

  4. Push to the branch (git push origin my-new-feature)

  5. Create a new Pull Request

Contributors