-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b64e009
commit ebe0ec5
Showing
12 changed files
with
457 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
secrets.env | ||
youtube-video-list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"recommendations": [ | ||
"ms-vscode.Go", | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Launch", | ||
"type": "go", | ||
"request": "launch", | ||
"mode": "auto", | ||
"program": "${fileDirname}", | ||
"args": [ | ||
"-channel", | ||
"UCdoadna9HFHsxXWhafhNvKw", | ||
"-after", | ||
"2019-12-26T00:00:00Z", | ||
], | ||
"envFile": "${workspaceFolder}/secrets.env", | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"go.formatTool": "goimports", | ||
"go.lintTool": "revive", | ||
"go.lintFlags": ["-config", "revive.toml", "-formatter", "unix"], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
build: | ||
go build -o youtube-video-list main.go | ||
|
||
clean: | ||
rm youtube-video-list | ||
|
||
all: build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,41 @@ | ||
# YouTube Video List | ||
|
||
After a big conference like AWS re:Invent, there are literally hundreds of | ||
videos available for all the sessions. While it would be great to watch all the | ||
videos, I just don't have that much time. To help find the most interesting | ||
videos and track my progress, I like to make a spreadsheet of the videos. This | ||
tool creates a list of all the videos, including their title, view count and a | ||
link to view the video. | ||
|
||
To run this program, you will need the following: | ||
|
||
* YouTube Data API Key - See the [YouTube Data API Overview] for more | ||
information on creating an API Key. | ||
* YouTube Channel ID - See [Understanding your channel URLs] to learn more about | ||
Channel IDs. For example, the [AWS Events] Channel ID is | ||
`UCdoadna9HFHsxXWhafhNvKw`. | ||
* Optionally, a range of dates you are interested in limiting results to. At | ||
this time, it appears re:Invent 2019 videos were posted between December 3 and | ||
December 26. | ||
|
||
Before running, you need to copy `secrets.template.env` to `secrets.env` and | ||
replace the placeholder with your YouTube Data API Key. | ||
|
||
Then you can build and run the program: | ||
|
||
``` | ||
make | ||
set -o allexport; source secrets.env; set +o allexport | ||
./youtube-video-list \ | ||
-channel UCdoadna9HFHsxXWhafhNvKw \ | ||
-after 2019-12-01T00:00:00Z \ | ||
-before 2019-12-28T00:00:00Z | ||
``` | ||
|
||
Note that this initial version runs each request to YouTube Data API in series, | ||
and this example will run several hundred queries, which could take about a | ||
minute or two to complete. | ||
|
||
[YouTube Data API Overview]: https://developers.google.com/youtube/v3/getting-started | ||
[AWS Events]: https://www.youtube.com/channel/UCdoadna9HFHsxXWhafhNvKw/videos | ||
[Understanding your channel URLs]: https://support.google.com/youtube/answer/6180214?hl=en |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
This is free and unencumbered software released into the public domain. | ||
|
||
Anyone is free to copy, modify, publish, use, compile, sell, or | ||
distribute this software, either in source code form or as a compiled | ||
binary, for any purpose, commercial or non-commercial, and by any | ||
means. | ||
|
||
In jurisdictions that recognize copyright laws, the author or authors | ||
of this software dedicate any and all copyright interest in the | ||
software to the public domain. We make this dedication for the benefit | ||
of the public at large and to the detriment of our heirs and | ||
successors. We intend this dedication to be an overt act of | ||
relinquishment in perpetuity of all present and future rights to this | ||
software under copyright law. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
OTHER DEALINGS IN THE SOFTWARE. | ||
|
||
For more information, please refer to <http://unlicense.org/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
module github.com/chesshacker/reinventyt | ||
|
||
go 1.13 | ||
|
||
require ( | ||
cloud.google.com/go v0.50.0 // indirect | ||
github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7 // indirect | ||
github.com/hashicorp/golang-lru v0.5.3 // indirect | ||
go.opencensus.io v0.22.2 // indirect | ||
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553 // indirect | ||
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 // indirect | ||
golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8 // indirect | ||
google.golang.org/api v0.15.0 | ||
google.golang.org/appengine v1.6.5 // indirect | ||
google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb // indirect | ||
google.golang.org/grpc v1.26.0 // indirect | ||
) |
Oops, something went wrong.