Code Monkey home page Code Monkey logo

neonmodem's Introduction

OPEN SOURCE PROJECTS

  • Neon Modem Overdrive: BBS-style command line client that supports Discourse, Lemmy, Lobsters and Hacker News
  • Superhighway84: Usenet-inspired, uncensorable, decentralized internet discussion system running on IPFS & OrbitDB
  • Planor: The Cloud Aviator: TUI client for cloud services (AWS, Vultr, Heroku, Render.com, Fleek, ...)
    • go-fleek: Tiny Go client library for the Fleek API
    • go-render: Tiny Go client library for the Render.com API
  • Journalist: An RSS aggregator a.k.a. "self-hosted Feedly"
    • Canard: A TUI client for the Journalist RSS aggregator
  • Overpush: A self-hosted, drop-in replacement for Pushover, that uses XMPP as delivery method and offers the same API for submitting messages
  • xbsapi: Alternative xBrowserSync API that is a single binary and supports SQLite3, PostgreSQL and MySQL
    • xbscli: Command line interface for xbsapi and the official xBrowserSync API
  • Kiwi: Pimoroni Keybow based Macro Pad (a.k.a. poor-man's Elgato Stream Deck)
  • Cloudcash: Check your cloud spending from the CLI, from Waybar, and from the macOS menu bar!
  • Gomphotherium: A TUI client for the Fediverse / Mastodon / Pleroma
  • Paperwork [dead]: OpenSource note-taking & archiving alternative to Evernote, Microsoft OneNote & Google Keep

Handy Tools

  • wth: WTH (aka What The Heck) is the better personal information dashboard for your terminal
  • addrb: A lightweight CLI / TUI address book that supports CardDAV
  • caldr: A lightweight CLI / TUI calendar that supports CalDAV
  • reader: A minimal command line reader offering better readability of web pages on the CLI
  • zeit: A CLI time-tracking tool compatible with the macOS/iOS Tyme format
  • geld: A CLI budget-tracking tool, compatible with your bank's CSV exports
  • conclusive: A CLI client for Plausible Analytics with nice ASCII graphs
  • mercator: OpenStreetMap but as terminal user interface (TUI) program
  • cexec: Execute any command, cache its output and get cached output on subsequent execution
  • shell-time: Shell Time is for your shell, what Screen Time is for your phone!
  • bookmarkdown: A super lightweight tool for accessing links from a markdown file
  • pushover-to-xmpp: Tiny Pushover to XMPP bridge written in Go

Contributions

SETUP

JOURNAL

Latest posts

Read it at https://xn--gckvb8fzb.com!
That's punycode for https://マリウス.com.

LET'S TEAM UP

Want to work on cool things, whether it's open source projects, an idea for a startup or commercial projects?
Reach out!

mail: [email protected]
gpg: 4D38 99AF 73E7 F5FE 9B39 C822 272E D814 BF63 261F

xmpp: [email protected]
omemo: 1549F16C 5A534B99 A2403CF2 362CD53D 3240814B 4401D5EC 58BF1B18 4A829F54

More contact options

SUPPORT

If you like the work I do and would like to support it I'd appreciate contributions via Monero, Bitcoin and Ethereum to the following addresses:

Monero Bitcoin Lightning Ethereum
47xsk5muV3VURKJLRqq39sHDS1XPbkY5cddvBeFBnSheRLk9ZPUxSsQJDU4hdbEnsBYSczoaKimwbWLdE9435AsSSqUGo2y mrus@getalby.com bc1qedycy4xwcdlql0ku9c55z0fq4uuxvw470nxspp 0xcf29d9a44b151081c94f9c49152f4b90d5df6b4a
47xsk5muV3VURKJLRqq39sHDS1XPbkY5cddvBeFBn SheRLk9ZPUxSsQJDU4hdbEnsBYSczoaK imwbWLdE9435AsSSqUGo2y bc1qedycy4xwcdlql0ku9c55z0fq4uuxvw470nxspp                    [email protected]                        0xcf29d9a44b151081c94f9c49152f4b90d5df6b4a
(remove whitespaces when copy-pasting XMR address!)

If you don't have XMR, BTC or ETH, and would like to contribute via any other cryptocurrency, you can use the following services:

neonmodem's People

Contributors

0323pin avatar dan-m8t avatar dependabot[bot] avatar dorii avatar flaviu-toader avatar greenfoo avatar monokrome avatar mrusme avatar tedwardd avatar tydavis 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

neonmodem's Issues

[Discourse] IPFS works, Caddy does not. Why?

Hello!

First off: I am so down with this synthwave branding, I love it! :D

Now, after getting the bin, I configured three sources:

  • discuss.ipfs.tech (Discourse)
  • caddy.community (Discourse)
  • drachennetz.com (Lemmy)

The Lemmy instance doesnt work either - but that is already in #23 .

The IPFS community works flawlessly - but the Caddy one, doe snot:

{"level":"error","ts":1686839701.429568,"caller":"aggregator/aggregator.go:77","msg":"aggregator error: json: cannot unmarshal bool into Go struct field CategoryModel.category_list.categories.sort_ascending of type string\n","stacktrace":"github.com/mrusme/neonmodem/aggregator.(*Aggregator).ListPosts\n\t/home/runner/work/neonmodem/neonmodem/aggregator/aggregator.go:77\ngithub.com/mrusme/neonmodem/ui/views/posts.(*Model).refresh.func1\n\t/home/runner/work/neonmodem/neonmodem/ui/views/posts/posts.go:206\ngithub.com/charmbracelet/bubbletea.(*Program).handleCommands.func1.1\n\t/home/runner/g║                                                                                                                                                                                                    ║                                                                 {"level":"error","ts":1686839701.430567,"caller":"posts/posts.go:209","msg":"[<nil> <nil> json: cannot unmarshal bool into Go struct ║   q quit • ? more                                                                                                                                                                                  ║ui/views/posts/posts.go:209\ngithub.com/charmbracelet/bubbletea.(*Program).handleCommands.func1.1\n\t/home/runner/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:247"}

The output was quite butchered in the view, so here is a screenshot:

image

Got any ideas for this?

Thanks and kind regards!

Unable to render composite windows

Terminal: Kitty version 0.26.5

It works fine in tmux, but when I run neonmodem without tmux, the pop-up windows get really messed up.

I installed it by cloning the repo, then cd into the repo and run make. Then moved the binary to /usr/local/bin. I'm only using the hackernews backend.

Kitty:
kitty-screenshot

Tmux + Kitty:
tmxu-screenshot

[Lemmy][Bug] Cannot unmarshal string into Go struct field

Configuring Neon Modem to connect to https://lemmy.sdf.org results in a blank feed. The following error logs are found in ~/.cache/neonmodem.log

{"level":"error","ts":1686705601.7717443,"caller":"aggregator/aggregator.go:77","msg":"aggregator error: json: cannot unmarshal string into Go struct field PostView.posts.subscribed of type bool\n","stacktrace":"github.com/mrusme/neonmodem/aggregator.(*Aggregator).ListPosts\n\t/home/runner/work/neonmodem/neonmodem/aggregator/aggregator.go:77\ngithub.com/mrusme/neonmodem/ui/views/posts.(*Model).refresh.func1\n\t/home/runner/work/neonmodem/neonmodem/ui/views/posts/posts.go:206\ngithub.com/charmbracelet/bubbletea.(*Program).handleCommands.func1.1\n\t/home/runner/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:247"}
{"level":"error","ts":1686705601.7717974,"caller":"posts/posts.go:209","msg":"[json: cannot unmarshal string into Go struct field PostView.posts.subscribed of type bool]","stacktrace":"github.com/mrusme/neonmodem/ui/views/posts.(*Model).refresh.func1\n\t/home/runner/work/neonmodem/neonmodem/ui/views/posts/posts.go:209\ngithub.com/charmbracelet/bubbletea.(*Program).handleCommands.func1.1\n\t/home/runner/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:247"}
{"level":"error","ts":1686705602.1112926,"caller":"aggregator/aggregator.go:77","msg":"aggregator error: json: cannot unmarshal string into Go struct field PostView.posts.subscribed of type bool\n","stacktrace":"github.com/mrusme/neonmodem/aggregator.(*Aggregator).ListPosts\n\t/home/runner/work/neonmodem/neonmodem/aggregator/aggregator.go:77\ngithub.com/mrusme/neonmodem/ui/views/posts.(*Model).refresh.func1\n\t/home/runner/work/neonmodem/neonmodem/ui/views/posts/posts.go:206\ngithub.com/charmbracelet/bubbletea.(*Program).handleCommands.func1.1\n\t/home/runner/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:247"}
{"level":"error","ts":1686705602.1114051,"caller":"posts/posts.go:209","msg":"[json: cannot unmarshal string into Go struct field PostView.posts.subscribed of type bool]","stacktrace":"github.com/mrusme/neonmodem/ui/views/posts.(*Model).refresh.func1\n\t/home/runner/work/neonmodem/neonmodem/ui/views/posts/posts.go:209\ngithub.com/charmbracelet/bubbletea.(*Program).handleCommands.func1.1\n\t/home/runner/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:247"}

400 Bad Request: missing_totp_token

Morning my good devs,

I have just downloaded the latest Mac arm64 build and connected it to my lemmy instance (https://lemmy.horwood.cloud/), but on starting neonmodem I get an error.

panic: Error(s) loading system(s)

goroutine 1 [running]:
github.com/mrusme/neonmodem/cmd.glob..func1(0x101edd0c0?, {0x1014b7db4?, 0x1?, 0x1?})
	/home/runner/work/neonmodem/neonmodem/cmd/root.go:128 +0x1ec
github.com/spf13/cobra.(*Command).execute(0x101edd0c0, {0x1400001e050, 0x1, 0x1})
	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:944 +0x5b0
github.com/spf13/cobra.(*Command).ExecuteC(0x101edd0c0)
	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1068 +0x35c
github.com/spf13/cobra.(*Command).Execute(...)
	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:992
github.com/mrusme/neonmodem/cmd.Execute(0x1018206e0?)
	/home/runner/work/neonmodem/neonmodem/cmd/root.go:141 +0x58
main.main()
	/home/runner/work/neonmodem/neonmodem/neonmodem.go:13 +0x24

running with debug is the same, but a quick look in the logs show this is a login issue.

{"level":"error","ts":1688973078.467069,"caller":"cmd/root.go:97","msg":"error loading system: 400 Bad Request: missing_totp_token","stacktrace":"github.com/mrusme/neonmodem/cmd.loadSystems\n\t/home/runner/work/neonmodem/neonmodem/cmd/root.go:97\ngithub.com/mrusme/neonmodem/cmd.glob..func1\n\t/home/runner/work/neonmodem/neonmodem/cmd/root.go:123\ngithub.com/spf13/cobra.(*Command).execute\n\t/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:944\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1068\ngithub.com/spf13/cobra.(*Command).Execute\n\t/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:992\ngithub.com/mrusme/neonmodem/cmd.Execute\n\t/home/runner/work/neonmodem/neonmodem/cmd/root.go:141\nmain.main\n\t/home/runner/work/neonmodem/neonmodem/neonmodem.go:13\nruntime.main\n\t/opt/hostedtoolcache/go/1.19.10/x64/src/runtime/proc.go:250"}
{"level":"error","ts":1688973078.467602,"caller":"cmd/root.go:126","msg":"400 Bad Request: missing_totp_token","stacktrace":"github.com/mrusme/neonmodem/cmd.glob..func1\n\t/home/runner/work/neonmodem/neonmodem/cmd/root.go:126\ngithub.com/spf13/cobra.(*Command).execute\n\t/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:944\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1068\ngithub.com/spf13/cobra.(*Command).Execute\n\t/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:992\ngithub.com/mrusme/neonmodem/cmd.Execute\n\t/home/runner/work/neonmodem/neonmodem/cmd/root.go:141\nmain.main\n\t/home/runner/work/neonmodem/neonmodem/neonmodem.go:13\nruntime.main\n\t/opt/hostedtoolcache/go/1.19.10/x64/src/runtime/proc.go:250"}
{"level":"error","ts":1688973129.346163,"caller":"cmd/root.go:97","msg":"error loading system: 400 Bad Request: missing_totp_token","stacktrace":"github.com/mrusme/neonmodem/cmd.loadSystems\n\t/home/runner/work/neonmodem/neonmodem/cmd/root.go:97\ngithub.com/mrusme/neonmodem/cmd.glob..func1\n\t/home/runner/work/neonmodem/neonmodem/cmd/root.go:123\ngithub.com/spf13/cobra.(*Command).execute\n\t/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:944\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1068\ngithub.com/spf13/cobra.(*Command).Execute\n\t/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:992\ngithub.com/mrusme/neonmodem/cmd.Execute\n\t/home/runner/work/neonmodem/neonmodem/cmd/root.go:141\nmain.main\n\t/home/runner/work/neonmodem/neonmodem/neonmodem.go:13\nruntime.main\n\t/opt/hostedtoolcache/go/1.19.10/x64/src/runtime/proc.go:250"}
{"level":"error","ts":1688973129.346896,"caller":"cmd/root.go:126","msg":"400 Bad Request: missing_totp_token","stacktrace":"github.com/mrusme/neonmodem/cmd.glob..func1\n\t/home/runner/work/neonmodem/neonmodem/cmd/root.go:126\ngithub.com/spf13/cobra.(*Command).execute\n\t/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:944\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1068\ngithub.com/spf13/cobra.(*Command).Execute\n\t/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:992\ngithub.com/mrusme/neonmodem/cmd.Execute\n\t/home/runner/work/neonmodem/neonmodem/cmd/root.go:141\nmain.main\n\t/home/runner/work/neonmodem/neonmodem/neonmodem.go:13\nruntime.main\n\t/opt/hostedtoolcache/go/1.19.10/x64/src/runtime/proc.go:250"}
2023-07-10T08:12:36.739+0100    DEBUG   cmd/root.go:93  loading system of type lemmy ...
2023-07-10T08:12:37.224+0100    ERROR   cmd/root.go:97  error loading system: 400 Bad Request: missing_totp_token
github.com/mrusme/neonmodem/cmd.loadSystems
    /home/runner/work/neonmodem/neonmodem/cmd/root.go:97
github.com/mrusme/neonmodem/cmd.glob..func1
    /home/runner/work/neonmodem/neonmodem/cmd/root.go:123
github.com/spf13/cobra.(*Command).execute
    /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:944
github.com/spf13/cobra.(*Command).ExecuteC
    /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1068
github.com/spf13/cobra.(*Command).Execute
    /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:992
github.com/mrusme/neonmodem/cmd.Execute
    /home/runner/work/neonmodem/neonmodem/cmd/root.go:141
main.main
    /home/runner/work/neonmodem/neonmodem/neonmodem.go:13
runtime.main
    /opt/hostedtoolcache/go/1.19.10/x64/src/runtime/proc.go:250
2023-07-10T08:12:37.224+0100    ERROR   cmd/root.go:126 400 Bad Request: missing_totp_token
github.com/mrusme/neonmodem/cmd.glob..func1
    /home/runner/work/neonmodem/neonmodem/cmd/root.go:126
github.com/spf13/cobra.(*Command).execute
    /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:944
github.com/spf13/cobra.(*Command).ExecuteC
    /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1068
github.com/spf13/cobra.(*Command).Execute
    /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:992
github.com/mrusme/neonmodem/cmd.Execute
    /home/runner/work/neonmodem/neonmodem/cmd/root.go:141
main.main
    /home/runner/work/neonmodem/neonmodem/neonmodem.go:13
runtime.main
    /opt/hostedtoolcache/go/1.19.10/x64/src/runtime/proc.go:250

Add proxy configuration

Neon Modem should support proxies, so that it could be connected to services running in Tor, I2P, etc.

Add attachment upload

Systems should offer attachment uploads for new posts and replies, so that e.g. images will be uploaded and embedded/linked seamlessly.

TODO

  • [Discourse] Implement Uploads API
  • [*] Implement pouplar file upload service API (ImgUr? Better something OSS/self-hosted?)
  • Build (or use?) UI for file picking and integrate into new post/reply dialog window

[Discourse] "Infinite scroll" for post replies

The Discourse system needs to have an "infinite scroll" feature that automatically loads the next chunk of replies when viewport is close to the edge of the currently loaded replies. Unlike regular "infinite scroll" that loads later content below, this feature should go the other way, load the latest 10 replies and only when the user presses up/k the viewport should load the previous chunk of replies above the already loaded ones. In most cases users are probably more interested in the latest replies rather than historic ones.

loadSystems crashes with wrong Lemmy password

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x80 pc=0x563d981d6ad1]

goroutine 1 [running]:
github.com/mrusme/neonmodem/cmd.loadSystems(0xc000456000)
github.com/mrusme/neonmodem/cmd/root.go:98 +0xf1
github.com/mrusme/neonmodem/cmd.glob..func1(0x563d98b4a1c0?, {0x563d981dbc8c?, 0x0?, 0x0?})
github.com/mrusme/neonmodem/cmd/root.go:115 +0xdc
github.com/spf13/cobra.(*Command).execute(0x563d98b4a1c0, {0xc000024240, 0x0, 0x0})
github.com/spf13/[email protected]/command.go:920 +0x847
github.com/spf13/cobra.(*Command).ExecuteC(0x563d98b4a1c0)
github.com/spf13/[email protected]/command.go:1044 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
github.com/spf13/[email protected]/command.go:968
github.com/mrusme/neonmodem/cmd.Execute(0xc0000061a0?)
github.com/mrusme/neonmodem/cmd/root.go:127 +0x3e
main.main()
github.com/mrusme/neonmodem/neonmodem.go:13 +0x25

can find the file to try to figure out what its not working.. Any ideas?

Connecting new Discourse systems results in 500 Internal Server Errors

Hi, thanks for making a this tool - love the design and UI! I am trying to connect different Discourse systems but every single one is giving an

Oops
The software powering this discussion forum encountered an unexpected problem. We apologize for the inconvenience.

response. I've tried with 3 different Discourse implementations, such as

neonmodem connect --type discourse --url https://community.openstreetmap.org
neonmodem connect --type discourse --url https://discourse.nixos.org
neonmodem connect --type discourse --url https://discourse.pollination.cloud

This definitely seems like an upstream problem, because several other implementations , such as

all have the same problem. But, I found this Observable notebook that does work, oddly enough. It's using node-forge for the PKI; not sure if that's relevant.

Again, this definitely seems like a Discourse problem, but I just wanted to flag it here in case something obvious stands out.

Local caching

At some point it might make sense to implement a local cache of posts and replies to improve loading times over slow connections.

TODO

  • #11
  • Store posts/replies in local storage
  • Load posts/replies from local storage
  • Refresh cached data based on API cache-control/etag/etc.

Integrate keyring

Right now this app saves user credentials in clear text in the toml config. Needless to say this is not safe. I'm not familiar with the go package ecosystem so I don't know what to recommend but I'm certain something like keyring for python exists for handling secrets in go.

sixel support?

love this app, it's amazing! thought I'd drop a suggustion with images to use sixel? it's growing in support and works really well I've found with other terminal applications.

Lightweight local storage

It makes sense to have a local storage for all sorts of data (state, cache, etc). Ideally it should be something super lightweight (lighter than sqlite3) that's at laest a K/V store.

Typing 'n' character while entering filter text opens the new post dialog

While entering the text for a filter, e.g. if I wanted to look for posts with new in the title, as soon as I type the n character, the dialog for creating a new post opens.

The filter searching is case-insensitive, so this issue can be worked around by typing capital N instead of n, and entry of the filter text can continue.

Content blacklist

It should be possible to blacklist terms/forums/users. The blacklist should allow using e.g. RegEx .*twitter.*, or a script language (Lua?), or an external command to decied whether a post should be displayed or not. This way users can remove topics they're not interested in from either source.

[Lemmy] Neonmodem won't show any posts on lemmy.world or feddit.de

Affected Version: neonmodem_1.0.4_linux_amd64
Affected System: Debian Bookworm amd64
Steps to reproduce:

  • I downloaded neonmodem_1.0.4_linux_amd64.tar.gz and unpacked it in /usr/local/bin
  • I connected neonmodem with neonmodem connect --type lemmy --url https://lemmy.world
  • I entered my username and password and verified they're correct in the config file
  • I launched it with neonmodem
  • Neonmodem launches but doesn't show any posts
  • Same result when connecting to feddit.de instance
  • debug log attached

neonmodem.log

I suspect this has to do with the newest lemmy version v0.19.3, since the same bug is mentioned in issue #58 from April, but none prior to that.

[Hackernews][Bug] Unable to add Hackernews in HEAD

$ ./neonmodem connect --type hackernews
panic: interface conversion: interface {} is nil, not string
[...]

system/hackernews/hackernews.goL#106 does not work as intended. I've spent some time trying to identify the issue but unfortunately my knowledge of go interfaces is limited so I was unable to determine what the actual values of sys.config were or where those values were coming from. It behaves as though it's not reading in what is expected and is empty which causes the type assertion to fail.

To confirm this, I applied the following changes to system/hackernews/hackernews.go which confirms that sys.config["proxy"] is indeed nil.

diff --git a/system/hackernews/hackernews.go b/system/hackernews/hackernews.go
index cf7068e..d80a4d3 100644
--- a/system/hackernews/hackernews.go
+++ b/system/hackernews/hackernews.go
@@ -103,7 +103,13 @@ func (sys *System) Load() error {
        var httpTransport *http.Transport = http.DefaultTransport.(*http.Transport).
                Clone()

-       proxy := sys.config["proxy"].(string)
+       var proxy string
+
+       if sys.config["proxy"] != nil {
+               proxy = sys.config["proxy"].(string)
+       } else {
+               proxy = ""
+       }
        if proxy != "" {
                proxyURL, err := url.Parse(proxy)
                if err != nil {

External editor

While the Bubble Tea textarea is great for quickly hacking in a response to a post, for more longform things it would be better to allow launching the external $EDITOR the way Superhighway84 has done it ever since.

The idea is to provide a shortcut for the new post/reply dialog window (e.g. ctrl+o) that would...

  • ... create a temporary text file under $TMP
  • launch $EDITOR with that temporary file in the foreground
  • Read in the temporary file on re-activation and write its contents in the textarea

Allow `n` in post view

Allow to press n in post view to create a new post in the current post's system/forum.

Lemmy ListPosts results limited to 50

Lemmy post results are limited to 50 which results in a lot of empty communities (forums) when you have many subscriptions.
Probably need to split the go request in system/lemmy/lemmy.go func ListPosts into multiple requests, bumping the limit number directly will not succeed, but not experienced enough to do this myself.

[Hacker News] Implement reply/new post

It should be possible to connect to the Hacker News system with a user, to create new posts and comment on existing ones.

TODO

  • Figure out how the authentication/posting on Lobsters looks like
  • Implement into API client

panic: Error(s) loading system(s) → crash → stackdump

$ torsocks neonmodem connect --type lemmy --url https://links.hackliberty.org
Please enter your username or email: bruceleerabbit
Please enter your password (will not echo):
Successfully added new connection!
$ torsocks neonmodem
panic: Error(s) loading system(s)

goroutine 1 [running]:
github.com/mrusme/neonmodem/cmd.glob..func1(0x1771140?, {0xe973eb?, 0x0?, 0x0?})
        /home/runner/work/neonmodem/neonmodem/cmd/root.go:128 +0x268
github.com/spf13/cobra.(*Command).execute(0x1771140, {0xc000022240, 0x0, 0x0})
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:944 +0x847
github.com/spf13/cobra.(*Command).ExecuteC(0x1771140)
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1068 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:992
github.com/mrusme/neonmodem/cmd.Execute(0xc0000061a0?)
        /home/runner/work/neonmodem/neonmodem/cmd/root.go:141 +0x3e
main.main()
        /home/runner/work/neonmodem/neonmodem/neonmodem.go:13 +0x25

Followed this for the undocumented proxy guidance:

#1

By editing the config file (in case torsocks is the problem), e.g.:

sed -i -e "/proxy =/Is@''@'http://localhost:1881'@" ~/.config/neonmodem.toml
$ neonmodem
panic: Error(s) loading system(s)

goroutine 1 [running]:
github.com/mrusme/neonmodem/cmd.glob..func1(0x1771140?, {0xe973eb?, 0x0?, 0x0?})
        /home/runner/work/neonmodem/neonmodem/cmd/root.go:128 +0x268
github.com/spf13/cobra.(*Command).execute(0x1771140, {0xc000022240, 0x0, 0x0})
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:944 +0x847
github.com/spf13/cobra.(*Command).ExecuteC(0x1771140)
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1068 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:992
github.com/mrusme/neonmodem/cmd.Execute(0xc0000061a0?)
        /home/runner/work/neonmodem/neonmodem/cmd/root.go:141 +0x3e
main.main()
        /home/runner/work/neonmodem/neonmodem/neonmodem.go:13 +0x25

Not sure why there are github references in that stack dump. I know nothing about go but it irks me to make any connection to MS servers or to have any dependency on MS. If there’s any way to get a full complete copy of the software, free and clear from MS/Google/Facebook/Amazon/Cloudflare and similar junk entities, that would be plan A.

[Enhancement] Allow alternate feed sorting

Right now neonmodem sorts by "new". This is fine, and probably necessary when viewing multiple systems at once, but it would be nice if we could detect (or hard code) the available sorting options and allow the use of them when viewing a specific system.

Correctly handle incorrect system URLs

Hi, I'm a bit of a noob and I can't seem to get neonmodem working - neither by using the binary nor by building it myself. I'd appreciate any help!

OS: Pop!_OS 22.04 LTS
KERNEL: Linux pop-os 6.2.6-76060206-generic #202303130630~1685473338~22.04~995127e SMP PREEMPT_DYNAMIC Tue M x86_64 x86_64 x86_64 GNU/Linux

I've installed the latest stable Go to /usr/local/go after finding the upstream Go packages for my distro are too old.

The make command builds the binary successfully without error.

After building from Source:

~/Documents/dev/neonmodem$ ./neonmodem 
panic: Error(s) loading system(s)

goroutine 1 [running]:
github.com/mrusme/neonmodem/cmd.glob..func1(0x1781720?, {0xeae714?, 0x0?, 0x0?})
	/home/user/Documents/dev/neonmodem/cmd/root.go:128 +0x267
github.com/spf13/cobra.(*Command).execute(0x1781720, {0xc000098200, 0x0, 0x0})
	/home/user/go/pkg/mod/github.com/spf13/[email protected]/command.go:944 +0x847
github.com/spf13/cobra.(*Command).ExecuteC(0x1781720)
	/home/user/go/pkg/mod/github.com/spf13/[email protected]/command.go:1068 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
	/home/user/go/pkg/mod/github.com/spf13/[email protected]/command.go:992
github.com/mrusme/neonmodem/cmd.Execute(0xc0000061a0?)
	/home/user/Documents/dev/neonmodem/cmd/root.go:141 +0x3e
main.main()
	/home/user/Documents/dev/neonmodem/neonmodem.go:13 +0x25

Attempting to use Binary:

~/bin$ neonmodem 
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x80 pc=0xd45616]

goroutine 1 [running]:
github.com/mrusme/neonmodem/cmd.loadSystems(0xc000454780)
	/home/runner/work/neonmodem/neonmodem/cmd/root.go:105 +0xb6
github.com/mrusme/neonmodem/cmd.glob..func1(0x1770140?, {0xe9628b?, 0x0?, 0x0?})
	/home/runner/work/neonmodem/neonmodem/cmd/root.go:122 +0xdc
github.com/spf13/cobra.(*Command).execute(0x1770140, {0xc000022230, 0x0, 0x0})
	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:944 +0x847
github.com/spf13/cobra.(*Command).ExecuteC(0x1770140)
	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1068 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:992
github.com/mrusme/neonmodem/cmd.Execute(0xc0000061a0?)
	/home/runner/work/neonmodem/neonmodem/cmd/root.go:134 +0x3e
main.main()
	/home/runner/work/neonmodem/neonmodem/neonmodem.go:13 +0x25

Add `print` feature

Allow to print a whole post (including replies), e.g. to a text file or even to a device (e.g. /dev/lp).

Typing "q" while replying closes the reply prompt

After pressing "r" to reply, if I type anything with the letter "q" in it, it closes the reply prompt. (lemmy)

My system:
Kernel: Linux 5.19.0-46-generic
Distro: KDE Neon 5.27 x86_64
Terminal : konsole
Shell: Bash 5.1.16

Make sure directories exist

neonmodem just exits loudly if $HOME/.config (for connect) or $HOME/.cache (always) do not exist.
I think it should create the directories if it needs them.

light mode

The colors by default seem to be for a white-on-black terminal - on a black-on-white one, the headers for entries are basically invisible.
The default generated config has light/dark mode settings, but I didn't see anything in README.md nor neonmodem --help to select light mode.
So is light mode already available? Please document it.
Thanks!

[Lobsers] Implement reply/new post

It should be possible to connect to Lobsters systems with a user, to create new posts and comment on existing ones.

TODO

  • Figure out how the authentication/posting on Lobsters looks like
  • Implement into API client

Lemmy errors

Hello, very cool program thank you!
I saw it on the list of lemmy programs and was looking for a TUI or similar and saw this project and was fast to check if arch AUR had it, and it does, the issue is that after I run neonmodem connect .... and enter my credentials I open neonmodem and nothing happens.. in the logs Isee this:

{"level":"error","ts":1713144564.9067852,"caller":"aggregator/aggregator.go:77","msg":"aggregator error: parsing time \"2024-04-15T01:27:55.951923Z\": extra text: \"Z\"\n","stacktrace":"github.com/mrusme/neonmod
em/aggregator.(*Aggregator).ListPosts\n\tgithub.com/mrusme/neonmodem/aggregator/aggregator.go:77\ngithub.com/mrusme/neonmodem/ui/views/posts.Model.Update.(*Model).refresh.func7\n\tgithub.com/mrusme/neonmodem/ui/
views/posts/posts.go:206\ngithub.com/charmbracelet/bubbletea.(*Program).handleCommands.func1.1\n\tgithub.com/charmbracelet/[email protected]/tea.go:268"}
{"level":"error","ts":1713144564.9068627,"caller":"posts/posts.go:209","msg":"[parsing time \"2024-04-15T01:27:55.951923Z\": extra text: \"Z\"]","stacktrace":"github.com/mrusme/neonmodem/ui/views/posts.Model.Upd
ate.(*Model).refresh.func7\n\tgithub.com/mrusme/neonmodem/ui/views/posts/posts.go:209\ngithub.com/charmbracelet/bubbletea.(*Program).handleCommands.func1.1\n\tgithub.com/charmbracelet/[email protected]/tea.go:26
8"}
{"level":"error","ts":1713144569.161709,"caller":"aggregator/aggregator.go:77","msg":"aggregator error: parsing time \"2024-04-15T01:27:55.951923Z\": extra text: \"Z\"\n","stacktrace":"github.com/mrusme/neonmode
m/aggregator.(*Aggregator).ListPosts\n\tgithub.com/mrusme/neonmodem/aggregator/aggregator.go:77\ngithub.com/mrusme/neonmodem/ui/views/posts.Model.Update.(*Model).refresh.func7\n\tgithub.com/mrusme/neonmodem/ui/v
iews/posts/posts.go:206\ngithub.com/charmbracelet/bubbletea.(*Program).handleCommands.func1.1\n\tgithub.com/charmbracelet/[email protected]/tea.go:268"}
{"level":"error","ts":1713144569.1617947,"caller":"posts/posts.go:209","msg":"[parsing time \"2024-04-15T01:27:55.951923Z\": extra text: \"Z\"]","stacktrace":"github.com/mrusme/neonmodem/ui/views/posts.Model.Upd
ate.(*Model).refresh.func7\n\tgithub.com/mrusme/neonmodem/ui/views/posts/posts.go:209\ngithub.com/charmbracelet/bubbletea.(*Program).handleCommands.func1.1\n\tgithub.com/charmbracelet/[email protected]/tea.go:26
8"}
{"level":"error","ts":1713144678.7184458,"caller":"cmd/root.go:97","msg":"error loading system: 400 Bad Request: unknown","stacktrace":"github.com/mrusme/neonmodem/cmd.loadSystems\n\tgithub.com/mrusme/neonmodem/
cmd/root.go:97\ngithub.com/mrusme/neonmodem/cmd.init.func1\n\tgithub.com/mrusme/neonmodem/cmd/root.go:123\ngithub.com/spf13/cobra.(*Command).execute\n\tgithub.com/spf13/[email protected]/command.go:944\ngithub.com/sp
f13/cobra.(*Command).ExecuteC\n\tgithub.com/spf13/[email protected]/command.go:1068\ngithub.com/spf13/cobra.(*Command).Execute\n\tgithub.com/spf13/[email protected]/command.go:992\ngithub.com/mrusme/neonmodem/cmd.Execute\
n\tgithub.com/mrusme/neonmodem/cmd/root.go:141\nmain.main\n\tgithub.com/mrusme/neonmodem/neonmodem.go:13\nruntime.main\n\truntime/proc.go:271"}
{"level":"error","ts":1713144678.7185192,"caller":"cmd/root.go:126","msg":"400 Bad Request: unknown","stacktrace":"github.com/mrusme/neonmodem/cmd.init.func1\n\tgithub.com/mrusme/neonmodem/cmd/root.go:126\ngithu
b.com/spf13/cobra.(*Command).execute\n\tgithub.com/spf13/[email protected]/command.go:944\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\tgithub.com/spf13/[email protected]/command.go:1068\ngithub.com/spf13/cobra.(*Command
).Execute\n\tgithub.com/spf13/[email protected]/command.go:992\ngithub.com/mrusme/neonmodem/cmd.Execute\n\tgithub.com/mrusme/neonmodem/cmd/root.go:141\nmain.main\n\tgithub.com/mrusme/neonmodem/neonmodem.go:13\nruntim
e.main\n\truntime/proc.go:271"}
{"level":"error","ts":1713144682.5802321,"caller":"cmd/root.go:97","msg":"error loading system: 400 Bad Request: unknown","stacktrace":"github.com/mrusme/neonmodem/cmd.loadSystems\n\tgithub.com/mrusme/neonmodem/
cmd/root.go:97\ngithub.com/mrusme/neonmodem/cmd.init.func1\n\tgithub.com/mrusme/neonmodem/cmd/root.go:123\ngithub.com/spf13/cobra.(*Command).execute\n\tgithub.com/spf13/[email protected]/command.go:944\ngithub.com/sp
f13/cobra.(*Command).ExecuteC\n\tgithub.com/spf13/[email protected]/command.go:1068\ngithub.com/spf13/cobra.(*Command).Execute\n\tgithub.com/spf13/[email protected]/command.go:992\ngithub.com/mrusme/neonmodem/cmd.Execute\
n\tgithub.com/mrusme/neonmodem/cmd/root.go:141\nmain.main\n\tgithub.com/mrusme/neonmodem/neonmodem.go:13\nruntime.main\n\truntime/proc.go:271"}
{"level":"error","ts":1713144682.5803134,"caller":"cmd/root.go:126","msg":"400 Bad Request: unknown","stacktrace":"github.com/mrusme/neonmodem/cmd.init.func1\n\tgithub.com/mrusme/neonmodem/cmd/root.go:126\ngithu
b.com/spf13/cobra.(*Command).execute\n\tgithub.com/spf13/[email protected]/command.go:944\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\tgithub.com/spf13/[email protected]/command.go:1068\ngithub.com/spf13/cobra.(*Command
).Execute\n\tgithub.com/spf13/[email protected]/command.go:992\ngithub.com/mrusme/neonmodem/cmd.Execute\n\tgithub.com/mrusme/neonmodem/cmd/root.go:141\nmain.main\n\tgithub.com/mrusme/neonmodem/neonmodem.go:13\nruntim
e.main\n\truntime/proc.go:271"}
{"level":"error","ts":1713144809.1971514,"caller":"aggregator/aggregator.go:77","msg":"aggregator error: parsing time \"2024-04-15T01:29:54.112344Z\": extra text: \"Z\"\n","stacktrace":"github.com/mrusme/neonmod

I am running

  • Arch GNU/Linux
  • sway/wayland
  • foot terminal
    Other than this, I have no more information... sorry.
    Very eager to run this and try it.

[Discourse] ERROR json: cannot unmarshal object into Go struct field CategoryModel.category_list.categories.subcategory_list.uploaded_logo of type string

Steps to reproduce:

  1. Connect a Discourse system (in my case, discourse.nixos.org )
  2. Attempt to view posts
  3. "No items found" displays on UI; error log gives
2024-02-17T15:10:04.768-0600    DEBUG   ui/ui.go:328    generating UI viewcache
2024-02-17T15:10:05.809-0600    DEBUG   api/client.go:55        [DEBUG] %s %s[GET https://discourse.nixos.org/categories.json?include_subcategories=true]
2024-02-17T15:10:05.998-0600    ERROR   ui/ui.go:147    json: cannot unmarshal object into Go struct field CategoryModel.category_list.categories.subcategory_list.uploaded_logo of type string
github.com/mrusme/neonmodem/ui.Model.Update
        github.com/mrusme/neonmodem/ui/ui.go:147
github.com/charmbracelet/bubbletea.(*Program).eventLoop
        github.com/charmbracelet/[email protected]/tea.go:373
github.com/charmbracelet/bubbletea.(*Program).Run
        github.com/charmbracelet/[email protected]/tea.go:503
github.com/charmbracelet/bubbletea.(*Program).Start
        github.com/charmbracelet/[email protected]/tea.go:548
github.com/mrusme/neonmodem/cmd.init.func1
        github.com/mrusme/neonmodem/cmd/root.go:132
github.com/spf13/cobra.(*Command).execute
        github.com/spf13/[email protected]/command.go:944
github.com/spf13/cobra.(*Command).ExecuteC
        github.com/spf13/[email protected]/command.go:1068
github.com/spf13/cobra.(*Command).Execute
        github.com/spf13/[email protected]/command.go:992
github.com/mrusme/neonmodem/cmd.Execute
        github.com/mrusme/neonmodem/cmd/root.go:141
main.main
        github.com/mrusme/neonmodem/neonmodem.go:13
runtime.main
        runtime/proc.go:271

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.