, , , , , ,

[SOLVED] ‌fit2102 programming paradigms 2024 – assignment 2: markdown to html‌‌‌‌

$25

File Name: ‌fit2102_programming_paradigms_2024_-_assignment_2:_markdown_to_html‌‌‌‌.zip
File Size: 772.44 KB

5/5 - (1 vote)

FIT2102 Programming Paradigms 2024 – Assignment 2: Markdown to HTML

Due Date

image Friday, 18th October, 11:55 pm

Weighting

image 30% of your final mark for the unit

Interview

image SWOTVAC + Week 13

Overview

image Students will create a parser for a subset of the Markdown specification using functional programming techniques in Haskell.

image Demonstrate understanding of functional programming, including documentation of design decisions.

Submission Instructions

Submit a zipped file named <studentNo>_<name>.zip which extracts to a folder named

<studentNo>_<name> .

image Must contain all code, report (named <studentNo>_<name>.pdf ). image No additional Haskell libraries (except for testing).

image Run stack clean –full before zipping.

image Don’t submit node_modules or .git folder. image Ensure code executes properly.

Marking process: image Extract zip.

image Copy submission folder contents.

image Execute stack build , stack test , stack exec main/npm run dev for front end.

Late Submissions

image Penalised at 5% per calendar day, rounded up.

image After seven days, receive zero marks and no feedback.

Table of Contents

  1. Introduction

  2. Goals / Learning Outcomes

  3. Scope of assignment

  4. Exercises (24 marks)

    image Part A: (12 marks): Parsing Markdown image Aside – Text Modifiers (2 marks)

    image Footnote References (0.5 marks) image Images (0.5 marks)

    image Free Text (1 mark)

    image Headings (1 mark)

    image Blockquotes (1 mark)

    image Code (1 mark)

    image Ordered Lists (2 marks) image Tables (3 marks)

    image Part B: (6 marks): HTML Conversion image Text Modifiers (1 mark)

    image Images (0.5 marks)

    image Footnote References (0.5 marks) image Free Text (0.5 marks)

    image Headings (0.5 marks)

    image Blockquotes (0.5 marks)

    image Code (0.5 marks)

    image Ordered Lists (1 marks) image Tables (1 mark)

    image Part C (6 marks): Adding extra functionality to the webpage image Part D (up to 6 bonus marks): Extension

  5. Report (2 marks)

  6. Code Quality (4 marks)

  7. Marking breakdown

  8. Correctness

  9. Changelog

Minimum Requirements

image Parse up to and including code blocks (with high code quality and good report) for a passing grade.

image Higher mark requires parsing more difficult data structures and modifying the HTML page.

Introduction

image Develop a transpiler to convert Markdown to HTML in Haskell.

image Web page sends Markdown to Haskell backend server, which converts and returns HTML. image Use materials from previous weeks, reference external sources.

image Assignment split into parsing, pretty printing, and extras. Recommend doing Part A and B in

tandem.

image Parse based on Markdown specification with restrictions.

Goals / Learning Outcomes

image Use functional programming and parsing effectively.

image Understand and use key functional programming principles. image Apply Haskell and FP techniques to parse Markdown.

Scope of assignment

image Parse expression into data types and convert to HTML string. image Not required to render Markdown or HTML strings.

Exercises (24 marks)

Part A: (12 marks): Parsing Markdown

image Parse markdown string into Algebraic Data Type (ADT). image Define own ADT and functions to parse requirements. image ADT should have enough info for HTML conversion.

image Add deriving Show to ADT and custom types.

image Export markdownParser :: Parser ADT and convertADTHTML :: ADT -> String . image Example scripts:

image Run stack test to parse Markdown and save output.

image Use npm run dev with stack run main to test in real-time.

Part A – Details

Aside – Text Modifiers (2 marks)

image Italic Text: _italics_

image Bold Text: **bold**

image Strikethrough: ~~strikethrough~~

image Link: [link text](URL)

image Inline Code: `code`

image Footnotes: [^ℤ+] (e.g., [^1] , [^2] ) image No whitespace inside [ and ] . image No nested modifiers.

image Text inside modifiers can have whitespace (excluding new lines).

Images (0.5 marks)

image ![Alt Text](URL “Caption Text”)

image Alt Text, URL, Caption Text don’t consider text modifiers.

image At least one non-newline whitespace between URL and caption text. image No spaces after ! and before [ .

Footnote References (0.5 marks)

image [^2-^]: text (ignore leading whitespace before text).

Free Text (1 mark)

image Any text not following other types, may contain modifiers.

Headings (1 mark)

image # Heading 1 to ###### Heading 6

image Alternative syntax: Heading 1 followed by ====== for level 1, Heading 2 followed by ——

for level 2.

image Headings may have modifiers.

Blockquotes (1 mark)

image Start with > at the beginning of a line.

image Ignore leading whitespace after > and before text. image Text inside can have modifiers.

image No nested block quotes.

Code (1 mark)

image Starts and ends with three backticks (“`), with optional language identifier. image Code block should not consider text modifiers.

Ordered Lists (2 marks)

image Starts with number 1, followed by . and at least one whitespace. image Can have sublists with 4 spaces before each item.

image Items may contain text modifiers. image Don’t handle unordered lists.

Tables (3 marks)

image Use pipes | to separate columns and dashes to separate header and content rows. image Compulsory beginning and ending pipes.

image Each row must have the same amount of columns.

image Cells may contain text with modifiers, ignore leading and trailing whitespace.

Part B: (6 marks): HTML Conversion

image Convert ADT to HTML representation.

image Indent HTML with 4 spaces to reflect tree structure.

image HTML must be a self-contained webpage with appropriate tags.

Part B – Details

Text Modifiers (1 mark)

image Italics: <em>italics</em>

image Bold: <strong>bold</strong>

image Strikethrough: <del>strikethrough</del>

image Link: <a href=”URL”>link text</a>

image Inline Code: <code>code</code>

image Footnotes: <sup><a id=”fn1ref” href=”#fn1″>1</a></sup>

Images (0.5 marks)

image <img src=”URL” alt=”Alt Text” title=”Caption Text”>

Footnote References (0.5 marks)

<p id=”fn1″>My reference.</p>

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] ‌fit2102 programming paradigms 2024 – assignment 2: markdown to html‌‌‌‌
$25