Show HN: Diego – A CLI tool for importing into Hugo exported data from services (github.com)

5 points by sedboyz ↗ HN
Hey there! Initially, I had created a script to automate importing some exported files into my Hugo website. As I implemented support for the second service though, I realized that it would be better to convert the script into a CLI tool. (Also, a good opportunity to learn/practice Go).

That's 'diego.' I released it about a month ago, but I'm only announcing it here now. Basically, it's a CLI tool designed to import official exported data, CSV and JSON files, from popular services into Hugo. It offers:

  - 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
Feedback, suggestions, constructive criticism, and contributions are welcome! I've just submitted a patch implementing support for Instapaper. If you have ideas for additional services that would be a good fit to add support to, let me know.

This is my first released FOSS project

Below is a link containing a plaintext report of my TODOS along with the time I've spent on each item while developing diego. (I think it helps getting an overview of the project internals).

https://paste.sr.ht/~ttybitnik/4968a1ead00d82dc92a5aced5eef4...

2 comments

[ 2.9 ms ] story [ 14.5 ms ] thread
Wow, great tool!

Are there more importer services to be expected? Last.fm or soundcloud.com?

Thanks!

Sure, all it takes to add support for a new service is a small sample of the `.csv` or `.json` file provided by the service--as the ones in the /examples/silo directory. Anyone can submit a request for support with a sample.

I've been logging my listenings on last.fm since 2011 and the idea of adding support for it never crossed my mind lol

Unfortunately, as it seems, last.fm currently does not provide a way for users to download their data other than using the API. I found a website that seems like people use to achieve that, but for now I'd rather support only official files (I think).

I don't have a soundcloud account atm, but I added a TODO to check if they provide a data export option.