emogen

command module
v2.0.0-...-94cda86 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2022 License: GPL-3.0 Imports: 11 Imported by: 0

README

This is a link shortener that shortens links using UTF-8 emojis.

API
---
/r POST with {link: "https://example.com"} returns {link: "/🙃🐰🦊"}

/r/🙃🐰🦊 GET 301 redirects to https://example.com

Docs
----
List of UTF-8 emojis: https://www.unicode.org/emoji/charts/full-emoji-modifiers.html

There's 1431 we can use (without skin tones, those could be added
later). 1 emoji holds >10 bits of information. Concatenating 3
together contains ~32 bits of information, this should be enough for
our purposes.

Redis is used as the database because it's easy to setup and our
database needs are simple. Redis' save option is sufficient for
persistence and backups. With Redis' default configuration a maximum
of 15 minutes of data could be lost. This is acceptable because we're
just shortening links and this is a toy project.

Documentation

Overview

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL