Git Product home page Git Product logo

fire's Introduction

fire

fire is a init script generator to invoke exported functions.

inspired by https://github.com/google/python-fire

Warning

This software is still ALPHA quality. The APIs will be likely to change.

Installation

ros install roswell/fire

Usage by example

$ ros init fire sample.fire
Successfully generated: sample.fire.ros

sample.fire.ros

cat sample.fire.ros
#!/bin/sh
#|-*- mode:lisp -*-|#
#|
exec ros -Q -- $0 "$@"
|#
(progn
  (ros:ensure-asdf)
  (ql:quickload '(:fire :sample.fire) :silent t))

(defpackage :ros.script.sample.fire.3725423011
  (:use :sample.fire))
(cl:in-package :ros.script.sample.fire.3725423011)

(cl:defun main (cl:&rest argv)
  (fire/src/shelly-like::shelly argv :package (cl:find-package :ros.script.sample.fire.3725423011)))
;;; vim: set ft=lisp lisp:

with this. You might want to edit :use part.

sample.fire is a project and it define same package name in it. The package export functions named f1 and f2.

Invoke exported function

passing numbers

$ ros sample.fire.ros f1 1 2 3
(:F1 1 2 3)

passing strings

$ ros sample.fire.ros f1 :"1 2 3"
(:F1 "1 2 3")

passing keywords

$ros sample.fire.ros f2 --a --b --c
(:F2 :A :B :C)

quoted

$ros sample.fire.ros f2 : 1
(:F2 1)

list (need to be quoted)

$ ros sample.fire.ros f1 : { 1 2 3 }
(:F1 (1 2 3))

fire's People

Contributors

bowbow99 avatar snmsts avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

bowbow99

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.