mirror of
https://gitlab.melroy.org/melroy/fediresolve.git
synced 2025-06-07 20:08:57 +00:00
Improve readme and add CI
This commit is contained in:
parent
b4e461f90e
commit
efa7a38276
3 changed files with 46 additions and 9 deletions
20
.gitlab-ci.yml
Normal file
20
.gitlab-ci.yml
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
image: golang:latest
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- test
|
||||||
|
- build
|
||||||
|
|
||||||
|
format:
|
||||||
|
stage: test
|
||||||
|
script:
|
||||||
|
- go fmt $(go list ./... | grep -v /vendor/)
|
||||||
|
- go vet $(go list ./... | grep -v /vendor/)
|
||||||
|
|
||||||
|
build:
|
||||||
|
stage: build
|
||||||
|
script:
|
||||||
|
- go build
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- fediresolve
|
||||||
|
expire_in: 1 week
|
35
README.md
35
README.md
|
@ -1,20 +1,32 @@
|
||||||
# FediResolve
|
# FediResolve
|
||||||
|
|
||||||
FediResolve is a command-line tool for resolving and displaying Fediverse content. It can parse and display ActivityPub content from various Fediverse platforms including Mastodon, Mbin, Lemmy, PeerTube, and others.
|
FediResolve is a command-line tool for resolving and displaying Fediverse content.
|
||||||
|
|
||||||
|
It can parse and display ActivityPub content from various Fediverse platforms including Mastodon, Mbin, Lemmy, PeerTube, and others. For easy reading or debugging purposes.
|
||||||
|
|
||||||
|
~ Vibe coded within 2 hours.
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- Resolve Fediverse URLs to their ActivityPub representation
|
- Resolve Fediverse URLs to their ActivityPub representation
|
||||||
- Resolve Fediverse handles (e.g., @username@domain.tld)
|
- Resolve Fediverse handles (e.g., @username@domain.tld)
|
||||||
- Display both the full JSON data and a human-readable summary
|
- Display both the full JSON data and a human-readable summary
|
||||||
- Support for various ActivityPub types (Person, Note, Article, Create, Announce, etc.)
|
- Support for various ActivityPub types (Person, Page, Note, Article, etc.)
|
||||||
- Automatic resolution of shared/forwarded content to the original source
|
- Automatic resolution of shared/forwarded content to the original source
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Download
|
||||||
|
|
||||||
|
[FediResolve for Linux](https://gitlab.melroy.org/melroy/fediresolve/-/releases)
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
|
Either download the prebuild binary from [releases](https://gitlab.melroy.org/melroy/fediresolve/-/releases) or build from source, see below.
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
|
|
||||||
- Go 1.16 or later
|
- Go 1.21 or later
|
||||||
|
|
||||||
### Building from source
|
### Building from source
|
||||||
|
|
||||||
|
@ -39,26 +51,31 @@ go build
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
|
### Resolving a Mbin thread
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./fediresolve https://kbin.melroy.org/m/til/t/875629/Context7-Up-to-date-documentation-for-LLMs-and-AI-code-editors
|
||||||
|
```
|
||||||
|
|
||||||
### Resolving a Mastodon post
|
### Resolving a Mastodon post
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./fediresolve https://mastodon.social/@Gargron/12345
|
./fediresolve https://mastodon.melroy.org/@melroy/114297155915355913
|
||||||
```
|
```
|
||||||
|
|
||||||
### Resolving a user profile
|
### Resolving a user profile
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./fediresolve @Gargron@mastodon.social
|
./fediresolve @melroy@melroy.org
|
||||||
```
|
```
|
||||||
|
|
||||||
## How it works
|
## How it works
|
||||||
|
|
||||||
FediResolve uses the following process to resolve Fediverse content:
|
FediResolve uses the following process to resolve Fediverse content:
|
||||||
|
|
||||||
1. For handles (@username@domain.tld), it uses the WebFinger protocol to discover the ActivityPub actor URL
|
1. For handles (`@username@domain.tld`), it uses the WebFinger protocol to discover the ActivityPub actor URL
|
||||||
2. For URLs, it attempts to fetch the ActivityPub representation directly
|
2. For URLs, it attempts to fetch the ActivityPub representation directly. Or if the content is needs to be resolved from another Fediverse instance.
|
||||||
3. It checks if the content is shared/forwarded and resolves to the original source if needed
|
3. Content is parsed and displays both the raw JSON object and a nice looking summary.
|
||||||
4. It parses the ActivityPub JSON and displays both the raw data and a formatted summary
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|
BIN
demo-fediresolve.png
Normal file
BIN
demo-fediresolve.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 27 KiB |
Loading…
Add table
Reference in a new issue