kevinabrandon / AboveTustin

ADS-B Twitter Bot. Uses dump1090-mutability to track airplanes and then tweets whenever an airplane flies overhead.
MIT License
72 stars 21 forks source link

Trim and remove carriage returns from keys. #1

Closed jprochazka closed 7 years ago

jprochazka commented 7 years ago

When creating the key files I used echo to create the key files.

echo SOME_TWITTER_TOKEN_GOES_HERE > keys/token

Apparently doing so added a carriage return to the end of the file so when the file was read into the proper variable the carriage return ended up being part of the variables value. This was causing authentication problem when trying to authenticate with Twitter.

Anyways the additional lines trim the string then remove any carriage returns which may be present in the value. Please note these lines will only be needed temporarily until the point a configuration file storing such values has been added to the project.