gator

command module
v0.0.0-...-e6e37f2 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: MIT Imports: 15 Imported by: 0

README

🐊 GATOR

A blog aggreGATOR

Requirements

Go Installation

Install Go.

Postgres Installation

Install Postgres.

Config file

Add ~/.gatorconfig.json to your home directory and populate with db config settings (remove comments before saving):

{
  "db_url": "connection_string_goes_here", // connection string for postgres
  "current_user_name": "username_goes_here" // gator will save the current user name
}

Install Gator Executable

After cloning the repo, go to the project root and run

go install

Run

🐊 is available in any directory!

gator `command` [args...]

Commands

  • register user
    • Registers a new user
gator register homer
  • login user
    • Logs in as a registered user
gator login bart
  • addfeed url title
    • Adds & follows a feed
gator addfeed https://hnrss.org/newest hackernews
  • agg timestring
    • Aggregates posts every given duration
      • Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h"
gator agg 12h
  • browse postsCount
    • Displays the latest postCount posts saved from your feeds, in descending order.
gator browse 5
  • follow feedUrl
    • Follows an existing feed
gator follow https://hnrss.org/newest
  • unfollow feedUrl
    • Unfollows an existing feed
gator unfollow https://hnrss.org/newest
  • following
    • Displays all feeds followed by current user
gator following
  • users
    • Displays all users
gator users
  • feeds
    • Displays all feeds
gator feeds
  • reset
    • Clears all data (user, feed, follow and posts)
gator reset

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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