devcli

command module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

README

= Devcli

A CLI for https://dev.to/[DEV.to].

=== https://codeberg.org/Kaamkiya/devcli[MOVED TO CODEBERG]

== About Devcli

I, personally, love terminals. And I often read articles on https://dev.to/[DEV.to].
So I thought "Why not read DEV articles on the CLI?"
So here I am, with a CLI app just for that.

== Features

* Reading articles (+ showing the comments)
* Seeing users
* Fetching and printing your follower list
* Seeing your reading list (and the devcli command to read them!)
* Viewing the 30 most recent posts

== Installation

==== Option 1: With the Go CLI (recommended)

This way requires the Go CLI, which you can download from https://go.dev/dl/[here].
If you don't want that, skip ahead to the "Prebuilt Binaries" section.

[source,bash]
----
# install the latest stable version (recommended)
go install codeberg.org/Kaamkiya/devcli@latest

# install the current development version (only use this if developing devcli)
go install codeberg.org/Kaamkiya/devcli@main

# install a specific version
go install codeberg.org/Kaamkiya/devcli@$VERSION
----

Now skip to the "Usage" section to get started.

==== Option 2: Prebuilt Binaries

This way is somewhat unstable, as I do not have all the devices required to run tests.
If you find a bug, please https://codeberg.org/Kaamkiya/devcli/issues/new/choose[create an issue].

Go to the https://codeberg.org/Kaamkiya/devcli/releases[releases] page.

Next, select the one for your system.

If using Linux, select the Linux tarball, for Darwin, select the Darwin tarball, and so on.

Now, unpack the tarball, however that works on your system.

Try the `tar` command.

On Linux, you can do this:

[source,bash]
----
tar -xzf /path/to/devcli/download.tar.gz
----

Switch in to the directory that you installed it to:

[source,bash]
----
cd /path/to/devcli/
----

Now type this:

[source,bash]
----
./devcli help
----

If all went well, that should print a help message! You can now move on.

If that failed, try restarting. If it still fails, file an issue.

== Usage

To get started, add devcli to your `$PATH`. On Linux/MacOS:

[source,bash]
----
export PATH="$PATH:$(go env GOPATH)" # use this if you installed with the Go CLI

# otherwise, do this
export PATH="$PATH:/path/to/devcli" # /path/to/devcli is wherever you unpacked the tarball to.
----

Now, try this:

[source,bash]
----
devcli read 1690174
----

If all went well, the text that was just printed to your screen is an article (by me!) about why Go is awesome.

Otherwise, restart the installation steps. If it still fails, file a bug report.

To get help if you ever need it, just use the `help` subcommand:

[source,bash]
----
devcli help
----

== Contributing

So you want to contribute? Sure! I accept PRs. See the link:CONTRIBUTING.adoc[guidelines] for details.

You can see the to-do list below for things to help with :)

== Todo

* Fix writing an article command
* Add error messages if the user has not set an API key
* Add function to send reactions (fire, unicorn, etc.)
* Add function to post comments
* Update `--show-comments` flag to show *all* comments, not just top-level comments
* Use pager to read articles instead of just printing
* When showing reading list, print `devcli read <article_id>` instead of `devcli read <article_path>` to declutter output
* Find a new HTML2Text converter (the current one could be better)

== License

This project uses the link:LICENSE.txt[GNU Affero General Public License version 3.0] (GNU AGPLv3).

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL