tools_issue_cli/README.md

77 lines
1.8 KiB
Markdown
Raw Permalink Normal View History

2025-01-24 13:17:55 +02:00
# GitHub Issue Downloader
This project is a command-line tool that fetches GitHub issue data and reconstructs it in Markdown or HTML format. It includes features such as rendering Markdown in comments, displaying user avatars, and a dark mode toggle in HTML output.
## Features
- Fetch GitHub issue and comments
- Render Markdown in issues and comments
- Display user avatars
- Dark mode toggle for HTML output
## Prerequisites
- Go 1.23 or later
- Internet connection to access the GitHub API
## Installation
1. Clone the repository:
```sh
git clone https://f0rk.systems/reso/tools_issue_cli.git
```
2. Change to the project directory:
```sh
2025-01-24 13:22:25 +02:00
cd tools_issue_cli
2025-01-24 13:17:55 +02:00
```
3. Build the project:
```sh
make build
2025-01-24 13:17:55 +02:00
```
## Usage
### Fetching and Outputting an Issue
You can use the tool to fetch a GitHub issue and output it in either Markdown or HTML format.
#### Fetch and Output as Markdown
To fetch an issue and output it as Markdown:
```sh
./issue_cli fetch --url https://github.com/owner/repo/issues/1 --output issue.md --format markdown
2025-01-24 13:17:55 +02:00
```
#### Fetch and Output as HTML
To fetch an issue and output it as HTML:
```sh
./issue_cli fetch --url https://github.com/owner/repo/issues/1 --output issue.html --format html
2025-01-24 13:17:55 +02:00
```
### Command-Line Options
- `--url`: The URL of the GitHub issue to fetch.
- `--output`: The file path to write the output (optional). If not provided, the output is printed to the console.
- `--format`: The output format (`markdown` or `html`). Defaults to `markdown`.
## Example
### Fetch an Issue and Output as Markdown
```sh
./issue_cli fetch --url https://github.com/dnnyxyz/dnnyxyz.github.io/issues/1 --output issue.md --format markdown
2025-01-24 13:17:55 +02:00
```
### Fetch an Issue and Output as HTML
```sh
./issue_cli fetch --url https://github.com/dnnyxyz/dnnyxyz.github.io/issues/1 --output issue.html --format html
2025-01-24 13:17:55 +02:00
```