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.
- Host: GitHub
- URL: https://github.com/khtdr/pageboy
- Owner: khtdr
- Created: 2016-02-12T02:02:53.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2021-02-21T01:09:40.000Z (over 5 years ago)
- Last Synced: 2025-04-15T00:08:39.470Z (over 1 year ago)
- Language: Shell
- Homepage:
- Size: 50.8 KB
- Stars: 7
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
###