I have a template column that generates a URL plus a joined list of paragraph entries. Sometimes the list gets long. I would like to limit the list, eg to 1000 characters. The URL generates a word cloud but doesn’t work when the string is too long.
I know this is straightforward in Google Sheets, but does anyone have a hack for doing it in a Glide App?
Thanks in advance.
I don’t think this is doable for now. Until we have a LEFT function then there’s no way we can identify the first 1000 characters of a string, or the 1000th character of a string to split it.
I’m surprised that you’re having this problem. I use the Word Cloud API in one of my apps, and I limit mine to 1000 words (not characters), so I’m probably sending strings of 5000-8000 characters. And I’ve never had a problem with it.
1 Like
Hi Darren,
Thanks for responding. I’m using this template to generate the URL:
https://quickchart.io/wordcloud?text=WORDS
Do you use something different? I read on their website about sending something called curls for longer lists, but I have no experience of those.
from: Word Cloud API
" Churchill’s speech
Now, let’s say we want to do a tag cloud of Churchill’s famous “we shall fight on the beaches” Dunkirk speech. This is a long speech that is too big to fit in a URL, so we will instead use a POST request to send the data.
Because I’m doing this on the command line, I’ll first create a file churchill.json
with the following JSON contents:
{ "format": "png", "width": 1000, "height": 1000, "fontFamily": "sans-serif", "fontScale": 15, "scale": "linear", "text": "<churchill's full speech...>"}
Then POST it to the API endpoint using curl
:
curl -X POST -H 'Content-Type: application/json' https://quickchart.io/wordcloud -d @churchill.json -o churchill.png"
Regards,
Simon.