Skip to content
/ DTB Public

Desktop Bookmark is a Rails application to collect your desktop activities grouping and connecting to TODO items.

Notifications You must be signed in to change notification settings

nomlab/DTB

Repository files navigation

README

https://travis-ci.org/nomlab/DTB.svg?branch=master https://codeclimate.com/github/nomlab/DTB/badges/gpa.svg https://gemnasium.com/nomlab/DTB.svg https://coveralls.io/repos/github/nomlab/DTB/badge.svg?branch=master

What is Desktop Bookmark (DTB)?

Desktop Bookmark is a Rails application to collect your desktop activities grouping and connecting to TODO items.

Setup Ruby Environment

Ruby2.3.0
Rails4.2.6

I recommend you to install new Ruby and Bundler on the top of Rbenv before install DTB.

  1. Install rbenv + ruby-build (check https://github.com/sstephenson/rbenv#basic-github-checkout for details)
    $ git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
    $ git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
    # Edit your shell dot files to add some path and environment variables.
        
  2. Install Ruby and Bundler
    # Install ruby 2.3.0
    $ rbenv install 2.3.0
    
    # Installation check
    $ rbenv global 2.3.0
    $ ruby -v # -> You will see: ruby 2.3.0...
    
    # Install bundler for your new Ruby
    $ gem install bundler
    
    # Activate bundler
    $ rbenv rehash
    
    # Get back to your system default Ruby if you want
    $ rbenv global system # say, /usr/bin/ruby
    $ ruby -v
        

Install DTB

Clone DTB

  1. clone DTB from github
    $ git clone git@github.com:nomlab/DTB.git ~/Programs/DTB
        
  2. Setup to use installed ruby
    $ cd ~/Programs/DTB
    $ ruby -v # -> You will see: ruby 2.3.0...
        

Setup config files

You can setup site-local config files interactively by invoking bin/install.sh:

$ bin/install.sh

Or, you can edit config files by hand:

  1. Install vendor/bundle stuffs
    $ bundle install --path vendor/bundle
        
  2. Setup secret key
    $ bundle exec rake secret # -> You will see: foobarbuz... Copy the string.
    $ cp config/secrets.yml.template config/secrets.yml
    $ vim config/secrets.yml # -> Replace all <SECRETKEY> with the string outputted
        
  3. Setup Toggl account if you have
    $ cp config/application_settings.yml.template config/application_settings.yml
    $ vim config/application_settings.yml # -> Input your toggl token
        
  4. Setup DB
    $ bundle exec rake db:migrate
    $ bundle exec rake db:migrate RAILS_ENV=production
        
  5. Initialize DB
    $ bundle exec rake db:seed_fu
    $ bundle exec rake db:seed_fu RAILS_ENV=production
        
  6. Install submodule
    $ git submodule init
    $ git submodule update
        

Install clients recording history

For Emacs Users

  1. Install emacs-file-reference-recorder

For Firefox Users

  1. Install TimeRecorder

Launch DTB

Launch DTB Rails app

development

You can launch server by invoking bin/server.sh:

# start
$ bin/server.sh start dev

# stop
$ bin/server.sh stop

Or, you can take these procedures by hand:

# start
$ export RAILS_ENV="development"
$ export RAILS_SERVE_STATIC_FILES=true
$ bundle exec rails server -p 3000 -d -e "$RAILS_ENV"
$ open http://localhost:3000

# stop
$ kill $(cat tmp/pids/server.pid)

production

You can launch server by invoking bin/server.sh:

# start
$ bin/server.sh start pro

# stop
$ bin/server.sh stop

Or, you can take these procedures by hand:

# start
$ export RAILS_ENV="production"
$ export RAILS_SERVE_STATIC_FILES=true
$ bundle exec rails server -p 3000 -d -e "$RAILS_ENV"
$ bundle exec rake assets:precompile RAILS_ENV="$RAILS_ENV"
$ bundle exec rake assets:precompile:image
$ open http://localhost:3000

# stop
$ kill $(cat tmp/pids/server.pid)

Launch sub processes

DTB gathers file-access records by Dtrace system-call on your Mac. It requires super-user privilege.

development

$ bundle exec rails runner lib/file_history_scripts/create_file_histories -e development

production

$ bundle exec rails runner lib/file_history_scripts/create_file_histories -e production

About

Desktop Bookmark is a Rails application to collect your desktop activities grouping and connecting to TODO items.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •