pages/command¶
Package pages_command is the guidedog-pages command line: it signs in to GitHub, authorizes targets, and publishes Guidedog sites to GitHub Pages with lib/pages. A project is built by the installed guidedog, as dsc builds catalogs; guidedog-pages links no document engine. Started with plugins.PROTOCOL_FLAG, it serves the process protocol instead, for guidedog publish –publisher=pages. It allocates with context.allocator and never frees, so run it in an arena.
Types
- command.Options :: struct¶
-
Options are a command line’s settings.
- command: string¶
-
“auth” “login”
- sub: string¶
-
“auth” “login”
- config: string¶
- repository: string¶
-
init
- project: string¶
-
init
- site: string¶
-
init
- branch: string¶
- profile: string¶
- client_id: string¶
-
auth login
- scope: string¶
-
auth login
- credential: string¶
-
“env”: the token in GUIDEDOG_PAGES_TOKEN.
- guidedog: string¶
-
the guidedog that builds a project.
- operation: string¶
-
status
- wait: int¶
-
publish: seconds; -1 when not given.
- color: string¶
- diagnostics: string¶
- dry_run: bool¶
- adopt: bool¶
- yes: bool¶
- open: bool¶
- replace: bool¶
- force: bool¶
- verbose: bool¶
- help: bool¶
- version: bool¶
Procedures
- command.parse :: proc(args: []string) -> (o: Options, p: Problem)¶
-
parse reads args into Options; a word or option the command does not take is a problem naming the ones it does.
- command.run :: proc(args: []string) -> int¶
-
run runs the command line args (without the program name) and returns the exit status.
Constants
- command.COMMANDS¶
-
COMMANDS are the commands guidedog-pages has.
- command.VERSION :: pages.VERSION¶
-
VERSION is guidedog-pages’ version, which is Guidedog’s (lib/cli checks it).