Giter VIP home page Giter VIP logo

blackbox's Introduction

Blackbox

🌳Stateful Command Tree Monolith with Bonzai for the Silver Spring Black Box Theater.

Prerequisites

  • Google Cloud Account
  • Google cloud OAuth credentials
  • A .env file or sourced environment variables for the following: (See the .env.example file)
    • CALENDAR_ID
    • RESULTS_LOC

Setting up the configuration location

The blackbox tool looks for configuration in the following directories:

  • Linux: $XDG_CONFIG_DIR/blackbox
  • Windows: %APPDATA%\blackbox
  • macOS: $HOME/Library/blackbox

Create the directory if it doesn't exist, using your preferred method.

Creating Google Cloud Oauth Credentials

  1. Log in to the Google Cloud Console

  2. Create a new project and navigate to it

  3. Go to "APIs & Services"

  4. Click "+ Enable APIs & Services"

  5. Search for Google Calendar API and select and enable it

  6. Navigate to "Credentials"

  7. Click "+ CREATE CREDENTIALS" > "+ OAuth client ID"

  8. Configure the OAuth Consent Screen

    • External is the default if you aren't using a Google Workspaces account.
  9. Navigate back to "Credentials"

  10. Click "+ CREATE CREDENTIALS" > "+ OAuth client ID"

  11. Select Application type: Desktop app

  12. Name your application, e.g., "blackbox"

  13. Download your credentials JSON as credentials.json

Creating your .env file

cp  .env.example /path/to/your/config/directory/.env

Edit the .env as needed

Installation

Local Clone (RECOMMENDED)

  1. Clone this repository using git clone https://github.com/tr00datp00nar/blackbox.git and from within that directory, run:
go install .
  1. Create the necessary configuration directory from above.
  2. Make sure that the configuration directory is populated with your .env and credentials.json files.

Download one of the release binaries (NOT RECOMMENDED):

curl -L https://github.com/tr00datp00nar/blackbox/releases/latest/download/blackbox-linux-amd64 -o ~/.local/bin/tr00datp00nar
curl -L https://github.com/tr00datp00nar/blackbox/releases/latest/download/blackbox-darwin-amd64 -o ~/.local/bin/tr00datp00nar
curl -L https://github.com/tr00datp00nar/blackbox/releases/latest/download/blackbox-darwin-arm64 -o ~/.local/bin/tr00datp00nar
curl -L https://github.com/tr00datp00nar/blackbox/releases/latest/download/blackbox-windows-amd64 -o ~/.local/bin/tr00datp00nar

Install directly with go (NOT RECOMMENEDED):

go install github.com/tr00datp00nar/blackbox@latest

Tab Completion in Bash

To activate bash completion just use the complete -C option from your .bashrc or command line. There is no messy sourcing required. All the completion is done by the program itself.

complete -C blackbox blackbox

If you don't have bash or tab completion check out the shortcut commands instead.

Tab Completion in Zsh

Zsh does a good job of learning your commands over time all by itself, but some of the custom completions may not work as well. Personally, I use the Oh-My-Zsh option below, but the creator of Bonzai and the original Z command tree (rwxrob) prefers the default Linux shell (Bash) over the default Mac shell (Zsh). (PRs to rwxrob's repository are welcome to integrate completion into Zsh without dumping a ton of shell code that has to be sourced.)

Oh-My-Zsh

Oh-My-Zsh has an available plugin called zsh-bash-completions-fallback. This plugin allows zsh to fallback to bash completions when it can't find the appropriate completions itself.

Once installed, you can use the same complete -C blackbox blackbox as you normally would in bash.

Embedded Documentation

All documentation (like manual pages) has been embedded into the source code of the application. See the source or run the program with help to access it.

Building

Releases are built using the following commands:

blackbox go build
gh release create
gh release upload TAG build/*

blackbox's People

Contributors

tr00datp00nar avatar

Watchers

 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.