Commit Graph

59 Commits

Author SHA1 Message Date
ekzyis bf95fba2dc Fix post error: 'title: must be at least 5 characters' 2024-03-17 21:26:59 +01:00
ekzyis 45d0376889 Add plot script 2024-03-14 04:09:38 +01:00
ekzyis 9d38176eab Save dupes to prevent retries 2024-03-14 03:00:43 +01:00
ekzyis 7e4744503f Store time series of HN data in SQLite3
This can be used in the future for better content curation and generating charts.

Currently, it still posts stories when they hit rank 1.
2024-03-13 13:41:04 +01:00
ekzyis c7e368ed2e Fix slice out of bounds error
Fixes following error:

  panic: runtime error: slice bounds out of range [:80] with length 53
2023-08-31 09:56:53 +02:00
ekzyis bd4c8fb4a9 Limit title to 80 chars 2023-08-30 16:16:53 +02:00
ekzyis ef9b948f0e Upgrade to sn-goapi v0.3.1 2023-08-30 16:13:31 +02:00
ekzyis e5688d8cc4 Fix invalid URL on Ask HN posts 2023-08-15 22:23:16 +02:00
ekzyis 88e2ff8b41 Add session keepAlive 2023-08-15 22:07:39 +02:00
ekzyis 7e892859c3 Better logging 2023-06-13 00:02:14 +02:00
ekzyis 1a02fe42c1 Use tech sub 2023-06-12 23:54:15 +02:00
ekzyis c40d61a6a8 Stop sending dupes error to discord 2023-06-09 06:02:55 +02:00
ekzyis 819905740a Update README 2023-06-08 23:26:22 +02:00
ekzyis e0b086c744 Upgrade to sn-goapi v0.1.1 2023-06-01 03:41:20 +02:00
ekzyis 9e057fca03 Use sn-goapi v0.1.0 2023-06-01 03:11:36 +02:00
ekzyis aaa89408d1 Query hasNewNotes and forward 2023-06-01 01:58:08 +02:00
ekzyis 64799bfa10 Fix GraphQL error handling 2023-05-11 23:37:48 +02:00
ekzyis 6cb901728a Add new required field 'sub' 2023-05-11 22:57:52 +02:00
ekzyis 2a9b7c6737 Wait until next full hour 2023-04-27 00:55:39 +02:00
ekzyis 5388480f31 Overhaul logging and error handling 2023-04-25 12:01:49 +02:00
ekzyis 85fa5997dd Set static vars outside of init 2023-04-25 02:30:04 +02:00
ekzyis e0866c8470 Fix duplicate user struct 2023-04-25 02:26:44 +02:00
ekzyis 12143f1296 Replace ItemID with int 2023-04-25 02:25:59 +02:00
ekzyis 26aa14c9a1 Merge branch '6-show-error-if-dupes-exist-and-add-option-to-override' into 'develop'
Resolve "Show error if dupes exist and add option to override"

Closes #6

See merge request ekzyis/hnbot!5
2023-04-25 00:25:22 +00:00
ekzyis c2b6e77751 Skip dupes check on skip reaction 2023-04-25 02:22:27 +02:00
ekzyis 8eaaaeab3e Rename var DiscordClient to dg 2023-04-25 02:01:58 +02:00
ekzyis b2b957e5c3 Replace webhook with discordgo 2023-04-25 02:00:48 +02:00
ekzyis 6010e47dde Show dupes in discord 2023-04-25 00:54:45 +02:00
ekzyis 75597bab8e Merge branch '2-post-curated-content' into 'develop'
Use discord to enable manual posting of HN links

Closes #2

See merge request ekzyis/hnbot!4
2023-04-19 23:19:42 +00:00
ekzyis 21872fe6ac Add discord bot to post manual HN links 2023-04-20 01:18:18 +02:00
ekzyis bc121ce87b Use infinite loop 2023-04-20 00:20:46 +02:00
ekzyis eac946690b go mod tidy 2023-04-20 00:20:32 +02:00
ekzyis 073924066b Merge branch '4-send-logs-to-discord-channel-for-monitoring-purposes' into 'develop'
Send SN posts as embeds to Discord

Closes #4

See merge request ekzyis/hnbot!3
2023-04-19 20:50:13 +00:00
ekzyis adff033c6b Send SN posts as embeds to Discord 2023-04-19 22:48:24 +02:00
ekzyis 82a380de0e Remove unused HN code 2023-04-19 21:14:03 +02:00
ekzyis 180fdece99 Remove HN comments 2023-04-18 22:47:50 +02:00
ekzyis c4d917bada Improve logging 2023-04-17 18:56:15 +02:00
ekzyis 62af7cb4b4 Merge branch '3-orange-pill-hn' into 'develop'
Resolve "Orange-pill HN"

Closes #3

See merge request ekzyis/hnbot!2
2023-04-17 01:02:16 +00:00
ekzyis 9f3b488d05 Notify OP on HN about claimable sats 2023-04-17 02:54:39 +02:00
ekzyis 0e47ca21fd Remove empty line 2023-04-17 00:41:46 +02:00
ekzyis 4f6314ab37 Add function to fetch SN user posts 2023-04-17 00:41:16 +02:00
ekzyis f853cb5050 Add function to comment HN story 2023-04-16 23:37:04 +02:00
ekzyis 7b841abf2f Fix SN API authorization 2023-04-16 22:03:14 +02:00
ekzyis c0e2078039 Add logging 2023-04-16 21:56:01 +02:00
ekzyis 8cc4b42094 Comment SN posts with HN info 2023-04-16 21:05:10 +02:00
ekzyis 56a33da94a Use consistent query indentation 2023-04-16 20:23:35 +02:00
ekzyis 5d2130b6f5 Rename functions 2023-04-16 19:56:42 +02:00
ekzyis 02a9e4e32f Use more vars 2023-04-16 19:51:17 +02:00
ekzyis 2f7214e9a0 Move SnApiToken check into sn.go 2023-04-16 19:49:38 +02:00
ekzyis e69128b822 Refactor common code for SN API 2023-04-16 19:09:33 +02:00