This commit adds a `--user` flag to the `collect git` command, allowing it to fetch all public repositories for a given GitHub user or organization. - The `collect git` command was modified to accept a `--user` flag. - The previous `all` command's functionality has been integrated into the `collect git` command. - The documentation and examples have been updated to reflect the new flag.
39 lines
718 B
Markdown
39 lines
718 B
Markdown
# Usage
|
|
|
|
This document explains how to use the Borg Data Collector.
|
|
|
|
## `collect git`
|
|
|
|
The `collect git` command is used to clone a git repository and store it in a DataNode.
|
|
|
|
### Collect a single repository
|
|
|
|
```bash
|
|
borg collect git --uri https://github.com/torvalds/linux.git --output linux.dat
|
|
```
|
|
|
|
### Collect all repositories for a user
|
|
|
|
```bash
|
|
borg collect git --user torvalds --output /path/to/output/dir
|
|
```
|
|
|
|
## `collect website`
|
|
|
|
The `collect website` command is used to crawl a website and store it in a DataNode.
|
|
|
|
### Example
|
|
|
|
```bash
|
|
borg collect website --uri https://tldp.org/
|
|
```
|
|
|
|
## `serve`
|
|
|
|
The `serve` command is used to serve a DataNode file.
|
|
|
|
### Example
|
|
|
|
```bash
|
|
borg serve --file linux.borg
|
|
```
|