Skip to content

RapidFire is calls and displays the defined Python function from command line

License

Notifications You must be signed in to change notification settings

wanshot/RapidFire

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RapidFire

https://circleci.com/gh/wanshot/RapidFire/tree/master.svg?style=svg

SETUP

  • Init RapidFire
$ pip install rapidfire
$ rap --init
$ vi /Your/home/directory/.rapidfire.d/raprc
  • Set the value in RAPIDFIRE_PYFILE_PATH
RAPIDFIRE_PYFILE_PATH = /path/hoge.py
  • Edit sample code
$ vi /path/hoge.py
from rapidfire import task

@task
def sample():
    return ['text1', 'text2', 'text3']
  • Run RapidFire
$ rap sample

API

  • rapidfire.task(next_action, clipboard, per_page)
    • Parameters
      • next_action - For next_action, specify the function name to be executed next
      • clipboard - Copy the result to the cripboard
      • per_page - Lines per page

Example

from rapidfire import task

### Case.1
@task(next_action='sample_method2', per_page=2)
def sample_method1():
    return ['text1', 'text2', 'text3']

@task(clipboard=True)
def sample_method2():
    selected_value = sample_method1 # The value selected by sample_method1 is entered
    return ['{} is selected'.format(selected_value)]
$ rap sample_method1

About

RapidFire is calls and displays the defined Python function from command line

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages