This video demonstrates outputting the HTML page and completing the solution.
- [Instructor] In this video,…we'll finish our solution by generating the output file.…First, let's go see what the original file looks like.…I'm going into resources and website.…Then I'll navigate into programs…and on graphic-design I'll right-click, Open in Browser,…and click Default.…Our original webpage looks like this…and we wanna append our tables here.…Navigating back to our code,…now we'll write a main function, defn -main.…
This function doesn't need any arguments.…First, I'll use the built-in function spit,…which does the opposite of slurp,…it writes a file when you give it a file name…and a string of file contents you want.…So, for the file name, I'll use…resources/website/programs/output.html.…Next, for the string of contents I'll call render.…This will produce our output.…Since main can be called from the command line,…I'll want to print a simple message,…just to say, Generated HTML.…
Now, I'll right-click, go to REPL,…and click, Load file in REPL, to load in our new code.…Now, I'll toggle over to the REPL to run our program.…
Skill Level Intermediate
1. Problem 1: Exploring Lake Pend Oreille
2. Problem 2: Image Analysis
3. Problem 3: Eight Queens
4. Problem 4: Accessing Peripherals
5. Problem 5: Recursion and Directories
6. Problem 6: Building the Web
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.