Skip to content

Commit

Permalink
Fix the README files (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
habedi authored Mar 1, 2025
1 parent e29a24d commit fadb0db
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 36 deletions.
72 changes: 48 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,44 @@
</div>
<br>

[![Tests](https://img.shields.io/github/actions/workflow/status/habedi/gogg/tests.yml?label=tests&style=flat&labelColor=555555&logo=github)](https://github.com/habedi/gogg/actions/workflows/tests.yml)
[![Linters](https://img.shields.io/github/actions/workflow/status/habedi/gogg/linters.yml?label=lintss&style=flat&labelColor=555555&logo=github)](https://github.com/habedi/gogg/actions/workflows/lints.yml)
[![Linux Build](https://img.shields.io/github/actions/workflow/status/habedi/gogg/build_linux.yml?label=linux%20build&style=flat&labelColor=555555&logo=linux)](https://github.com/habedi/gogg/actions/workflows/build_linux.yml)
[![Windows Build](https://img.shields.io/github/actions/workflow/status/habedi/gogg/build_windows.yml?label=windows%20build&style=flat&labelColor=555555&logo=github)](https://github.com/habedi/gogg/actions/workflows/build_windows.yml)
[![MacOS Build](https://img.shields.io/github/actions/workflow/status/habedi/gogg/build_macos.yml?label=macos%20build&style=flat&labelColor=555555&logo=apple)](https://github.com/habedi/gogg/actions/workflows/build_macos.yml)
<br>
[![Docs](https://img.shields.io/badge/docs-latest-3776ab?style=flat&labelColor=555555&logo=readthedocs)](docs)
[![License](https://img.shields.io/badge/license-MIT-007ec6?style=flat&labelColor=555555&logo=open-source-initiative)](https://github.com/habedi/gogg)
[![Code Coverage](https://img.shields.io/codecov/c/github/habedi/gogg?style=flat&labelColor=555555&logo=codecov)](https://codecov.io/gh/habedi/gogg)
[![CodeFactor](https://img.shields.io/codefactor/grade/github/habedi/gogg?style=flat&labelColor=555555&logo=codefactor)](https://www.codefactor.io/repository/github/habedi/gogg)
[![Release](https://img.shields.io/github/release/habedi/gogg.svg?style=flat&labelColor=555555&logo=github)](https://github.com/habedi/gogg/releases/latest)
[![Total Downloads](https://img.shields.io/github/downloads/habedi/gogg/total.svg?style=flat&labelColor=555555&logo=github)](https://github.com/habedi/gogg/releases)
<div align="center">
<a href="https://github.com/habedi/gogg/actions/workflows/tests.yml">
<img src="https://img.shields.io/github/actions/workflow/status/habedi/gogg/tests.yml?label=tests&style=flat&labelColor=555555&logo=github" alt="Tests">
</a>
<a href="https://github.com/habedi/gogg/actions/workflows/lints.yml">
<img src="https://img.shields.io/github/actions/workflow/status/habedi/gogg/lints.yml?label=linters&style=flat&labelColor=555555&logo=github" alt="Linters">
</a>
<a href="https://github.com/habedi/gogg/actions/workflows/build_linux.yml">
<img src="https://img.shields.io/github/actions/workflow/status/habedi/gogg/build_linux.yml?label=linux%20build&style=flat&labelColor=555555&logo=linux" alt="Linux Build">
</a>
<a href="https://github.com/habedi/gogg/actions/workflows/build_windows.yml">
<img src="https://img.shields.io/github/actions/workflow/status/habedi/gogg/build_windows.yml?label=windows%20build&style=flat&labelColor=555555&logo=github" alt="Windows Build">
</a>
<a href="https://github.com/habedi/gogg/actions/workflows/build_macos.yml">
<img src="https://img.shields.io/github/actions/workflow/status/habedi/gogg/build_macos.yml?label=macos%20build&style=flat&labelColor=555555&logo=apple" alt="MacOS Build">
</a>
<br>
<a href="docs">
<img src="https://img.shields.io/badge/docs-latest-3776ab?style=flat&labelColor=555555&logo=readthedocs" alt="Docs">
</a>
<a href="https://github.com/habedi/gogg">
<img src="https://img.shields.io/badge/license-MIT-007ec6?style=flat&labelColor=555555&logo=open-source-initiative" alt="License">
</a>
<a href="https://codecov.io/gh/habedi/gogg">
<img src="https://img.shields.io/codecov/c/github/habedi/gogg?style=flat&labelColor=555555&logo=codecov" alt="Code Coverage">
</a>
<a href="https://www.codefactor.io/repository/github/habedi/gogg">
<img src="https://img.shields.io/codefactor/grade/github/habedi/gogg?style=flat&labelColor=555555&logo=codefactor" alt="CodeFactor">
</a>
<a href="https://github.com/habedi/gogg/releases/latest">
<img src="https://img.shields.io/github/release/habedi/gogg.svg?style=flat&labelColor=555555&logo=github" alt="Release">
</a>
<a href="https://github.com/habedi/gogg/releases">
<img src="https://img.shields.io/github/downloads/habedi/gogg/total.svg?style=flat&labelColor=555555&logo=github" alt="Total Downloads">
</a>
</div>

# Gogg
## Gogg

Gogg is a minimalistic command-line tool for downloading game files from [GOG.com](https://www.gog.com/).
It is written in [Go](https://golang.org/) and uses the
Expand All @@ -29,7 +53,7 @@ official [GOG API](https://gogapidocs.readthedocs.io/en/latest/index.html).
The main goal of Gogg is to provide a simple and easy-to-use interface for people who want to download their GOG games
for offline use or archival purposes.

## Features
### Features

Main features of Gogg:

Expand All @@ -48,17 +72,17 @@ Additionally, it allows users to perform the following actions:
- Verify the integrity of downloaded files by calculating their hashes
- Calculate the total size of the files to be downloaded (for storage planning)

## Getting Started
### Getting Started

See the [documentation](docs/README.md) for how to install and use Gogg.

Run `gogg -h` to see the available commands and options.

### Examples
#### Examples

**For more detailed examples, see the content of the [examples](docs/examples/) directory.**

#### Login to GOG
##### Login to GOG

```bash
# First-time using Gogg, you need to login to GOG to authenticate
Expand All @@ -70,47 +94,47 @@ gogg login
> your machine for the first-time authentication.
> So, make sure you have one of them installed and available in your system's PATH.
#### Syncing the Game Catalogue
##### Syncing the Game Catalogue

```bash
# Will fetch the up-to-date information about the games you own on GOG
gogg catalogue refresh
```

#### Searching for Games
##### Searching for Games

```bash
# Will show the game ID and title of the games that contain "Witcher" in their title
gogg catalogue search "Witcher"
```

#### Downloading a Game
##### Downloading a Game

```bash
# Will download the files for `The Witcher: Enhanced Edition` to `./games` directory (without extra content)
gogg download 1207658924 ./games --platform=windows --lang=en --dlcs=true --extras=false \
--resume=true --threads 5 --flatten=true
```

#### File Hashes (For Verification)
##### File Hashes (For Verification)

```bash
# Will show the SHA1 hash of the downloaded files for `The Witcher: Enhanced Edition`
gogg file hash ./games/the-witcher-enhanced-edition --algo=sha1
```

#### Storage Size Calculation
##### Storage Size Calculation

```bash
# Will show the total size of the files to be downloaded for `The Witcher: Enhanced Edition`
DEBUG_GOGG=false gogg file size 1207658924 --platform=windows --lang=en --dlcs=true \
--extras=false --unit=GB
```

## Demo
### Demo

[![asciicast](https://asciinema.org/a/kXMGRUUV149R37IEmZKtTH7nI.svg)](https://asciinema.org/a/kXMGRUUV149R37IEmZKtTH7nI)

## Contributing
### Contributing

Please see the [CONTRIBUTING.md](CONTRIBUTING.md) file for information on how to contribute to Gogg.
24 changes: 12 additions & 12 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
> using username and password).
> So, make sure you have one of them installed on your machine.
## Installation
### Installation

You can download the binary builds of Gogg for your operating system
from the [releases page](https://github.com/habedi/gogg/releases).
You might want to add the binary to your system's PATH to use it from anywhere on your system.

### Installation from Source
#### Installation from Source

Alternatively, you can install Gogg from source using Go toolchain.
To do that, you need to have [Go](https://golang.org/) installed on your machine.
Expand All @@ -24,22 +24,22 @@ go install github.com/habedi/gogg@latest # Replace `latest` with the desired ver
$GOPATH/bin/gogg <command>
```

## Usage
### Usage

### Login to GOG
#### Login to GOG

Use the `login` command to login to your GOG account the first time you use Gogg.

```sh
gogg login
```

### Game Catalogue
#### Game Catalogue

Gogg stores information about the games you own on GOG in a local database called the (game) catalogue.
The `catalogue` command and its subcommands allow you to interact with this database.

#### Updating the Catalogue
##### Updating the Catalogue

Use the `catalogue refresh` command to synchronize the catalogue with your GOG library.
This command will fetch the up-to-date information about the games you own on GOG and store it in the catalogue.
Expand All @@ -50,15 +50,15 @@ gogg catalogue refresh

You might want to run this command after purchasing new games on GOG to keep the catalogue synchronized.

#### Listing Games
##### Listing Games

To see the list of games in the catalogue, use the `catalogue list` command:

```sh
gogg catalogue list
```

#### Searching for Games
##### Searching for Games

To search for games in the catalogue, you can use the `catalogue search` command.
The search can be done either by the game ID or by a search term.
Expand All @@ -74,7 +74,7 @@ gogg catalogue search <search_term>
gogg catalogue search --id=true <game_id>
```

#### Game Details
##### Game Details

To see detailed information about a game in the catalogue, use the `catalogue info` command.
The command requires the game ID as an argument.
Expand All @@ -84,7 +84,7 @@ The command requires the game ID as an argument.
gogg catalogue info <game_id>
```

#### Exporting the Catalogue
##### Exporting the Catalogue

You can export the catalogue to file using the `catalogue export` command.
The command requires the format of the file (CSV or JSON) and the directory path to save the file.
Expand All @@ -104,7 +104,7 @@ The full information is the data that GOG provides about the game.
gogg catalogue export --format=json <output_dir>
```

### Downloading Game Files
#### Downloading Game Files

To download game files, use the `download` command and provide it with the game ID and the path to the directory
where you want to save the files.
Expand Down Expand Up @@ -132,7 +132,7 @@ gogg download <game_id> <download_dir> --platform=all --lang=en --dlcs=true --ex
--resume=true --threads=5 --flatten=true
```

## Enabling Debug Mode
### Enabling Debug Mode

To enable debug mode, set the `DEBUG_GOGG` environment variable to `true` or `1` when running Gogg.
In debug mode, Gogg will be much more verbose and print a lot of information to the console.
Expand Down

0 comments on commit fadb0db

Please sign in to comment.