URL Shortener using Python Tkinter #pythoncode09

 URL Shortener using Python Tkinter

PythonCode9
   
    URL Shortener is the service which shorts the URL in to a small length. In Python there is inbuilt module pyshorteners which has many shortener domain also some domain required API key and userid so we need to register to their domain form there official website.

    In the GUI i haved used domain like tinyurl, cuttly, bitly, clckru, chilpit, and dagd. From these domain only cuttly and bitly required the api key. which can be get easily from registering with the website.

    The main feature in the gui is that it supports the dark and light theme. In GUI there is copy button which copy's the generated link in the OS clipboard for this i have used clipboard which only have 2 function copy and paste. Although some exceptions will be occured so i have used the requests module which handles the connection to the internet.

    The gui is very easy to handle and use. In code there is a class url which is the main class of the code.
Class URL has some function :
    1. gui - which has the main widget of the tkinter.
    2. generate - This function is called when user clicks on the convert button to short the link.
    3. copy_to_clipboard - this function is called when user clicks on the copy button to copy the generated link to the clipboard.
    4. clear - this function clears all the text in the input field as the reset function.
    5. theme - it changes the button when click on the dark and light theme.
    6. dark - these function is used in the theme function to dark the theme in whole of the gui.
    7. light - same description as above 6.

I have attached the code file and Output video of the code.
In the code file read the README.txt before running the code, otherwise it will be give the exception as try again.


Code :
Download code File => Click Here


    

Comments