#url #command-line-tool #website #open-graph

app ograph-rs

A simple command-line utility to extract and print OpenGraph metadata from a given URL

3 unstable releases

new 0.3.2 Oct 17, 2024
0.3.0 Oct 17, 2024
0.2.0 Aug 1, 2024

#953 in Command line utilities

Download history 111/week @ 2024-07-29 1/week @ 2024-08-05 16/week @ 2024-09-16 5/week @ 2024-09-23 2/week @ 2024-09-30 229/week @ 2024-10-14

237 downloads per month

GPL-3.0-or-later

26KB

ograph-rs

A simple command-line utility to extract and print OpenGraph metadata from a given URL.

[!NOTE] This project is mainly for helping me to learn Rust. If it becomes something robust and reliable in the future, then great! For now, I have no idea what I'm doing.

Usage

ograph 'https://www.rust-lang.org'

At time of writing, the above command prints the following:

twitter:card "summary"
twitter:site "@rustlang"
twitter:creator "@rustlang"
twitter:title ""
twitter:description "A language empowering everyone to build reliable and efficient software."
twitter:image "https://www.rust-lang.org/static/images/rust-social.jpg"
og:title ""
og:description "A language empowering everyone to build reliable and efficient software."
og:image "https://www.rust-lang.org/static/images/rust-social-wide.jpg"
og:type "website"
og:locale "en_US"

Installation

Build from source

To build from source, you first need cargo installed. Then run:

git clone https://git.average.name/AverageHelper/ograph-rs.git
cd ograph-rs
cargo build --release

You can then run the binary directly at ./target/release/ograph, or use cargo:

cargo run --release -- https://example.com

Cargo package registries (cargo)

This package is published on our own package registry. With cargo installed, run the following:

cargo install --index sparse+https://git.average.name/api/packages/AverageHelper/cargo/ ograph-rs

Also available from crates.io:

cargo install ograph-rs --registry crates-io

Dependencies

~15–23MB
~378K SLoC