Skip to content
This repository has been archived by the owner on Apr 22, 2021. It is now read-only.

New documentation for chapter 1 #70

Open
wants to merge 33 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
e4dd38b
first commit of chapter 1: intro to web archiving, autopilot, and ins…
Aug 14, 2020
6177866
Added file for chapter 2 documentation
Aug 18, 2020
9d52ef2
install section of chapter 1 modified to include a way to install aut…
Aug 18, 2020
e986ba6
fixed in-line code to be code blocks and added some usage info
Aug 18, 2020
f0becd0
Added documentation for the usage of autopilot
Aug 19, 2020
c7b64e3
Added headlines to chapter 2, some usage information for Docker (may …
Aug 24, 2020
d29919e
last commit didn't work right, trying again
Aug 24, 2020
aa36246
Started the guide on how to write a behavior for people with little j…
Aug 26, 2020
34fb47e
Progress on the Format section for chapter 2 under Creating Your Firs…
Aug 26, 2020
a164403
Added more for format section, putting in code examples
Aug 26, 2020
9f978c9
fixing some stuff in format, adding some stuff in a new section expla…
Aug 27, 2020
1060548
wrote some stuff on the expected format of the export metadata object
Aug 28, 2020
200d604
added info on the match property in the metadata export
Aug 31, 2020
a9677ba
finished the tutorial on how to create a behavior in chapter 2
Sep 1, 2020
6ec4f75
added files for chapters 3, 4, and reference:API
Sep 2, 2020
959aa5a
added more steps into the "how to make a behavior" section of chapter…
Sep 9, 2020
41cc5e0
changed the title of the section after "setting up your file" to "get…
Sep 9, 2020
8259197
added stuff about using the `newBehavior` CLI in the getting started …
Sep 12, 2020
8a038f3
added directions for Testing your first behavior using the CLI
Sep 14, 2020
223c244
fixed some small formatting things
Sep 14, 2020
edbfea4
moved chapters to manual
Sep 14, 2020
d038ae7
wrote directions for how to set up config file in "testing your first…
Sep 15, 2020
2fa30a0
wrote the "fixing a broken behavior" section
Sep 15, 2020
d1eb53c
I don't remember what my changes were
Sep 16, 2020
ae14f2c
started the FAQ document
Sep 16, 2020
03c17d6
moved some advanced stuff from chapter 2 into chapter 3
Sep 16, 2020
005fa31
added a code of conduct to the manual
Sep 17, 2020
ce81db2
removed some stuff that was covered in chapter 2
Sep 21, 2020
4436c78
updated chapter 1
kyragaut Sep 23, 2020
422c4c4
moved locations of the chapters
kyragaut Sep 23, 2020
47ab4e8
moved locations of chapters
kyragaut Sep 23, 2020
681d0c6
Moved the chapters to the correct locations
kyragaut Nov 12, 2020
0ed0640
added bug report format file
kyragaut Nov 12, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions chapter1.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,66 @@ Commands:
help [cmd] display help for [cmd]
```

The cli provides two commands API and behaviors and each command has its own options.

# Behaviors command

Execute `./bin/cli behaviors -b` to build the behaviors made available, using the config file located at the root of the project.

The built behaviors, along with a behavior metadata file (`behaviorMetadata.js`), can be found in the `dist` directory which will be created for you if it does not exist in the root of this project.

The following options are available to use with the behaviors command:

```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as this is intended as a quick getting started guide I think that we don't need to put this output of help in here


$ ./bin/cli behaviors --help

Usage: cli-behaviors [options]

Options:
-V, --version output the version number
-v, --validate [fileOrDir]
-c, --config [configPath] Path to the behavior config file (default: "<path to wr-behaviors>/behavior-config.yml")
-b, --build [fileOrDir] Build a behaviors or all behaviors contained within a directory (default: true)
-w, --watch [behaviorFileOrDir] Watch the files, and their imports, in the build directory for re-bundling on changes (placed in dist directory)
--metadata [dumpDir] Generate behavior metadata, optionally supplying a path to directory where metadata is to be placed. Defaults to current working directory
-h, --help output usage information
```


# API command

To run the behavior API server execute `./bin/cli api --build-behaviors`.

This will start the API server after all behaviors provided by this project have been built.

If you have already built the behaviors using the `behaviors` command provided by the cli then you may omit the `--build-behaviors` flag.

The following options are available to use with the API command:

```
$ ./bin/cli api --help
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here


Usage: cli-api [options]

Options:
-V, --version output the version number
-p, --port [port] The port the api server is to bind to (default: 3030)
-h, --host [host] The host address the server is listen on (default: "127.0.0.1")
-b, --behaviorDir [behaviorDir] The path to the directory containing the build behaviors (default: "<path to wr-behaviors>/dist")
-m, --behaviorMetadata [medataPath] The path to the behavior metadata (default: "<path to wr-behaviors>/dist/behaviorMetadata.js")
--build-behaviors Should the api server build the behaviors for starting up
-h, --help output usage information
```

Some configuration of the API server can be done via the environment variables listed below

* `BEHAVIOR_API_HOST`: the host the api server will use (e.g. 127.0.0.1)
* `BEHAVIOR_API_PORT`: the port the api server will listen on (e.g. 3030)
* `WR_BEHAVIOR_DIR`: path to the directory containing the built behaviors
* `WR_BEHAVIOR_METADATA_PATH`: path to the behavior metadata file
* `BUILD_BEHAVIORS`: should the api server build the behaviors before starting

//I can't yet explain how to use autopilot in the browser since the extension isn't finished yet, right?
kyragaut marked this conversation as resolved.
Show resolved Hide resolved

## About Web Traffic
Expand Down