Giter VIP home page Giter VIP logo

stonky's People

Contributors

antirez avatar flouthoc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stonky's Issues

Telegram API's json response differs between a DM and a watched channel

For a direct message to the bot, the message in the json payload is in a field called "message", but for a message posted to a watched channel, the message in the json payload is in a field called "channel_post". See the jq expressions below.

#chan_post.json is the json payload returned when a channel post is detected 
(36) bmcqueen-mn2:stonky bmcqueen$ cat chan_post.json  | jq .result[0].channel_post.text
"$dldld"

#dm_post.json is the json payload returned when a direct message to the bot is detected
(36) bmcqueen-mn2:stonky bmcqueen$ cat dm_post.json | jq .result[0].message.text
"$helpq"
(36) bmcqueen-mn2:stonky bmcqueen$ 

PR incoming

Error compiling on raspberry 3B

Hello!

I'm really enjoying the project!
I tried to compile the stonky on Pi3 B and had some problems:

Hardware/OS:

Raspberry Pi 3 Model B Rev 1.2
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
armv7l 

Error

cc -g -ggdb -O2 -Wall -W -std=c11 \
	canvas.c cJSON.c sds.c stonky.c \
	-o stonky -lpthread -lcurl -lsqlite3
/usr/bin/ld: /tmp/cc9jGxHR.o: in function `fortuneThread':
/home/stonky/stonky/stonky.c:3058: undefined reference to `__atomic_load_8'
/usr/bin/ld: /home/stonky/stonky/stonky.c:3059: undefined reference to `__atomic_load_8'
/usr/bin/ld: /tmp/cc9jGxHR.o: in function `cvThread':
/home/stonky/stonky/stonky.c:2874: undefined reference to `__atomic_store_8'
/usr/bin/ld: /tmp/cc9jGxHR.o: in function `botHandleShowPortfolioRequest':
/home/stonky/stonky/stonky.c:2250: undefined reference to `__atomic_load_8'
/usr/bin/ld: /home/stonky/stonky/stonky.c:2251: undefined reference to `__atomic_load_8'
/usr/bin/ld: /tmp/cc9jGxHR.o: in function `botHandleShowProfitLossRequest':
/home/stonky/stonky/stonky.c:2402: undefined reference to `__atomic_load_8'
/usr/bin/ld: /tmp/cc9jGxHR.o: in function `botUpdateActiveChannels':
/home/stonky/stonky/stonky.c:2586: undefined reference to `__atomic_load_8'
/usr/bin/ld: /home/stonky/stonky/stonky.c:2589: undefined reference to `__atomic_store_8'
/usr/bin/ld: /home/stonky/stonky/stonky.c:2594: undefined reference to `__atomic_store_8'
/usr/bin/ld: /home/stonky/stonky/stonky.c:2595: undefined reference to `__atomic_store_8'
/usr/bin/ld: /tmp/cc9jGxHR.o: in function `broadcastBigMovers':
/home/stonky/stonky/stonky.c:2957: undefined reference to `__atomic_load_8'
collect2: error: ld returned 1 exit status
make: *** [Makefile:4: stonky] Error 1```

Possible solution

I managed to solve the problem by installing:

apt install libatomic-ops-dev

And adding the flag to the compilation:

-latomic

Thanks!

Fatal Error No such file or directory

I have cloned the code and when i try to run make command i'm getting below error

cc -g -ggdb -O2 -Wall -W -std=c11
canvas.c cJSON.c sds.c stonky.c
-o stonky -lpthread -lcurl -lsqlite3
stonky.c:46:10: fatal error: curl/curl.h: No such file or directory
#include <curl/curl.h>
^~~~~~~~~~~~~
compilation terminated.
Makefile:4: recipe for target 'stonky' failed
make: *** [stonky] Error 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.