Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install gister

How to install gister

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install gister
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
Windows (64-bit)
Mac OS X (10.5+)
1.0.9 Available View build log
Linux (32-bit)
1.0.9 Available View build log
Linux (64-bit)
1.0.9 Available View build log
 
Author
License
Apache Software License
Dependencies
Imports
Lastest release
version 1.0.9 on Mar 29th, 2013

examples

  • post a public gist on public github: cat dog | gister
  • post a secret gist on public github: cat dog | gister -s
  • post a public gist on private github deployment: cat dog | gister -p
  • post a secret gist on private github deployment: cat dog | gister -ps
  • post an anonymous gist on public github: cat dog | gister -a
  • post an anonymous and secret gist on public github: cat dog | gister -as
  • post an anonymous gist on private github deployment: cat dog | gister -ap
  • post an anonymous and secret gist on private github deployment: cat dog | gister -aps

usage

System Message: ERROR/3 (<string>, line 36)

Unknown directive type "code".

.. code:: console

    gister [-h] [-p] [-s] [-a] [-v]

    make gists!

    optional arguments:
      -h, --help       show this help message and exit
      -p, --private    put gist on configured enterprise github
      -s, --secret     gist will be secret (not public)
      -a, --anonymous  gist will be anonymous
      -v, --vim        gist came from vim, no prompt/history


install

  • fix weird hgtools dependency issue: pip install hgtools
  • clone the repo and python setup.py install

config file - .gister

an example configuration file .gister is given for you to use. it will be looked for in ~/.gister. it supports three values:

  • prompt - configure your own prompt (using variables username/hostname/cwd)
  • history_file - location of shell history file for command display
  • private_github_url - if you plan on using -p/--private this url needs to be set to the location of your private github deployment

keyring

i prefer to store my oauth tokens in keyring because it's safer than storing it plain text in the .gister file. your python keyring needs to have a section for github with a key token containing a github oauth token linked to your account. if you use the private github, do the same for pgithub and token. i added mine like this: gist.

github oauth tokens

here is a gist of the process by which a token is acquired. the returned dict will have a token key in it denoting your token. you can also manage your tokens by managing your github account and selecting Applications.

using with vim

I added the following to my .vimrc to interact with gister:

System Message: ERROR/3 (<string>, line 93)

Unknown directive type "code".

.. code:: vim

    " ------- gist making! --------------------------------
    fun Gister(...)
      let gister_call = "gister -v"
      for flag in a:000
        let gister_call = gister_call . " " . flag
      endfor
      let result = system(gister_call, expand("%:t") . "\n" . getreg("\""))
      echo result
    endfun
    " public gist on github from selection or single line
    vnoremap <F9> y:call Gister()<cr>
    nnoremap <F9> yy:call Gister()<cr>

    " secret gist on github from selection or single line
    vnoremap <F10> y:call Gister("-s")<cr>
    nnoremap <F10> yy:call Gister("-s")<cr>

    " public gist on private github from selection or single line
    vnoremap <F11> y:call Gister("-p")<cr>
    nnoremap <F11> yy:call Gister("-p")<cr>

    " secret gist on private github from selection or single line
    vnoremap <F12> y:call Gister("-p", "-s")<cr>
    nnoremap <F12> yy:call Gister("-p", "-s")<cr>
    " ------- end pastie.org ---------------------------

Subscribe to package updates

Last updated Mar 29th, 2013

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.