art-institute-of-chicago / aic-bash

A bash script to query our API for public domain artworks and render them as ASCII art
GNU Affero General Public License v3.0
153 stars 16 forks source link

Trims 6 more characters off front of input. #7

Open dylan-stark opened 2 years ago

dylan-stark commented 2 years ago

When I tried running the script I got a somewhat cryptic error message: syntax error (invalid integer constant (error token is "16#")). When I looked into it, the root issue was that INPUT still had a leading <pre> after the trimming on lines 370–372. This patch takes off an extra 6 characters to remove the <pre>. Everything seems to be working fine after that.

rjpcasalino commented 1 year ago

Nice, that worked for me. Thanks @dylan-stark. For curious folks, I ran this on nixos 22.11.20230219.0cf4274 (Raccoon) just using xterm

almereyda commented 2 months ago

When applying this patch in #9, I am now sometimes getting errors, such as:

/usr/src/app/./aic.sh: line 445: 16#style: value too great for base (error token is "16#style")
/usr/src/app/./aic.sh: line 453: 16#: invalid integer constant (error token is "16#")

Sometimes no image will appear.

Before the path, line 445 errored with:

/usr/src/app/./aic.sh: line 445: 16#: invalid integer constant (error token is "16#")
nikhiltri commented 2 months ago

Thanks for this PR! We'll take a look in the coming weeks.