0% found this document useful (0 votes)
16 views

Mini Project Report

This document describes a mini project that aims to create a website blocker application. It discusses designing the application to allow users to input websites to block and a timer value. When the timer ends, motivational images and quotes will be displayed to encourage the user before websites become unblocked again. The project uses Python with Tkinter, Pillow, time and typing libraries and follows a process of implementing website blocking, timer functionality, and motivational displays in phases.

Uploaded by

Karan GM
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Mini Project Report

This document describes a mini project that aims to create a website blocker application. It discusses designing the application to allow users to input websites to block and a timer value. When the timer ends, motivational images and quotes will be displayed to encourage the user before websites become unblocked again. The project uses Python with Tkinter, Pillow, time and typing libraries and follows a process of implementing website blocking, timer functionality, and motivational displays in phases.

Uploaded by

Karan GM
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Mini Project Report

On

Website Blocker

Karan Gopal Muralidharan(20218048)

In partial fulfilment of the requirements for the award of degree of


Bachelor of Technology in Computer Science and Engineering.

Division of Computer Science and Engineering School of Engineering


Cochin University of Science and Technology August 2021
CERTIFICATE

Certified that this is a bonafide record of Mini Project titled

Website Blocker

Done by

Karan Gopal Muralidharan(20218048)

of VI Semester, Computer Science and Engineering in the year


2021 in partial fulfilment requirements for the award of degree of
Bachelor of Technology in Computer Science and Engineering of
Cochin University of Science and Technology.

Dr.David Peter Mr Rajin Rayaroth Ms Minu Poulose


Head of Division Project Coordinator Project Guide
ACKNOWLEDGEMENT

I take this opportunity to thank the Almighty, the source of all


knowledge whose blessings are our guiding light in any venture
we take up. I am short of words to express our gratitude to Ms.
Minu Paulose and Mr Rajin Rayaroth, our project guide who
guided us and helped us constantly with her inputs and
suggestions, without which we could not have implemented this
project the way it works today.

Karan Gopal Muralidharan


DECLARATION

I,Karan Gopal Muraleedharan hereby declare that this mini


project is the record of authentic work carried out by me during
the academic year 2020 - 2021 and has not been submitted to any
other University or Institute towards the award of any degree.
CONTENTS

1 INTRODUCTION ………………………………………………………………………..6
● Overview ……………………………………………………………………………..6
● Scope of the project ………………………………………………………..6
● Objectives …………………………………………………………………………...6

2 DESIGN ………………………………………………………………………………………..7
● Algorithm …………………………………………………………………………….7

3 FLOW CHART …………………………………………………………………………….9

4 DESIGN METHODOLOGY …………………………………………………………. 10


● Process models ………………………………………………………………… 10
● Development Environments ………………………………………...10

5 IMPLEMENTATION …………………………………………………………………..13

6 RESULTS ……………………………………………………………………………………...14

7 CODE …………………………………………………………………………………………….15

8 OUTPUT ……………………………………………………………………………………….19
INTRODUCTION

1.1 Overview:
This project’s idea was inspired when I was studying one day and
after a while I got bored and ended up spending time on
Youtube. The concept of this project is to create an application
that allows the user to work without any distractions and
maximise productivity. This is achieved by blocking websites and
folders , setting a timer and by showing motivational images and
quotes to lift the user back up when he/she is feeling burnt out.

1.2 Scope of the project


Each Year the number of students keeps increasing by at least a
million (source: Oxford research paper on student dynamics).
With such an exponential growth , coupled with the increasing
popularity of optimizing productivity. This project has the scope
of helping millions of people achieve their goals and create the
lives that they want.

1.3 Objectives
The objective of this project is to help users block websites of
their choice for a desired period of time , so that they can focus
on getting their work done. My goal is to create a highly
productive work environment for the user.To make sure the user
can get the most amount of work done in the least amount of
time , by minimising distractions and also increasing the drive to
get work done.
DESIGN

2.1 ALGORITHM

2.1.1 MAIN

1.START
2.READ input timer value from user
3.READ the website lists that has to be blocked
4.Call blocker()
5.STOP

2.1.2 BLOCKER

1.START
2.get website list from entry widget
3.open host file in read+ mode
4.check if all the websites in the input list are in the file
5.if they are not in the file write the new files into the host along
with ip address(different).
6.Call timer()

2.1.3 TIMER

1.START
2.if seconds less than 1.
3.set
seconds=60,minutes=minutes-1,minutes_total=minutes_total-1
4.if minutes<1
5.check if hours>0
6.hours=hours-1
7.minutes=60
8.if minutes_total>0
9.Call timer() after 1 second
10.else call reset()
11.STOP

2.1.4 RESET

1.START
2.set seconds,minutes,hours to hero
3.Call Unblock()
4.STOP

2.1.5 UNBLOCK

1.START
2.open hosts file in read+ mode
3.read each line from the hosts file and store in a variable(line)
4.if the website is not present in the line , then write the line into
the file and truncate.
5.truncate that line
6.STOP
3 FLOWCHART
4 DESIGN METHODOLOGY

4.1 PROCESS MODELS

We will divide the project into several phases according to the


new features we plan. Each phase can be implemented
separately.

● Phase 1
Implement a method to block desired websites. This phase is
about developing a method to block websites.

● Phase 2
Implementing a timer This phase is about implementing a timer
to set the time period in which the websites are blocked and the
access paths are blocked.

● Phase 3
Implementing a method that presents motivational quotes and
images. This phase is about creating a system that presents a
slideshow of motivational images and quotes. Ideally these
images should be customizable.

4.2 DEVELOPMENT ENVIRONMENT

Language used : Python

Tools : tkinter , pillow ,time, typing


Tkinter : Tkinter is a Python binding to the Tk GUI toolkit. It is the
standard Python interface to the Tk GUI toolkit, and is Python's
de facto standard GUI. Tkinter is included with standard Linux,
Microsoft Windows and Mac OS X installs of Python.
The name Tkinter comes from Tk interface. Tkinter was written by
Fredrik Lundh. Tkinter is free software released under a Python
license.

Pillow: The Python Imaging Library adds image processing


capabilities to your Python interpreter. This library provides
extensive file format support, an efficient internal representation,
and fairly powerful image processing capabilities. The core image
library is designed for fast access to data stored in a few basic pixel
formats. It should provide a solid foundation for a general image
processing tool.

Typing: This module provides runtime support for type hints as


specified by PEP 484, PEP 526, PEP 544, PEP 586, PEP 589 and
PEP 591. The most fundamental support consists of the types Any,
Union, Tuple, Callable, TypeVar, and Generic. For full specification
please see PEP 484. For a simplified introduction to type hints see
PEP 483.

Time: This module provides various time-related functions. For


related functionality, see also the datetime and calendar modules.

Although this module is always available, not all functions are


available on all platforms.Most of the functions defined in this
module call platform C library functions with the same name.It
may sometimes be helpful to consult the platform
documentation, because the semantics of these functions varies
among platforms.
5 IMPLEMENTATION

● This program is written in VS Code.


● This program is converted from py to exe using
‘auto-py-to-exe’
● Libraries to be imported are tkinter, time, pillow, typing.
RESULTS

This project is able to provide the user with an application to block


websites of his choice for the desired amount of time and help
him focus so that he can be more productive.
CODE
OUTPUT

You might also like