Skip to content

Commit

Permalink
Adding everything we missed
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewjohnsonsmarty committed Oct 3, 2024
1 parent bb610c1 commit 17c67c5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
24 changes: 12 additions & 12 deletions code/integration/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@ func GenerateBlog(config Config) bool {
failure = new(atomic.Bool)
input = make(chan any, 1)

scanner = contracts.Station(nil) // stations.NewSourceScanner(config.FileSystemReader)
reader = contracts.Station(nil) // stations.NewSourceReader(config.FileSystemReader)
parser = contracts.Station(nil) // stations.NewArticleParser()
validator = contracts.Station(nil) // stations.NewArticleValidator()
drafts = contracts.Station(nil) // stations.NewDraftRemoval() // OPTIONAL
futures = contracts.Station(nil) // stations.NewFutureRemoval(started) // OPTIONAL
markdown = contracts.Station(nil) // stations.NewMarkdownConverter(config.MarkdownConverter)
listing = contracts.Station(nil) // stations.NewListingRenderer(config.ListingTemplate)
renderer = contracts.Station(nil) // stations.NewArticleRenderer(config.ArticleTemplate)
baseURL = contracts.Station(nil) // stations.NewBaseURLRewriter(config.BaseURL)
writer = contracts.Station(nil) // stations.NewPageWriter(config.TargetDirectory, config.FileSystemWriter)
reporter = contracts.Station(nil) // stations.NewReporter(config.Logger, failure)
scanner = stations.NewSourceScanner(config.FileSystemReader)
reader = stations.NewSourceReader(config.FileSystemReader)
parser = stations.NewArticleParser()
validator = stations.NewArticleValidator()
drafts = stations.NewDraftRemoval() // OPTIONAL
futures = stations.NewFutureRemoval(started) // OPTIONAL
markdown = stations.NewMarkdownConverter(config.MarkdownConverter)
listing = stations.NewListingRenderer(config.ListingTemplate)
renderer = stations.NewArticleRenderer(config.ArticleTemplate)
baseURL = stations.NewBaseURLRewriter(config.BaseURL)
writer = stations.NewPageWriter(config.TargetDirectory, config.FileSystemWriter)
reporter = stations.NewReporter(config.Logger, failure)

pipeline = pipelines.New(input,
pipelines.Options.Logger(config.Logger),
Expand Down
3 changes: 3 additions & 0 deletions code/stations/02_article_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ const divider = "+++"

type ArticleParser struct{}

func NewArticleParser() *ArticleParser {
return &ArticleParser{}
}
func (this *ArticleParser) Do(input any, output func(any)) {
switch input := input.(type) {
case contracts.SourceFile:
Expand Down

0 comments on commit 17c67c5

Please sign in to comment.