Coder Social home page Coder Social logo

aditeyabaral / redirector Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 2.0 18 KB

A simple link redirecting service built using Flask

Home Page: https://goto-link.herokuapp.com

Python 95.28% Shell 0.80% Dockerfile 3.54% Procfile 0.38%
flask flask-sqlalchemy redirect-urls python3 sqlalchemy redirecting-requests

redirector's Introduction

redirector

Redirector is a simple link redirecting service. Built using Flask and SQLAlchemy, it aims to provide a way to shorten and redirect links but usually fails at the former.

How to use Redirector?

Creating redirecting links

Since I'm awful at making pretty interfaces, creation of redirection links can currently only take place using POST requests.

Use the following Python script to make a POST request and create your link.

import sys
import requests

params = {
    "source_url" = sys.argv[1],
    "alias_url" = sys.argv[2]
}

response = requests.post("https://goto-link.herokuapp.com/register", data=params)
print(str(response.content))

Execute the above script using

python3 source_url alias_url

Example, use

python3 https://github.com/ git

Accessing redirecting links

You can access an alias link using goto-link/alias_name

Why use Redirector?

  • Open Source

Yup, that's the only advantage I can think of.

Why not to use Redirector?

  • The alias links may not be always shorter because of the size of the link prefix
  • Creation of alias links is tedious (for now)

It is not as bad as it sounds though.

How to contribute to Redirector?

A pretty interface to create alias links would be a good starting point.

Why did I make a link redirecting service?

Honestly, even I do not know why this exists.

redirector's People

Contributors

aditeyabaral avatar shootgan avatar yashichawla avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

redirector's Issues

GUI

A simple, clean and easy to use GUI would be neat to host the link creation pages.

  1. The page should contain 2 text boxes, one for the source URL and the other for the alias name.
  2. After clicking on a submit button, it should display the complete URL, as well as options to copy link and open the link in a new tab
  3. Additionally, it should also be copied to clipboard

Fetch all alias links for a given source URL

Create a separate app route that fetches all the alias links that have been created for a particular source URL. This will allow users to use pre-existing links that already exist.

Dockerise the project using `docker-compose`

Dockerise the project using docker-compose. Allows the entire application to be quickly deployed and built as well. Ensure the database and everything else is setup at boot time.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.