From e0a706da372db559b84d2492b20aeb5c00cd5154 Mon Sep 17 00:00:00 2001 From: openset Date: Sat, 22 Jun 2019 20:51:01 +0800 Subject: [PATCH] Update: log --- internal/description/description.go | 2 ++ internal/leetcode/question_article.go | 1 - internal/leetcode/question_data.go | 1 - internal/question/question.go | 2 ++ 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/description/description.go b/internal/description/description.go index 65f6602ed..d5351c35b 100644 --- a/internal/description/description.go +++ b/internal/description/description.go @@ -1,6 +1,7 @@ package description import ( + "fmt" "sync" "github.com/openset/leetcode/internal/base" @@ -24,6 +25,7 @@ func runDescription(cmd *base.Command, args []string) { for _, problem := range problems.StatStatusPairs { wg.Add(1) tokens <- true + fmt.Println(problem.Stat.FrontendQuestionId, "\t"+problem.Stat.QuestionTitle) go func(problem leetcode.StatStatusPairsType) { titleSlug := problem.Stat.QuestionTitleSlug question := leetcode.QuestionData(titleSlug, false).Data.Question diff --git a/internal/leetcode/question_article.go b/internal/leetcode/question_article.go index 01c15c234..1f6fb3ff2 100644 --- a/internal/leetcode/question_article.go +++ b/internal/leetcode/question_article.go @@ -9,7 +9,6 @@ import ( ) func GetDescription(articleSlug string) string { - fmt.Println("\tquestion article", "saving...") filename := fmt.Sprintf(questionArticleFile, slugToSnake(articleSlug)) html := remember(filename, 6, func() []byte { return client.Get(fmt.Sprintf(questionArticleUrl, articleSlug)) diff --git a/internal/leetcode/question_data.go b/internal/leetcode/question_data.go index 6b4d16229..56523887f 100644 --- a/internal/leetcode/question_data.go +++ b/internal/leetcode/question_data.go @@ -99,7 +99,6 @@ func (d difficultyStrType) Str() (s string) { func (question questionType) SaveContent() { if question.TitleSlug != "" { - fmt.Println(question.QuestionFrontendId, "\t"+question.Title, "saving...") filePutContents(question.getFilePath("README.md"), question.getDescContent()) question.saveMysqlSchemas() } diff --git a/internal/question/question.go b/internal/question/question.go index a9454eca0..a821cc4ce 100644 --- a/internal/question/question.go +++ b/internal/question/question.go @@ -1,6 +1,7 @@ package question import ( + "fmt" "strconv" "github.com/openset/leetcode/internal/base" @@ -22,6 +23,7 @@ func runQuestion(cmd *base.Command, args []string) { problems := leetcode.ProblemsAll() for _, problem := range problems.StatStatusPairs { if problem.Stat.FrontendQuestionId == questionId { + fmt.Println(questionId, "\t"+problem.Stat.QuestionTitle) titleSlug := problem.Stat.QuestionTitleSlug question := leetcode.QuestionData(titleSlug, true).Data.Question if question.Content == "" && problem.PaidOnly == true && problem.Stat.QuestionArticleLive {