Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
quentin.moutte.etu committed Jun 17, 2024
1 parent 9d95bd0 commit b61d3dd
Showing 1 changed file with 11 additions and 21 deletions.
32 changes: 11 additions & 21 deletions src/Microdown-Blog/MicBlogCreator.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -53,43 +53,33 @@ MicBlogCreator >> copySourceDirectoryInTarget [
{ #category : 'rendering' }
MicBlogCreator >> createAllHtmlFile [

| allFile allFileParse sum summar listOfSingleSummarize |
dateList := MicMonthListCreator new
generateMicListBlockOfLinkDateTo: targetDirectory.
| allFile allFileParse sum listOfSingleSummarize |
"Copy the source directory in the target directory"
self copySourceDirectoryInTarget.

"Download the CSS"
self downloadCSS.

self downloadCSS.

"Collect and parse all Markdown file of targetDirectory"
allFile := self collectAllMarkDownFile: targetDirectory.
allFileParse := allFile collect: [ :each |
(Microdown parse: each asFileReference contents)
fromFile: each ].


"Create _monthListBlog"
self initializeMonthList: allFileParse.

"transform all markdown file into html file"
allFileParse do: [ :each |
self createHtmlFile: each toReplace: each fromFile ].

"create summarizer html file"
sum := MicSummarizer new.
sum targetDirectory: targetDirectory.

listOfSingleSummarize := allFileParse collect: [ :each |
MicSingleSummarizer new summarize: each ].
self createHtmlSummarize: (sum summarize: listOfSingleSummarize).

"Create the directory with all month summarizer in html"
targetDirectory fileSystem createDirectory:
targetDirectory fullName , '/_monthBlog'.

MicMonthListCreator new generateDateListSince2014 do: [ :each |
summar := sum group: listOfSingleSummarize byDate: each.
summar isNotEmpty
ifTrue: [
summar := sum summarize: summar.
self createHtmlGroupFile: summar at: each ]
ifFalse: [ self createHtmlEmptyGroupFileAt: each ] ]

self createHtmlSummarize: (sum summarize: listOfSingleSummarize)
]

{ #category : 'rendering' }
Expand Down

0 comments on commit b61d3dd

Please sign in to comment.