Update the way statements are generated - Code #7

Closed
opened 2026-01-06 01:19:59 +01:00 by csxkdv · 3 comments
Owner
  • Currently, statements are generated locally using Prawn, Prawn-Table and Gruff. This also requires the installation of ImageMagick via libmagickwand-dev.
  • Trying to convert a PDF to PNG in Debian currently requires updating ImageMagick's policy file.

Find a way to generate report statements without using those, not only to reduce the amount of gems used, but also to avoid making the user that's forking the bot install a bunch of stuff.

- Currently, statements are generated locally using Prawn, Prawn-Table and Gruff. This also requires the installation of ImageMagick via `libmagickwand-dev`. - Trying to convert a PDF to PNG in Debian currently requires updating ImageMagick's policy file. Find a way to generate report statements without using those, not only to reduce the amount of gems used, but also to avoid making the user that's forking the bot install a bunch of stuff.
csxkdv added this to the FrugalityBot - Code project 2026-01-06 01:19:59 +01:00
csxkdv moved this to In progress in FrugalityBot - Code on 2026-01-06 18:04:09 +01:00
Author
Owner

Working on progress by turning the .PDF file into an Embed.

Working on progress by turning the .PDF file into an Embed.
csxkdv moved this to Done in FrugalityBot - Code on 2026-01-06 18:22:26 +01:00
Author
Owner

Code finished. Testing phase now.
Using embeds for the body and QuickChart.io for generating the doughnut chart.

Colors for the embed are randomly generated.

Code finished. Testing phase now. Using embeds for the body and QuickChart.io for generating the doughnut chart. Colors for the embed are randomly generated.
Author
Owner

Code works, updated backgroundColor for image graph due to default being transparent.

https://quickchart.io/documentation/

QuickChart's being used to generate graphs/charts, embeds help being Discord-native, so no external gems are needed.

Code works, updated backgroundColor for image graph due to default being transparent. https://quickchart.io/documentation/ QuickChart's being used to generate graphs/charts, embeds help being Discord-native, so no external gems are needed.
csxkdv moved this to Approved in FrugalityBot - Code on 2026-01-06 18:29:41 +01:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: csxkdv/FrugalityBot#7