ScalabeginnercliAI generated

Markdown Word and Character Counter

Write a command-line utility that scans Markdown files and reports word count, character count, heading counts, and link counts per file. Learners practice regular expressions, file I/O, and case classes for aggregating results.

Estimate
~7.5h
Steps
5
Completed by
0
Proposed by
codeseed.app

sbt · scala.util.matching.Regex

Project roadmap

  1. 01

    Read Markdown files from a directory

    ~1h

    Walk a directory and load the contents of every .md file.

  2. 02

    Extract headings and links with regex

    ~2h

    Write regular expressions to find Markdown headings and link syntax.

  3. 03

    Aggregate results into a case class

    ~1.5h

    Model per-file statistics as a case class and accumulate totals across files.

  4. 04

    Print a summary table

    ~1.5h

    Display word count, character count, heading count, and link count per file and in total.

  5. 05

    Write unit tests

    ~1.5h

    Test regex extraction and aggregation logic against sample Markdown strings.

Resources

Ready to build this?

Get a GitHub repo and start building. Your AI reviewer checks each step as you go.

~7.5h · 5 steps

Tech stack

sbtscala.util.matching.Regex