Skip to content

A CLI tool for importing and utilizing exported social media data from popular services on Hugo websites.

License

Notifications You must be signed in to change notification settings

ttybitnik/diego

Repository files navigation

Diego: a data importer extension for Hugo

diego

Diego integrates with Hugo as a CLI tool to assist in importing and utilizing exported social media data from various services on Hugo websites.

release ci/cd go report card conventional commits

Overview

diego is a CLI tool designed to import official CSV and JSON data files from popular services like Goodreads, IMDb, Instapaper, Letterboxd, Spotify, and YouTube into Hugo.

diego provides:

  • Automatic CSV and JSON conversion into Hugo data files
  • Support for all Hugo data file formats
  • Easy data management in a human-readable format (YAML)
  • Automatic generation of Hugo shortcodes for imported data
  • Optional scrape capabilities for fetching missing fields
  • Flags suited for scripting and pipelines
  • Persistent configuration

Showcase

For a basic workflow example using diego to import data, see the demonstration.

For real usage examples, you can check the collections section on my personal Hugo website. I use diego to showcase my favorite albums, films, TV shows, music videos, and books.

Installation

Installing diego is easy. You can either compile it from source or download the official binaries from the releases.

Tip

After following the instructions for your preferred installation method, run diego -v to test the installed version.

From source

If the target system has go installed, compile and install diego using the following command:

go install github.com/ttybitnik/diego@latest

From releases

Download the latest release for your system and move its binary and man pages to the appropriate system paths. Use one of the commands below to simplify this process:

Tip

In case of uncertainty about the machine architecture, run uname -m to check it.

Linux

x86_64
curl -L https://github.com/ttybitnik/diego/releases/latest/download/diego_0.5.1_Linux_x86_64.tar.gz | tar -xzvf - -C /tmp/ && cp /tmp/diego ~/.local/bin/ && cp /tmp/man/*.1 ~/.local/share/man/man1/ # x-release-please-version
arm64
curl -L https://github.com/ttybitnik/diego/releases/latest/download/diego_0.5.1_Linux_arm64.tar.gz | tar -xzvf - -C /tmp/ && cp /tmp/diego ~/.local/bin/ && cp /tmp/man/*.1 ~/.local/share/man/man1/ # x-release-please-version
i386
curl -L https://github.com/ttybitnik/diego/releases/latest/download/diego_0.5.1_Linux_i386.tar.gz | tar -xzvf - -C /tmp/ && cp /tmp/diego ~/.local/bin/ && cp /tmp/man/*.1 ~/.local/share/man/man1/ # x-release-please-version

FreeBSD

x86_64
curl -L https://github.com/ttybitnik/diego/releases/latest/download/diego_0.5.1_Freebsd_x86_64.tar.gz | tar -xzvf - -C /tmp/ && cp /tmp/diego ~/.local/bin/ && cp /tmp/man/*.1 ~/.local/share/man/man1/ # x-release-please-version
arm64
curl -L https://github.com/ttybitnik/diego/releases/latest/download/diego_0.5.1_Freebsd_arm64.tar.gz | tar -xzvf - -C /tmp/ && cp /tmp/diego ~/.local/bin/ && cp /tmp/man/*.1 ~/.local/share/man/man1/ # x-release-please-version
i386
curl -L https://github.com/ttybitnik/diego/releases/latest/download/diego_0.5.1_Freebsd_i386.tar.gz | tar -xzvf - -C /tmp/ && cp /tmp/diego ~/.local/bin/ && cp /tmp/man/*.1 ~/.local/share/man/man1/ # x-release-please-version

MacOS

x86_64
curl -L https://github.com/ttybitnik/diego/releases/latest/download/diego_0.5.1_Darwin_x86_64.tar.gz | tar -xzvf - -C /tmp/ && cp /tmp/diego ~/.local/bin/ && cp /tmp/man/*.1 ~/.local/share/man/man1/ # x-release-please-version
arm64
curl -L https://github.com/ttybitnik/diego/releases/latest/download/diego_0.5.1_Darwin_arm64.tar.gz | tar -xzvf - -C /tmp/ && cp /tmp/diego ~/.local/bin/ && cp /tmp/man/*.1 ~/.local/share/man/man1/ # x-release-please-version

Windows

x86_64
Invoke-WebRequest -Uri "https://github.com/ttybitnik/diego/releases/latest/download/diego_0.5.1_Windows_x86_64.zip" -OutFile "$env:USERPROFILE\Downloads\diego_x86_64.zip" # x-release-please-version

Usage

Getting started

Once installed, run diego and follow the instructions to start using it.

Run either diego help [command] or diego [command] -h to discover more about a specific command.

For complete details on using diego, see the user guide.

Commands

Supported services and files

Contributing

To request support for a new service or file, submit a feature request with a small sample of the official exported file.

In case of unexpected behavior, please open a bug report.

For matters requiring privacy, such as security-related reports or patches, check the security policy.

To contribute to diego development, see the contributing guidelines.

Mailing list

Email workflow is also available.

Feel free to send patches, questions, or discussions related to diego to the ~ttybitnik/general mailing list.

License

This project is licensed under the GNU General Public License v3.0 (GPL-3.0), unless an exception is made explicit in context. The GPL is a copyleft license that guarantees freedom to use, modify, and distribute software. It ensures that users have control over the software they use and promotes collaboration and sharing of knowledge. By requiring that derivative works also be licensed under the GPL, the freedoms it provides are extended to future generations of users and developers.

See the COPYING file for more information.

The source code for this project is available at https://github.com/ttybitnik/diego.