Skip to content

Commit

Permalink
docs(README): improve installation instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
jackdbd committed Oct 10, 2024
1 parent ec21f6d commit dbf0828
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 19 deletions.
55 changes: 49 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,45 @@ Download all talks from a [FOSDEM](https://fosdem.org/) conference track in a sp

## Installation

This project is available on [GitHub Releases](https://github.com/jackdbd/fosdem-dl/releases) and [GitHub Packages](https://github.com/jackdbd/fosdem-dl/pkgs/container/fosdem-dl) as an uberjar, a [Babashka uberjar](https://book.babashka.org/#_uberjar) and a container image.
fosdem-dl is distributed as an uberjar, a [Babashka uberjar](https://book.babashka.org/#_uberjar) and a container image.

## Babashka uberjar (recommended)

If you have [Babashka](https://babashka.org/) installed on your machine, the recommended way to run this project is to download the Babashka uberjar from [GitHub Releases](https://github.com/jackdbd/fosdem-dl/releases) (it's the `.jar` without the `-standalone` suffix) and run it. For example, for version `0.1.0-RC.1`:

```sh
bb fosdem-dl-0.1.0-RC.1.jar
```

## Uberjar

If you prefer the "standard" uberjar, you can download it from [GitHub Releases](https://github.com/jackdbd/fosdem-dl/releases) and run it like this:

```sh
java -jar fosdem-dl-0.1.0-RC.1-standalone.jar
```

## Container image

In alternative, you can also pull the container image from [GitHub Packages](https://github.com/jackdbd/fosdem-dl/pkgs/container/fosdem-dl)...

```sh
docker pull ghcr.io/jackdbd/fosdem-dl:latest
```

...and run it like this:

```sh
docker run --rm ghcr.io/jackdbd/fosdem-dl:latest
```

> [!TIP]
> You could create a bash alias instead of having to type that `docker run` command every single time.
## Binary [TODO]

> [!WARNING]
> GraalVM native-image can generate a Linux binary from the uberjar, but it immediately crashes at runtime. I'm investigating the issue.
## Usage

Expand Down Expand Up @@ -80,13 +118,17 @@ fosdem-dl talks -y 2020 -t web_performance -f mp4 -a
## Development
The file [`devenv.nix`](./devenv.nix) declares a developer environment for this project. This file is used by [devenv](https://github.com/cachix/devenv) to create such environment. If you don't use devenv you can ignore this file, or use it to understand which dependencies are required by this project.
### Developer environment
This project uses a [`bb.edn`](./bb.edn) file to define a few [Babashka tasks](https://book.babashka.org/#tasks). You can type `bb tasks` to view them.
The file [`devenv.nix`](./devenv.nix) declares a developer environment for this project. This file is used by [devenv](https://github.com/cachix/devenv) to create such environment. If you're cloning this repository and not using devenv, you can safely ignore this file. However, you can still use it as a reference to understand the project's required dependencies.
### Tasks to manage the project
This project uses a [`bb.edn`](./bb.edn) file to define a few [Babashka tasks](https://book.babashka.org/#tasks). You can type `bb tasks` to view them. Some tasks might work only on Linux.
### Download an unregistered version of `pod-jackdbd-jsoup`
A specific version of `pod-jackdbd-jsoup` might not be *registered* on the [Babashka pod registry](https://github.com/babashka/pod-registry), but you can always download that pod from [GitHub Releases](https://github.com/jackdbd/pod-jackdbd-jsoup/releases).
A specific version of `pod-jackdbd-jsoup` might not be *registered* on the [Babashka pod registry](https://github.com/babashka/pod-registry), but it might be available on [GitHub Releases](https://github.com/jackdbd/pod-jackdbd-jsoup/releases), so you can download it from there.
Make sure to set the environment variable `POD_JACKDBD_JSOUP_VERSION` to the desired version, then run this script (you will need to have the [GitHub CLI](https://cli.github.com/) installed).
Expand All @@ -99,6 +141,8 @@ Make sure to set the environment variable `POD_JACKDBD_JSOUP_VERSION` to the des
### Namespace dependency graph
This graph represents the dependencies between the namespaces of this project. The graph was generated by [clj-hiera](https://github.com/greglook/clj-hiera).
![Dependency graph of the namespaces, generated with clj-hiera](./resources/img/namespaces.png)
### Tests
Expand All @@ -114,6 +158,5 @@ bb test
1. Bundle [pod-jackdbd-jsoup](https://github.com/jackdbd/pod-jackdbd-jsoup) in the binary compiled with GraamVM native-image.
1. Make the destination directory configurable, to let the user decide where to download the files.
1. Include the talk's links too? Maybe write them in a text/markdown file?
1. Consider scraping each talk's links. Maybe write them in a text/markdown/JSON file.
1. Show a progress bar. See [here](https://github.com/babashka/babashka.curl/issues/34).
1. Consider implementing a GUI with [pod-babashka-lanterna](https://github.com/babashka/pod-babashka-lanterna)?
17 changes: 4 additions & 13 deletions docs/release-body.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
fosdem-dl is distributed as an uberjar, a [Babashka uberjar](https://book.babashka.org/#_uberjar) and a container image.

If you prefer the container image, go to [Packages](https://github.com/jackdbd/fosdem-dl/pkgs/container/fosdem-dl) and pull the version you want.

If you prefer the Babashka uberjar or the uberjar, download it from the Assets below.

## Babashka uberjar (recommended)

To run the Babashka uberjar you will need to have [Babashka](https://babashka.org/) installed on your machine.
Expand All @@ -15,16 +19,3 @@ To run the uberjar you will need to have a JRE installed on your machine.
```sh
java -jar fosdem-dl-0.1.0-RC.1-standalone.jar
```

## Container image

Visit [this page](https://github.com/jackdbd/fosdem-dl/pkgs/container/fosdem-dl) to see the list of container images, then pull the one you want. For example:

```sh
docker pull ghcr.io/jackdbd/fosdem-dl:latest
```

## Binary [TODO]

> [!WARNING]
> GraalVM native-image can produce binaries for this CLI, but they immediately crash at runtime. I'm investigating the issue.

0 comments on commit dbf0828

Please sign in to comment.