An open API service indexing awesome lists of open source software.

https://github.com/khtdr/pageboy

Write your shell scripts in any combination of scripting languages.
https://github.com/khtdr/pageboy

Last synced: over 1 year ago
JSON representation

Write your shell scripts in any combination of scripting languages.

Awesome Lists containing this project

README

          

pageboy
=======

Write your shell scripts in any combination of scripting languages.

installation
------------

1. Current version: 2.1.4
2. Download the [pageboy bash script](https://raw.githubusercontent.com/khtdr/pageboy/master/pageboy) and put into your `$PATH` (ie. `~/bin/`).
3. Start using `#!/usr/bin/env pageboy` as your shebang line in your bash scripts.
4. Call other "pages" of your script by using the pre-defined `$PAGE` command in your scripts.

```bash
curl -o ~/bin/pageboy https://raw.githubusercontent.com/khtdr/pageboy/master/pageboy; chmod +x ~/bin/pageboy
```

Verify the install
```bash
~/bin/pageboy -h
```

**Example Script** `example.pb`

```bash
#!/usr/bin/env pageboy
echo in Bash
$PAGE php
echo back to Bash

#!/usr/bin/env php
onetwo.sh
chmod +x ./onetwo.sh
./onetwo.sh
```

_produces:_

onetwo

**Big Example**

```bash
#!/usr/bin/env pageboy
cat <($PAGE php) <($PAGE ruby) <($PAGE bash1) <($PAGE bash2) <($PAGE php2)

#!/usr/bin/env php
# runs requested page
pageboy -p # prints requested page
pageboy -c # compiles to bash script
pageboy -d # dumps page table
pageboy -h # shows this message
https://github.com/khtdr/pageboy

More examples can be found in the [tests directory](https://github.com/khtdr/pageboy/blob/master/tests/).

advanced features
-----------------

- Pages can be named, see https://github.com/khtdr/pageboy/blob/master/tests/named.pb
- Args can be passed in, see https://github.com/khtdr/pageboy/blob/master/tests/args.pb

###