From 53f19f25dd0a9894181ef91602b4b018984c2268 Mon Sep 17 00:00:00 2001 From: Josh Michielsen Date: Thu, 18 Apr 2019 16:44:05 +0100 Subject: [PATCH 1/2] Update documentation, import paths and fixed spelling of videos.go --- CONTRIBUTING.md | 17 +---- LICENSE | 2 +- README.md | 119 +++++----------------------------- cmd/import.go | 2 +- cmd/root.go | 2 +- cmd/update.go | 4 +- main.go | 2 +- providers/youtube.go | 2 +- providers/youtube_test.go | 2 +- util/{vidoes.go => videos.go} | 0 10 files changed, 28 insertions(+), 124 deletions(-) rename util/{vidoes.go => videos.go} (100%) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1cfc7b4..cb396df 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,25 +1,14 @@ # Contributing -Thank you so much for helping us build [BreadTube.tv](https://BreadTube.tv), an open source media distribution platform for simplifying the sharing of the massively important content coming out of the BreadTube movement. +Thank you so much for helping us build [BreadTube.tv](https://BreadTube.tv) and the bake CLI, for more information about [BreadTube.tv](https://BreadTube.tv) please visit its repo [here](https://github.com/breadtubetv/breadtubetv) We're looking for any help you can offer, including but not limited to advising us on what playlists we should put together. -If you're a creator we really want to know what information you would like on here, and also if you would like your own free and open source version of the platform, eg [yourchannel.breadtube.tv](#contributing) or [yourchannel.tv](#contributing) _(all hosting costs will be covered by donors)_. +[README](https://github.com/breadtubetv/bake/#bake) is the first place to go to learn everything about the project. -[README](https://github.com/breadtubetv/breadtubetv/#breadtubetv) is the first place to go to learn everything about the project. - -[The Issues](https://github.com/breadtubetv/breadtubetv/issues) section is a great place to add ideas about expanding the platform +[The Issues](https://github.com/breadtubetv/bake/issues) section is a great place to add ideas about expanding the platform You can also visit [BreadTube.tv](https://breadtube.tv) to find other platforms where this content is being distributed. -## Development - -### Creating a Playlist - -- [Create a New File](https://github.com/breadtubetv/breadtubetv/new/master/content/playlists) under [content/playlists/](https://github.com/breadtubetv/breadtubetv/tree/master/content/playlists) (ProTip: [Copy an existing one](https://github.com/breadtubetv/breadtubetv/blob/master/content/playlists/welcome.md)) -- Add the video ids you want into the new [Playlist Front Matter](https://gohugo.io/content-management/front-matter/) -- Add the videos you need to [`data/videos.yml`](https://github.com/breadtubetv/breadtubetv/blob/master/data/videos.yml) -- Add the channels you need to [`data/channels.yml`](https://github.com/breadtubetv/breadtubetv/blob/master/data/channels.yml) - Thank you. [BreadTube.tv Team](https://github.com/orgs/breadtubetv/people) diff --git a/LICENSE b/LICENSE index c39ccaa..9815cab 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (C) 2019 BreadTube.tv github.com/breadtubetv/breadtubetv +Copyright (C) 2019 BreadTube.tv github.com/breadtubetv/bake This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/README.md b/README.md index 98418e9..a9ddc3a 100644 --- a/README.md +++ b/README.md @@ -1,93 +1,8 @@ -# [BreadTube.tv](https://breadtube.tv) +# Bake CLI -This project aims to list anti-establishment public YouTubers for simplified onboarding of new members to the cause. +The `bake` cli is a companion CLI to the [breadtubetv/breadtubetv](https://github.com/breadtubetv/breadtubetv) project. -[Check out the announcement on r/breadtube to follow the discussion](https://www.reddit.com/r/BreadTube/comments/ahxwrm/breadtubetv_is_live_and_open_source_you_can_help/). - -Growing from this base we want to build a platform which elevates content creators far beyond what YouTube can currently offer, and gives them resilience from being censored or deplatformed. - -For now though this is a *_really simple_* website - -- Channels can be added to the homepage under `data/channels.yml` -- Videos can be added to the homepage under `data/channels.yml` -- Playlists can be created to link to videos and channels -- Social media can be changed in`config.toml`. - -We'd like to simplify the process for adding content, [this is a project you can help with](https://github.com/breadtubetv/breadtubetv/issues/22)! - -## Dependencies - -## [Hugo (https://gohugo.io/)](https://gohugo.io/) - -## Content Development - -``` -hugo serve -open localhost:1313 -``` - -## [Contributing](https://github.com/breadtubetv/breadtubetv/blob/master/CONTRIBUTING.md) - -### Configuring the `bake` CLI - -The `.bake.yaml` configuration file can be stored in the following locations: - -- `$HOME/.bake.yaml` -- `./bake.yaml` (In other words, the current directory from which you're running the CLI) - -Current configuration options and default values: - -- `projectRoot: "../"` : Directory of channel data files. - E.g. `$GOPATH/src/github.com/breadtubetv/breadtubetv/data/channels` - -### Adding a Channel - -#### [Walkthrough Video](https://youtu.be/jpOun7YXFpg) (Out of date) - -You can use the `bake` CLI, instructions [here](#Importing-a-Channel) to add channels OR - -- Create a `.yaml` file in [`data/channels/`](https://github.com/breadtubetv/breadtubetv/blob/master/data/channels) -- Fill in the required information: - ```yaml - name: Readable Name - permalink: - providers: - twitter: - name: Readable Name - slug: username - url: https://www.twitter.com/ - youtube: - name: Readable Name - slug: youtube-id - url: https://www.youtube.com/channel/ - subscribers: 9000 - slug: - tags: - - breadtube - ``` -- Create a `.md` file in [`content`](https://github.com/breadtubetv/breadtubetv/blob/master/content) -- Follow this example format: - ``` - --- - title: "" - type: "channels" - channel: "" - menu: - main: - parent: "Channels" -videos: -- abc123def - --- -- Download the image and save it to [`static/img/channels/`](https://github.com/breadtubetv/breadtubetv/blob/master/static/img/channels) - -### Creating a Playlist - -- [Create a New File](https://github.com/breadtubetv/breadtubetv/new/master/content/playlists) under [content/playlists/](https://github.com/breadtubetv/breadtubetv/tree/master/content/playlists) (ProTip: [Copy an existing one](https://github.com/breadtubetv/breadtubetv/blob/master/content/playlists/welcome.md)) -- Add the video ids you want into the new [Playlist Front Matter](https://gohugo.io/content-management/front-matter/) -- Add the videos you need to [`data/videos.yml`](https://github.com/breadtubetv/breadtubetv/blob/master/data/videos.yml) -- Add the channels you need to [`data/channels.yml`](https://github.com/breadtubetv/breadtubetv/blob/master/data/channels.yml) - -## Script Development +## [Contributing](https://github.com/breadtubetv/bake/blob/master/CONTRIBUTING.md) Scripts are being written in Go, this keeps the scripting and operational language the same, provides cross system compatibility, and gives everyone an opportunity to learn a new programming language. @@ -102,8 +17,8 @@ This is going to be dependent on your system, we recommend following https://gol You'll need a copy of the project in your `$GOPATH`. ``` -go get github.com/breadtubetv/breadtubetv -cd $GOPATH/github.com/breadtubetv/breadtubetv/bake +go get github.com/breadtubetv/bake +cd $GOPATH/github.com/breadtubetv/bake ``` And you'll need to install bake's dependencies with: @@ -120,6 +35,18 @@ This will put the `bake` command in your path: go install ``` +#### Configuring the `bake` CLI + +The `.bake.yaml` configuration file can be stored in the following locations: + +- `$HOME/.bake.yaml` +- `./bake.yaml` (In other words, the current directory from which you're running the CLI) + +Current configuration options and default values: + +- `projectRoot: "../"` : Directory of channel data files. + E.g. `$GOPATH/src/github.com/breadtubetv/breadtubetv/data/channels` + #### Importing a Channel You can run bake directly from the source like so: @@ -144,15 +71,3 @@ Bake has some very basic tests for now, they can be run with the standard go tes go get -t ./... go test ./... ``` - -## Staging - -Pull requests are automatically deployed to a self contained environment for review. - -## Production - -### Hosting - -While this is a simple Hugo website, hosting is on [netlify.com](https://netlify.com). - -## Forestry diff --git a/cmd/import.go b/cmd/import.go index a81a735..9d24ff2 100644 --- a/cmd/import.go +++ b/cmd/import.go @@ -6,7 +6,7 @@ import ( "os" "strings" - "github.com/breadtubetv/breadtubetv/bake/util" + "github.com/breadtubetv/bake/util" "github.com/spf13/cobra" "github.com/spf13/viper" ) diff --git a/cmd/root.go b/cmd/root.go index 45d7d54..47c5400 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -5,7 +5,7 @@ import ( "os" "path/filepath" - "github.com/breadtubetv/breadtubetv/bake/providers" + "github.com/breadtubetv/bake/providers" homedir "github.com/mitchellh/go-homedir" "github.com/spf13/cobra" diff --git a/cmd/update.go b/cmd/update.go index 9296d6e..2323840 100644 --- a/cmd/update.go +++ b/cmd/update.go @@ -5,8 +5,8 @@ import ( "log" "os" - "github.com/breadtubetv/breadtubetv/bake/providers" - "github.com/breadtubetv/breadtubetv/bake/util" + "github.com/breadtubetv/bake/providers" + "github.com/breadtubetv/bake/util" "github.com/spf13/cobra" "github.com/spf13/viper" ) diff --git a/main.go b/main.go index d6e009c..362ecf7 100644 --- a/main.go +++ b/main.go @@ -1,7 +1,7 @@ package main import ( - "github.com/breadtubetv/breadtubetv/bake/cmd" + "github.com/breadtubetv/bake/cmd" ) func main() { diff --git a/providers/youtube.go b/providers/youtube.go index 8c8d0cd..0e5975c 100644 --- a/providers/youtube.go +++ b/providers/youtube.go @@ -16,7 +16,7 @@ import ( "runtime" "strings" - "github.com/breadtubetv/breadtubetv/bake/util" + "github.com/breadtubetv/bake/util" "golang.org/x/net/context" "golang.org/x/oauth2" "golang.org/x/oauth2/google" diff --git a/providers/youtube_test.go b/providers/youtube_test.go index 38ca101..34fd8a0 100644 --- a/providers/youtube_test.go +++ b/providers/youtube_test.go @@ -3,7 +3,7 @@ package providers import ( "testing" - "github.com/breadtubetv/breadtubetv/bake/util" + "github.com/breadtubetv/bake/util" "github.com/stretchr/testify/assert" ) diff --git a/util/vidoes.go b/util/videos.go similarity index 100% rename from util/vidoes.go rename to util/videos.go From 9fc811f1c2c483a8bd3fdb183f5c66c8107db966 Mon Sep 17 00:00:00 2001 From: Dirk Kelly Date: Fri, 19 Apr 2019 10:34:10 +0800 Subject: [PATCH 2/2] Update README.md BreadTube Bake CLI --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a9ddc3a..7ea6ab3 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Bake CLI +# BreadTube Bake CLI The `bake` cli is a companion CLI to the [breadtubetv/breadtubetv](https://github.com/breadtubetv/breadtubetv) project.