diego

command module
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2025 License: GPL-3.0 Imports: 2 Imported by: 0

README

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_1.0.3_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_1.0.3_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_1.0.3_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_1.0.3_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_1.0.3_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_1.0.3_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_1.0.3_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_1.0.3_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_1.0.3_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.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
adapters/left/cli
Package cli contains the command line interface adapter logic.
Package cli contains the command line interface adapter logic.
adapters/right/filesystem
Package filesystem implements the filesystem adapter logic.
Package filesystem implements the filesystem adapter logic.
app/api
Package api provides a versstile application programming interface.
Package api provides a versstile application programming interface.
app/core
Package core contains the essential application logic.
Package core contains the essential application logic.
app/domain
Package domain provides application options.
Package domain provides application options.
app/social
Package social provides an abstraction for services packages.
Package social provides an abstraction for services packages.
app/social/goodreads
Package goodreads implements the social interface for goodreads service.
Package goodreads implements the social interface for goodreads service.
app/social/imdb
Package imdb implements the social interface for imdb service.
Package imdb implements the social interface for imdb service.
app/social/instapaper
Package instapaper implements the social interface for instapaper service.
Package instapaper implements the social interface for instapaper service.
app/social/letterboxd
Package letterboxd implements the social interface for letterboxd service.
Package letterboxd implements the social interface for letterboxd service.
app/social/spotify
Package spotify implements the social interface for spotify service.
Package spotify implements the social interface for spotify service.
app/social/youtube
Package youtube implements the social interface for youtube service.
Package youtube implements the social interface for youtube service.
ports
Package ports provides driver (left) and driven (right) ports.
Package ports provides driver (left) and driven (right) ports.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL