Skip to content

release 0.1

Loran-l edited this page Sep 28, 2021 · 78 revisions

Release 0.1

Due Date

Friday September 17th by midnight.

Overview

You are tasked with building a simple Static Site Generator (SSG). An SSG is a tool for generating a complete HTML web site from raw data and files, without having to author any HTML by hand. Imagine that you have a folder of text files that you want to turn into a website. An SSG allows you to enter a simple command that creates .html output files from a given set of input files.

This first release is designed to expose you to the common workflows and tools involved in contributing to open source projects on GitHub. In order to give every student a similar learning experience, we will all be working on the same project.

This first release is also aimed at putting you in the role of "open source creator" and later "open source maintainer." You will use the code you write in this assignment in subsequent labs during the course to explore various aspects of open source work.

NOTE: in subsequent releases, you will have more freedom to work on different open source projects.

Learning Goals

In addition to the actual code you will write, the ultimate goal of this first release is to help you gain experience in many aspects of open source development, specifically:

  • gaining experience in a programming language by building a real-world tool
  • learning about SSGs
  • working with the basics of git, including branches, commits, etc.
  • creating open source projects on GitHub
  • writing about your own work via your Blog

Static Site Generator Features

Your static site generator will have only a small number of features at first, and over time we'll add more.

You are asked to create a command-line tool (e.g., no GUI, not a web app). Your command-line tool will process input .txt files into generated .html files.

Required Features (implement ALL)

To begin, your tool must include all of the following:

  1. pick a name for your tool. Try not to pick a name that is already used by other projects. I'll call my tool my-ssg for the rest of this document (call yours something more creative!).

  2. create a GitHub Repo for your project, see https://docs.github.com/en/enterprise/2.15/user/articles/create-a-repo

  3. choose an OSI Approved Open Source License for your project and include a LICENSE file in your repo, see https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/licensing-a-repository

  4. create a README.md file, and keep it updated as you write your code, documenting how to use your tool, which features you include, etc. Your README file should tell users how to use your tool.

  5. choose a programming language. You can use a language you know and love, or something new that you've never used before and want to learn. If you're studying a particular language in other courses, consider picking that one so you can get more practice with it.

  6. running your tool at the command-line with the --version or -v flag should print the tool's name and current version.

  7. running your tool at the command-line with the --help or -h flag should print a standard help/usage message showing how to run the tool, which command line flags and arguments can be used, etc.

  8. your tool should allow the user to specify an input file or folder to be processed, using --input or -i:

my-ssg --input file.txt

my-ssg -i ./folder-name

If the input is a folder, your tool should find all .txt files within that folder.

  1. your tool should generate one .html output file for each input file. For example, if I run the tool on doc.txt a new doc.html file will be generated.

The HTML file you generate must be valid, for example:

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Filename</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
  <!-- Your generated content here... -->
</body>
</html>

NOTE: the original file(s) should not be modified, see below for information about where to place output file(s).

  1. you need to deal with marking-up paragraphs: every blank line should be considered a paragraph limit and the text transformed into <p>...</p>. For example, given the following input file:
This is the first paragraph.

This is the second paragraph.

Should be transformed into:

<p>This is the first paragraph.</p>

<p>This is the second paragraph.</p>
  1. your tool should place all output into a ./dist folder by default. That is, if I run the tool, I should end-up with a new folder called dist in the current directory, and it should contain one or more .html files. Each time the tool is run, an existing dist folder should first be removed so that dist always contains the last output.

Optional Feature (implement 2)

In addition to the required features, you are asked to pick 2 of the following optional features to include in your submission:

  1. try to parse a title from your input files. If there is a title, it will be the first line followed by two blank lines. In your generated HTML, use this to populate the <title>...</title> and add an <h1>...</h1> to the top of the <body>.

  2. allow the user to specify a different output directory using --output or -o. If not specified, dist will be used, but if the user specifies a different output path, use that. Print an error if the specified output path is not a valid directory.

  3. allow the user to optionally specify a --stylesheet or -s URL to a CSS stylesheet to be used in the <head> of your generated HTML files. For example: https://cdnjs.cloudflare.com/ajax/libs/tufte-css/1.8.0/tufte.min.css or https://cdn.jsdelivr.net/npm/water.css@2/out/water.css

  4. allow the input to be a deep tree of files and folders. That is, if the user specifies a folder for --input, check to see if any of the items contained within are folders and recursively parse those as well.

  5. if the user specifies a folder for the input, automatically generate an index.html file, which has relative links to each of the generated HTML files.

  6. improve the look and feel of your generated HTML pages using a default stylesheet that you design. Make them responsive, use beautiful fonts and colours, improve the layout and readability of the text.

  7. come up with your own idea. If you have an idea not listed above, talk to your professor and see if it's OK to implement that (it probably is).

Getting Help

For this assignment, everyone must do their own work, but that doesn't mean you can't talk to your colleagues. At every stage of your work, make sure you ask for help, share ideas, and get feedback from others in the class. Please use Slack to help with communication.

Try using community-based, open, collaborative development practices. This means talking with others about your work, and talking to them about theirs, asking for and giving help, and focusing on people as well as code. It also means doing this in public (e.g., on Slack) instead of in private. The goal is to support each other and for us to start building a community.

Requirements

You will be graded on the following. Please make sure you have addressed everything that makes sense below:

  • GitHub Repo exists
  • GitHub Repo contains LICENSE file
  • GitHub Repo contains a README.md file with clear and complete information on the steps to use the tool, examples, and all of its features
  • GitHub README.md is free of typos, spelling mistakes, formatting or other errors
  • GitHub Repo contains project's Source Code
  • Source Code implements all Mandatory Requirements, and each one is Complete and Working
  • Source Code implements 2 of the Optional Requirements, and both are Complete and Working
  • Source Code is well written (consistent formatting, code comments, good naming, etc)
  • Blog Post documents the project, how to use it, which features it includes, and shows examples of how to use it
  • Blog Post contains link to GitHub repo
  • Add Info to Table Below

Sample

You should create your own small sample data to test your work. However, you should also use the Sherlock Holmes Selected Stories I've made available for something larger. NOTE: I've intentional put spaces in the filenames to force you to write code that can handle paths that include spaces!

When you are ready to submit, generate a site from the Sherlock sample stories and post it somewhere on the web (e.g., Vercel, Netlify, GitHub Pages, Glitch, etc). Include a link in your submission.

Submission

When you have completed all the requirements above, please add your details to the table below.

Name Blog Post (URL) GitHub Repo (URL) Link to Sample Site Language
Your Name https://example.com/blog/1 https://github.com/example/tool-name https://generated-site.com/sample JavaScript
Ahmad Rokay https://dev.to/ar/python-static-site-generator-release-0-1-3hk0 https://github.com/a-rokay/static-site-generator https://a-rokay.github.io/release-01/ Python
Ritik Bheda https://dev.to/ritikbheda/commandline-ssg-release-0-0-1-1mlp https://github.com/ritikbheda/commandline-ssg https://ritikbheda.github.io/commandline-ssg/dist/index.html Node.js
Trang Nguyen https://tracy016.medium.com/osd600-build-a-static-site-generator-with-picocli-c34bfb8a33e4 https://github.com/trangntt-016/static-site-generator https://trangntt-016.github.io/static-site-generator/ Java
Tue Nguyen https://dev.to/tuenguyen2911_67/build-a-command-line-program-with-commander-js-16ff https://github.com/TueNguyen2911/tue-1st-ssg https://tuenguyen2911.github.io/static-ssg-dps909/ Javascript
Duc Bui Manh https://medium.com/@manhducdkcb/building-a-static-site-generator-b5ca4b457c48 https://github.com/DukeManh/OSD_SSG https://dukemanh.github.io/OSD_SSG/demo/ Typescript
Vivian Vu https://dev.to/vivianvu/osd600-my-first-command-line-tool-2865 https://github.com/hlavu/my-ssg https://hlavu.github.io/my-ssg/dist/index.html Node.js
Tuan Thanh Tan https://dev.to/tuanthanh2067/build-a-command-line-tool-that-converts-txt-to-html-3je5 https://github.com/tuanthanh2067/cv-ssg https://tuanthanh2067.github.io/cv-ssg/static/ Javascript
Minh Quan Nguyen https://mqnguyen.hashnode.dev/say-hello-to-mini-a-nodejs-static-site-generator https://github.com/mqnguyen5/mini-ssg https://mqnguyen5.github.io/mini-ssg/dist/Silver%20Blaze.html JavaScript
Kunwarvir Dhillon https://dev.to/dhillonks/cli-ssg-0-0-1-node-js-based-static-site-generator-199n https://github.com/dhillonks/cli-ssg https://cli-ssg.vercel.app/ JavaScript
Le Minh Pham https://medium.com/@lmpham1/cool-ssg-generator-documentation-4233d1eeb5bf https://github.com/lmpham1/cool_ssg_generator https://lmpham1.github.io/cool_ssg_generator-Sample/ Python
Luigi Zaccagnini https://dev.to/luigizaccagnini/open-source-static-site-generator-3953 https://github.com/LuigiZaccagnini/octo https://luigizaccagnini.github.io/octo/ JavaScript
Oliver Pham https://dev.to/oliverpham/static-site-generator-for-text-files-release-0-1-note-586d https://github.com/oliver-pham/silkie https://oliver-pham.github.io/silkie/dist/The%20Adventure%20of%20the%20Speckled%20Band Python
Kevan Yang https://dev.to/pandanoxes/node-js-static-site-generator-release-0-1-0-7g6 https://github.com/Kevan-Y/text-ssg https://text-ssg.vercel.app/ JavaScript
Eugene Chung https://ycechung-opensource.blogspot.com/2021/09/built-command-line-tool-to-turn-txt-to.html https://github.com/ycechungAI/cmd-ssg https://ycechungai.github.io/cmd-ssg/ Javascript
Jia Hua Zou https://medium.com/@jhzou/cli-static-site-generator-with-node-js-release-0-1-9eac37ac96fc https://github.com/JiaHua-Zou/Jia_SSG https://jiahua-zou.github.io/Jia_SSG.github.io/ Node.js
Joshua Li https://dev.to/jli/lennah-a-simple-static-site-generator-pbp https://github.com/joshuali7536/LennahSSG https://joshuali7536.github.io/LennahSSG/ C++
Jiyun Jung https://dev.to/jjung99/my-first-open-source-project-with-ssg-3g0g https://github.com/jjung99/a1-ssg.git Javascript
Hung Nguyen https://dev.to/nguyenhung15913/osd600-static-site-generator-release-0-1-5a5d https://github.com/nguyenhung15913/OSD600-SSG https://nguyenhung15913.github.io/generatedhtml/ JavaScript
Minh Hang Nguyen https://dev.to/minhhang107/nodejs-static-site-generator-release-0-1-oel https://github.com/minhhang107/mh-ssg https://minhhang107.github.io/mh-ssg/dist/Silver%20Blaze.html Node.js
Japneet Singh Kalra https://dev.to/japneetsingh035/static-site-generator-using-swift-223b https://github.com/japneetsingh035/ModernSSG https://japneetsingh035.github.io/ModernSSGO/index.html Swift
Andrew Tassone https://dev.to/drew5494/a-simple-static-site-generator-the-great-site-generator-v0-1-5d47 https://github.com/drew5494/the-great-site-generator https://drew5494.github.io/the-great-site-generator/the-great-site-generator-sample.html C++
Anatoliy Serputov https://medium.com/@aserputov/qck-ssg-eb593782b856 https://github.com/aserputov/qck-ssg-final https://cli-ssg-qck-cmp74iuwg-aserputov.vercel.app Node.js
Chi Kien Nguyen https://dev.to/kiennguyenchi/osd600-week-2-release-0-1-j37 https://github.com/kiennguyenchi/potato-generator https://kiennguyenchi.github.io/potato-generator/dist/Sherlock-Holmes-Selected-Stories.html C++
Gustavo Tavares https://dev.to/gmotgit/my-first-open-source-program-gmot-ssg-3737 https://github.com/GMOTGIT/GMOT-SSG https://osd600release01-gustavo.vercel.app/ JavaScript
Thanh Cong Van https://dev.to/tcvan0707/text-2-html-converter-4fc https://github.com/tcvan0707/txt2html https://tcvan0707.github.io/txt2html/ JavaScript
Andrei Batomunkuev https://medium.com/@andreibatomunkuev/first-project-in-open-source-development-course-static-site-generator-7c574e295c0b https://github.com/abatomunkuev/static_site_generator https://abatomunkuev.github.io/static_site_generator/ Python
Irene Park https://dev.to/irenejoeunpark/static-site-generator-3jjh https://github.com/irenejoeunpark/ssgApplication https://irenejoeunpark.github.io/ssg/ Java
Minsu Kim https://dev.to/mkim219/kimchi-ssg-release-0-01-1oik https://github.com/mkim219/kimchi-ssg https://mkim219.github.io/kimchi-ssg/ C#
Reza Poursafa https://medium.com/@rezapscodes/build-a-static-site-generator-with-commander-js-c195fe1fdbc8 https://github.com/Reza9472/StaticSiteGenerator https://static-site-results.vercel.app Javascript
Andre Willomitzer https://dev.to/andrewillomitzer/texttohtml-my-first-open-source-tool-1enm https://github.com/AndreWillomitzer/textToHTML_V2 https://texttohtml.netlify.app/ JavaScript(NodeJS)
Francesco Menghi https://dev.to/menghif/dodo-static-site-generator-v0-1-d5b https://github.com/menghif/dodo-SSG https://menghif.github.io/dodo-SSG/ Javascript
Xiongye Jiang https://dev.to/derekjxy/my-first-ssg-59m8 https://github.com/DerekJxy/My-First-SSG https://derekjxy.github.io/My-First-SSG/ JavaScript
Alex Romanova https://dev.to/sirinoks/ssgnode-nel https://github.com/sirinoks/SSGNode https://sirinoks.github.io/SSGNode/ Node.js
Gus McCallum https://dev.to/gusmccallum/gas-ssg-4poe https://github.com/gusmccallum/GAS-ssg https://gusmccallum.github.io/ C++
Roxanne Lee https://medium.com/@Roxanne.Lee/release-0-1-0-b33d00a9242d https://github.com/rclee91/SiteGen https://rclee91.github.io/SiteGen/ Node.js
Leyang Yu https://dev.to/lyu4321/jellybean-a-static-site-generator-created-in-node-js-30h7 https://github.com/lyu4321/jellybean https://lyu4321.github.io/jellybean/ Node.js
Jun Song https://dev.to/juuuuuuun/ssg-for-generating-html-2eib https://github.com/juuuuuuun/jun-ssg https://elastic-stonebraker-3b2ad9.netlify.app/ Node.js
Mizuho Okimoto https://dev.to/okimotomizuho/pajama-ssg-simple-static-site-generator-with-node-js-ipk https://github.com/MizuhoOkimoto/pajama-ssg https://pajama-ssg.vercel.app/ Node.js
Tengzhen Zhao https://dev.to/yodacanada/release-0-1-1l49 https://github.com/Yoda-Canada/Magic-SSG https://yoda-canada.github.io/Magic-SSG-Sample/ Python
Emily Phan https://dev.to/hphan9/cli-tool-with-net-and-c-517k https://github.com/hphan9/shinny-ssg https://hphan9.github.io/shinny-ssg.html C#
Suhhee Kim https://dev.to/suhhee1011/suhheessgosd-release0-1-23jd https://github.com/suhhee1011/suhheeKim_OSD_release0.1_create_ssg https://suhhee1011.github.io/suhheeKim_OSD_release0.1_create_ssg/ Node.js
Tuan Phong Nguyen https://blog.andrewnt.dev/post/osd-600-series-collaborating-on-projects https://github.com/Andrewnt219/paper-csharp https://paper-csharp.vercel.app/ C#
Roman Rezinkin https://dev.to/romanrezinkin/romanstaticsg-25gj https://github.com/roman-rezinkin/RomanStaticSG https://roman-rezinkin.github.io/RomanStaticSG/demo/ Python
Qiwen Yu https://dev.to/qiwenyu/static-site-generator-texthtmlpress-jd8 https://github.com/Qiwen-Yu/TextHTMLPress http://localhost:63342/TextHTMLPress-main/dist/Silver%20Blaze.html?_ijt=a4fg8ul2uf3bb240job2c1boas Python
loran-l https://loran.hashnode.dev/release-1-journey https://github.com/Loran-l/txt-to-html-converter TODO Python
Amasia Nalbandian https://dev.to/amasianalbandian/release0-1-ho6 https://github.com/AmasiaNalbandian/static-site-generator https://amasianalbandian.github.io/static-site-generator/ JavaScript
Antonio Bennett https://dev.to/antoniobennett/rust-static-site-generator-rssg-release-0-1-0-3o9e https://github.com/Antonio-Bennett/rssg https://antonio-bennett.github.io/ Rust
Diana Belokon https://dev.to/belokond/glazed-donut-release-0-1-22nc https://github.com/dbelokon/glazed-donut https://dbelokon.github.io/ C#
Gerardo Enrique Arriaga Rendon https://dev.to/jerryhue/yassgy-release-0-1-1fok https://github.com/JerryHue/yassgy https://jerryhue.github.io/ Rust
James Mai https://dev.to/beamazedvariable/release-0-0-1-should-have-start-things-earlier-ade https://github.com/BeAmazedVariable/TS-SSG https://beamazedvariable.github.io/TS-SSG/ Typescript

Python Club:

Name Blog Post (URL) GitHub Repo (URL) Link to Sample Site Language
Ahmad Rokay link link link Python
Le Minh Pham link link link Python
Oliver Pham link link link Python
Andrei Batomunkuev link link link Python
Tengzhen Zhao link link link Python
Roman Rezinkin link link link Python
Qiwen Yu link link link Python
loran-l link link TODO Python
Clone this wiki locally