From 0adbdb0e2287626a6a84c02e396505dc0a68bcf4 Mon Sep 17 00:00:00 2001 From: jack Date: Thu, 14 Sep 2023 15:42:03 +0700 Subject: [PATCH] chore: update template --- README.md | 22 ++++++++++++++++------ cmd/{weather.go => article.go} | 2 +- handler/collector/templates/table.tpl | 4 +++- main.go | 2 +- 4 files changed, 21 insertions(+), 9 deletions(-) rename cmd/{weather.go => article.go} (96%) diff --git a/README.md b/README.md index 874b966..2b84148 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,9 @@ jobs: - + - + - + - + - +
thumbnail + thumbnail + Update your dev.to articles into your Github profile
In this article, I'll share you how to update your latest articles on dev.to into your Github...
@@ -70,7 +72,9 @@ jobs:
thumbnail + thumbnail + Creating Dynamic README.md File
This is my Github Profile. The specific thing here is that the weather is updated every 6 hours...
@@ -78,7 +82,9 @@ jobs:
thumbnail + thumbnail + Search Goole Like a Pro [Cheat sheet]
Before reading my article, let's try searching the following input: inurl:/jacktt/ site:dev.to ...
@@ -86,7 +92,9 @@ jobs:
thumbnail + thumbnail + Advanced Go Build Techniques
Table of contents Build options Which file will be included Build tags Build contraints ...
@@ -94,7 +102,9 @@ jobs:
thumbnail + thumbnail + Load Private Module in Golang Project
Load Private Module in Golang Project Table of Contents I. How Does go get Work? II. How...
@@ -112,4 +122,4 @@ jobs: - [Advanced Go Build Techniques](https://dev.to/jacktt/go-build-in-advance-4o8n) - 30/08/2023 - [Load Private Module in Golang Project](https://dev.to/jacktt/load-private-module-in-golang-project-122l) - 12/08/2023 -*Updated at: 2023-09-14T06:28:08Z* \ No newline at end of file +*Updated at: 2023-09-14T15:41:40+07:00* \ No newline at end of file diff --git a/cmd/weather.go b/cmd/article.go similarity index 96% rename from cmd/weather.go rename to cmd/article.go index 4475d67..c675765 100644 --- a/cmd/weather.go +++ b/cmd/article.go @@ -10,7 +10,7 @@ import ( "os" ) -func UpdateWeather(use string) *cobra.Command { +func UpdateArticles(use string) *cobra.Command { var templateFilePath string var outputFilePath string var username string diff --git a/handler/collector/templates/table.tpl b/handler/collector/templates/table.tpl index 70ce0ac..edf2085 100644 --- a/handler/collector/templates/table.tpl +++ b/handler/collector/templates/table.tpl @@ -2,7 +2,9 @@ {{- range $i, $article := .}} - +
thumbnail + thumbnail + {{ truncateByWords $article.Title 10 }}
{{ $article.Description }}
diff --git a/main.go b/main.go index 0a162af..c4519e0 100644 --- a/main.go +++ b/main.go @@ -14,7 +14,7 @@ func main() { slog.SetDefault(logger) root := &cobra.Command{} - root.AddCommand(cmd.UpdateWeather("update-articles")) + root.AddCommand(cmd.UpdateArticles("update-articles")) err := root.Execute() if err != nil { slog.Error(err.Error())