GithubHelp home page GithubHelp logo

glima's Introduction

Glima – Gmail CLI client.

Installation

Glima requires Ruby 2.3 or newer.

Install using gem

$ gem install glima

Install in sandbox

It uses safe navigation operator (&.) introduced in Ruby 2.3.

$ gem install bundler
$ mkdir /path/to/install/glima
$ cd /path/to/install/glima
$ bundle init
$ echo 'gem "glima"' >> Gemfile
$ bundle install --path=vendor/bundle --binstubs=exe
$ export PATH=/path/to/install/glima/exe:$PATH

Install from Docker image

$ docker pull nom4476/glima
$ curl https://raw.githubusercontent.com/yoshinari-nomura/glima/master/exe/glima-docker.sh > glima
$ chmod +x glima
$ mkdir -p ~/.config/glima ~/.cache/glima
$ ./glima help

Setup

  1. Get OAuth CLIENT_ID/CLIENT_SECRET

    Visit https://console.developers.google.com and follow the instruction. Googling ‘Creating a Google API Console project and client ID’ would help.

  2. Create app config file interactively
    $ glima init
    
    Creating ~/.config/glima/config.yml ...
    Get your CLIENT_ID/CLIENT_SECRET at https://console.developers.google.com
    Googling 'Creating a Google API Console project and client ID' would help.
    CLIENT_ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com
    CLIENT_SECRET: xxxxxxxxxxxxxxxxxxxxxxxx
    Gmail address: [email protected]
    
    Making config directory ~/.config/glima ...
          create  /Users/nom/.config/glima
    Making cache directory ~/.cache/glima ...
           exist  Ignore /Users/nom/.cache/glima
    Copying file(s) into ~/.config/glima/config.yml ...
           exist  Ignore ~/.config/glima
              ok  copy /Users/nom/.config/glima/config.yml
    done.
        
  3. Grant OAuth access to Gmail server (browser will be invoked)
    $ glima auth
    
    Authenticating [email protected]...
    Enter the resulting code: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
        

    If you want to add another account, try glima auth --user=another_account.

  4. Check your inbox
    $ glima scan +inbox
    
    1 09/27 14:22 15ec1c9bd2c7f18d Hello....
    2 09/27 14:00 15ec1b716bbb6bdc Yeah...
    :
        

Usage

GLIMA commands:
  glima auth                          # Authenticate interactively
  glima dezip MSGID DIRECTORY         # Decrypt zip found in MSGID to DIRECTORY
  glima events SINCE                  # List operation history SINCE.
  glima guess MSGID                   # Guess labels to add to MSGID
  glima help [COMMAND]                # Describe available commands or one specific command
  glima init                          # Create new config file
  glima label MSGID                   # Add/Remove labels to/from MSGID
  glima labels                        # List labels
  glima open MSGID                    # Open article in browser by MSGID
  glima profile                       # Show user's profile.
  glima push EMAIL_FILE               # Push EMAIL_FILE to INBOX
  glima relabel SOURCE TARGET         # Rename label SOURCE to TARGET.
  glima scan +LABEL [QUERY]           # Scan LABEL with QUERY.
  glima show MSGID                    # Show article.
  glima trash MSGID ...               # Move messages to trash
  glima version                       # Show version
  glima watch QUEUE_LABEL MARK_LABEL  # Watch gmail server and xzip.
  glima xzip TARGET                   # Transform zip-attachments in TARGET and push back to Gmail.

Options:
  [--profile], [--no-profile]  # Set profiler flag
  [--user=USER]                # Set Gmail/IMAP account

Invoke decrypter from emacs mailer (Mew)

Minimum setup: add belows in your .emacs:

(setq load-path
      (cons "~/path/to/this/file load-path"))
(autoload 'axman-mew-decrypt-current-message-gmail "axman")
(autoload 'axman-mew-decrypt-current-message-local "axman")

How to use:

  1. In mew-summary buffer (ie. %inbox), point at an email with encrypted-ZIP attachment.
  2. M-x axman-mew-decrypt-current-message-local
  3. It will find the password from the current folder (%inbox) inspecting in passwordish-emails.

axman-mew-decrypt-current-message-gmail is another version that works with Gmail server. It would be useful if your email server is Gmail with IMAP enabled.

Japanese blog entry about glima xzip.

glima's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

mgielda

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.