Home > ProcrastinatorsHelp

ProcrastinatorsHelp

ProcrastinatorsHelp is a project mainly written in Ruby, it's free.

Procrastinator's Help or "Save my time" or "Help me get things done" is a tool to stop you from surfing to various time consuming websites you often visit.

ProcrastinatorsHelp

"Procrastinator's Help" or "Save my time" or "Help me get things done" is a tool to stop you from surfing to various time consuming websites you often visit. This is tool currently only runs under GNU/Linux systems or with various tweaking (maybe) also under other operating systems.

The work principle is simple, you maintain two different access lists based on your /etc/hosts file and disallow certain cites which you don't want to visit during certain hours for each day. So if you are for instance a reddit addict then this will help you to force yourself to work on more important stuff.

Requirements

o Ruby o GNU/Linux System o GNU Figlet o (optional) www-servers/mini_httpd (e.g. v1.19) or similar simple local httpd daemon

o diff o sudo o cp

Installation

o Copy the rb files in the lib/ folder to your $HOME/bin directory or where you keep your local bin files o Make sure that the local bin files are in your $PATH environment variable (to be found in your shell config file, e.g. .zshrc) o Add the "workmode" and the "playmode" aliases to your shell config file in the apropriate syntax (provided is zsh syntax) o Change the time inside the lib/checkworktimehosts.rb at line 15

  • "wts_hour" means "Work time start (hour)"
  • "wts_min" means "Work time start (min)"
  • "wte_hour" means "Work time end (hour)"
  • "wte_min" means "Work time end (min)"

    Later versions of this software will make it easier to configure (more intuitive) and also allow exceptions e.g. on certain days etc.

    o Copy the modified and customized hosts.block and hosts.original to the /etc/. folder o Make sure you have installed all dependencies o If you didn't install all local webserver you will only get a resolve error in your browser. If you want to see a nice error message install a local webserver such as "www-servers/mini_httpd-1.19" and point it to the local www page you want to display.

Usage

o Open a console. The "checkworktimehosts.rb" script due to your shell hook found in bin/ will execute and check if the time is now "work" or "play". Depending on that it will check the hosts and replace if necessary. o If you want to force override this it requires you to enter your root password and display a figlet message. You can customize this to make it more difficult or disallow alltogether if you need to get things done. o ~% worktime # switches to workmode and forces overwrite of /etc/hosts with hosts.block o ~% playtime # switches to playmode and forces overwrite of /etc/hosts with hosts.original

Result

Now you should be able to get some work done from e.g. 10AM to 8PM - d(o_o)P

Examples

See in the examples/ folder two simple hosts file examples which will redirect certain sites to localhost if queried.

------ example when switching to play time mode (force) ------

~% playmode


| _ | | |/ _ _| __ _ | | _ | | | |/ | | | | | || | / / / ` / | _/ | || | () | | | | || || | V V / (| || / |__/ _/ || |_/ || _/_/ _,_|/|

                      _____ ___ __  __ _____   _ _ _ 

| | | / | _| | | | | | | | |/ | | | | '_| | | | || |/| | | | | | | | || | () | || | | | | | || | | | | |||| _, |_/ _,|| || ||| ||| (||_) |___/
Password: /etc/hosts.original' ->/etc/hosts'

~%


------- example when swtiching to work time mode (force) ------

% workmode


/ / _ _ | | | _ __ | | V / | | | | | '/ / | | | | | | / / / _ | '_ | | | | () | || | | | | / (| | | | || | V V / (| | | | | | ||/ _,| || _|,|||_, | _/_/ _,|| ||_| |___/


| |_ _ | |_ __| | / |/ | | | | | / / |/ _ __| / __| __| | | | |_| |_ / _ |/ | ' / / / | || () | | (_| | / | _ || || | | | | (| | () | | | | _/| _/ __, |_|_| |/_|_,|| || _,_|_/|| ||_(_) |___/


| | | __ | / | | | | | | | | | | ' / '_ | | | | | | | | | | | | | | | | | | | | | / | | | | || | || | | | | | |||| || || ||_|| || |_/ / |__| || (||_)

Password: /etc/hosts.block' ->/etc/hosts'

~%


The switch from work to play or vice versa is checked everytime depending on your clock, settings and if you open a console.

Copyright

(C) 2010, Bjoern Rennhak, under a triple license

            o MIT licence. http://www.opensource.org/licenses/mit-license.php
            o GPLv2 license
            o BSD license