Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the language #60

Open
niyazaki opened this issue Aug 3, 2021 · 5 comments
Open

Change the language #60

niyazaki opened this issue Aug 3, 2021 · 5 comments

Comments

@niyazaki
Copy link

niyazaki commented Aug 3, 2021

Hello,
I find this project amazing. I would love to contribute and give a ton of inspirational messages.
I think there's two options to resolve this :

  • add language option in the API
  • add the option to use a CSV/JSON/... File to get the messages

Thank you !

@gelbal
Copy link
Contributor

gelbal commented Aug 26, 2021

Hey @niyazaki Pull Requests are most welcome 😄

I'll appreciate having that CSV option as well. I gifted an inkyshot to my parents and I'd love the inkyshot to rotate pre-selected quotes (family anecdotes).

@niyazaki
Copy link
Author

Agreed, the CSV is the more versatile answer to this problem. Gonna have a look at your code.

@niyazaki
Copy link
Author

For the language part, I searched a bit and found maybe an API for French citations: https://citations.ouest-france.fr/
But it seems like nobody ever used their API or not for a long time because it's kinda broken. I've sent them an e-mail, I'll keep you in touch and make a Pull Request with this whenever I have time and if they respond/I find another API.

For the CSV part there are two options again :

As I said, I never integrated anything with Balena, so my Pull Request may be a little bit buggy. Plus I don't have any Raspberry Pi to test it. So if you give me a hand @gelbal and correct it, it may be a quick win for everyone.

Pull request is coming. Also, as the CSV file may be of variable length, I plan something based on a randomized variable put in Balena parameter thing. You may have to double-check this (my guess is that I have to announce/declare the variable somewhere in the deploy part but I have no idea or time to look further for this issue).

niyazaki added a commit to niyazaki/inkyshot that referenced this issue Mar 12, 2022
Connects-to: balena-io-experimental#60
Change-type: minor
Signed-off-by: Kassabeh Zakariya <zakariya.kassabeh@gmail.com>
@niyazaki niyazaki mentioned this issue Mar 12, 2022
niyazaki referenced this issue in niyazaki/inkyshot Mar 12, 2022
@niyazaki
Copy link
Author

Here is the pull request :).

Based on https://forums.balena.io/t/maximum-length-of-application-environmental-variables/243168/18 variables may be up to 1MB so I created a CSV_MESSAGE variable.

As already said I'm new to this whole Balena universe and I've read a bit of documentation in order to simplify the work of testing this because I cannot do it myself for technical reasons.

Hope this gets added to the main project in order to help people.

@gelbal thank you in advance for the review.

@niyazaki
Copy link
Author

For the CSV part there are two options again :

PS : Finaly, I did (or at least tried) both

ghost pushed a commit that referenced this issue Oct 21, 2022
Connects-to: #60
Change-type: minor
Signed-off-by: Kassabeh Zakariya <zakariya.kassabeh@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants