~stormdragon2976/link-storm

8c4e5880 — Storm Dragon 9 months ago
Expanded the number of days links are stored from 7 to 30.
cff2aef8 — Storm Dragon 1 year, 4 months ago
Handle sndup links.
848bceba — Storm Dragon 1 year, 4 months ago
Fixed error message display.

refs

master
browse  log 

clone

read-only
https://git.2mb.codes/~stormdragon2976/link-storm
read/write
git@git.2mb.codes:~stormdragon2976/link-storm

You can also use your local clone with git send-email.

A quick and easy way to share links with your friends.

Have you ever wanted to share a link with several people, but they are not all readily available? If all of you are chatting together in IRC, it's easy. If, however, you are not all in the same place or text environment, you are stuck firing up an email with lots of CC, or posting on social media. What if, however, you only want to share with a select group of people, or not all your friends are on the same social media platform? This is the problem that Link Storm neatly solves.

#Requirements

The requirements are few. You only need:

  • A modern version of bash
  • wget
  • sox (optional for sound alerts)

#Simple Installation

If Link Storm is not in your distribution, or if you just want to install it for the current user. You can install it very easily with just two commands. Remember that you probably want to install it in your path so you can just type link-storm, not just ./link-storm, but it is completely up to you. To install into the current directory, run the following two commands:

wget -O link-storm.sh https://gitlab.com/stormdragon2976/link-storm/raw/master/link-storm.sh
chmod 755 link-storm

#Usage

Link Storm has a client, linkstorm.sh which retrieves shared links from the server. It has when the link was posted, who posted it, and a brief description, taken from the page title, if available. When you first run Link Storm it will create the configuration directory and link-storm.conf file. Usually the configuration directory can be found at:

~/.config/link-storm/

Follow the instructions in the configuration file to configure Link Storm the way you want it. Servers need only include the path to the directory where the server is stored. So, it would look something like this:

[Example Server]="https://example.com"

Because some people were finding the config file a bit daunting, a new option was added. To add a server with a guided interface, use the -S or --add-server flag.

Once configured, you can run::

link-storm -u

The above command will retrieve links from your configured server. Then, run Link Storm with no arguments to browse through the links. You can simply press enter on the link you want and it will open in the appropriate application, usually.

To add your own link, do link-storm -a address, as in the following:

link-storm -a https://gitlab.com/stormdragon2976/link-storm

You will see a message that your link is being shared. At that point, when your friends update, they will receive the link and can view it at their leisure.

Speaking of updates, wouldn't it be nice if they could be automated? Sure it would, and they can. To turn on updates with a system that has systemd, simply do the following command:

linkstorm -A

Link Storm will check for updates every 30 minutes and notify you of changes with a small chime. Of course, you may want to disable this feature at some point, and that is what the -N flag is for:

link-storm -N

If you have trouble remembering the above commands, simply use the -h flag for help. Link Storm will display a brief usage message.

For those of you running without systemd, a cron job should do quite nicely. To be nice to the person hosting the server, maybe keep updates to a maximum of every 30 minutes with the following command:

*/30 * * * * /path/to/link-storm

The server is designed to be extremely easy to use. There is no creating and configuring databases, and most likely no mucking about in the php.ini file. All you need is:

  • A working web engine, e.g. nginx or caddy.
  • php

Simply drop the link-storm-server.php file in your web accessible directory of choice, and that's it. The first time it is accessed, the php file will create the links.txt file. Make sure you don't have a file called links.txt in the same directory as link-storm-server.php.

Oh, there is one more step, be sure to share your server address with your friends and have them install the link-storm client. There is no maintenance required, the server will remove links that are more than 30 days old, so your links.txt file won't eventually contain thousands of links that everyone has seen before.

Have fun, and thanks for sharing.