Giter VIP home page Giter VIP logo

mastodonctl's Introduction

mastodonctl logo

mastodonctl

cli client for mastodon social media platform

installation

since we don't provide pre-built binaries, having Go installed on your machine is required. Follow this link: https://go.dev/dl/

  1. Clone repo to your local machine (fork repo if you intend to be a Contributor!)

    git clone https://github.com/socraticDevBlog/mastodonctl.git
  2. Install project

    go install
  3. Build project

    go build .
  4. Add current project directory to your user PATH

    export PATH="$PATH:${GOPATH}/bin/mastodonctl"
  5. (required) in order for the binary to be able to read configuration file

    current_directory=`pwd`
    export CONFIG_FILEPATH=${current_directory}/conf.json

mastodonctl is now available as CLI tool! ๐Ÿš€

configurations

As an experienced user, you may want to customize your commandline-tool.

This is possible by editing conf.json file

configurable values

field description
ResultsDisplayCount number of results displayed in your terminal
ApiUrl URL of targetted mastodon server
AuthToken auth token required to interact with a server's API

current available commands

userinfos

* requires auth token for the server used

Will query Mastadon server's API for user infos based on their username

suggested way to store private credentials

populate AuthToken field in conf.json configuration file

โš ๏ธ never commit conf.json file to git version control

start working on local machine

try out a few commands to see if everything is working properly

list users by username

go run . userinfos -username dave

Expect:

ctl results for userinfos

hashtag

Will query Mastadon server's public API for latest post tagged with a specific hashtag

go run . hashtag -name cat

Expect:

ctl results for cat

freely available Mastodon apps

my local Golang setup

  • my .profile file
# golang configs
export GOPATH=$HOME/go
export PATH="$GOPATH/bin:$PATH"

# mastodonctl
# a valid conf.json file located beside mastodonctl binary
export CONFIG_FILEPATH="$GOPATH/bin/conf.json"

mastodonctl's People

Contributors

socraticdevblog avatar beelux avatar

Stargazers

Kai Erik Niermann avatar

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.