Mini Project Report
Mini Project Report
On
Website Blocker
Website Blocker
Done by
1 INTRODUCTION ………………………………………………………………………..6
● Overview ……………………………………………………………………………..6
● Scope of the project ………………………………………………………..6
● Objectives …………………………………………………………………………...6
2 DESIGN ………………………………………………………………………………………..7
● Algorithm …………………………………………………………………………….7
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.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
● 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.