XpownX 8 Posted February 5, 2019 Report Share Posted February 5, 2019 Hi I need to create a bot that saves images( .jpg, size about 7kb ) inside a csv table. Is this possible with ubot studio, if yes how? Thanks Quote Link to post Share on other sites
HelloInsomnia 1103 Posted February 5, 2019 Report Share Posted February 5, 2019 I would store the path to the image, you could also do base64 but that would be a super long string. I've never seen an image in a CSV before, generally, you can open CSV files in a text editor. Quote Link to post Share on other sites
XpownX 8 Posted February 6, 2019 Author Report Share Posted February 6, 2019 I would store the path to the image, you could also do base64 but that would be a super long string. I've never seen an image in a CSV before, generally, you can open CSV files in a text editor. But the main problem is that I need images in the CSV file because I need to print that Quote Link to post Share on other sites
HelloInsomnia 1103 Posted February 6, 2019 Report Share Posted February 6, 2019 But the main problem is that I need images in the CSV file because I need to print that I would probably try to make it into a PDF. Off the top of my head I think you could possibly build an HTML table which would be just like using a CSV format with the rows and columns, and then convert the HTML file to a PDF file and print it. Quote Link to post Share on other sites
XpownX 8 Posted February 6, 2019 Author Report Share Posted February 6, 2019 I would probably try to make it into a PDF. Off the top of my head I think you could possibly build an HTML table which would be just like using a CSV format with the rows and columns, and then convert the HTML file to a PDF file and print it. With which ubot studio command I can create HTML and convert it into PDF?I like your solution! Quote Link to post Share on other sites
HelloInsomnia 1103 Posted February 7, 2019 Report Share Posted February 7, 2019 With which ubot studio command I can create HTML and convert it into PDF?I like your solution! You can use the $html from table function to convert a table to html, but you will have to do something about the images. You could maybe replace them with a regular expression that looks for a url or file path and then puts that in an image tag. Or maybe make your own table to html converter which may be the way to go. Then just find some conversion site like this one: https://html2pdf.com/ Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.