release 0.1 - Seneca-CDOT/topics-in-open-source-2022 GitHub Wiki

Release 0.1

Due Date

Sunday September 18th 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 (you can use any programming language you want, even one that's new to you)
  • 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

At first, your static site generator will have only a small number of features. Over time we'll add more.

For this first release, 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 what your tool is for, how to use it, and give examples.

  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. Or, if you want to add a new language to your resume, this is a good chance to practice.

  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 either a file or folder of files as input, 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 valid HTML5 file, 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 to the generated static site.

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 (URL) Language
Your Name https://example.com/blog/1 https://github.com/example/tool-name https://generated-site.com/sample JavaScript
Denes Adam Dolhay https://dev.to/dadolhay/osd600-release-01-1nd4 https://github.com/dadolhay/dadolhay-ssg http://denke.hu/osd600r1/ JavaScript
Rohan Kaicker https://dev.to/rokaicker/osd600-blog-2-release-01-36g0 https://github.com/rokaicker/StaticSiteGenerator https://rohan-ssg-example.vercel.app/ JavaScript
Rudy Chung https://dev.to/rudychung/how-the-sausage-gets-made-28h3 https://github.com/rudychung/SauSaGe https://rudychung.github.io/SauSaGe/ C++
Mario Leonardo https://dev.to/ririio/open-source-development-release-01-2371 https://github.com/Ririio/ririio-ssg https://ririio.github.io/ririio-ssg/ JavaScript
Chan Dinh (Oscar) Phu https://dev.to/lostbutton/my-button-ssg-3e4g https://github.com/LostButton/my-button-ssg https://my-button-ssg.vercel.app/ JavaScript
Neil An https://dev.to/neilan99/creating-my-static-site-generator-2a7g https://github.com/NeilAn99/nan1-ssg https://neilan99.github.io/ JavaScript
Wonkeun No https://dev.to/genne23v/openssg-static-site-generator-55fb https://github.com/Genne23v/wk-ssg https://genne23v.github.io/sherlock-homes-selected-stories/ Java
Chen-Yuan Chu https://dev.to/cychu42/project-static-site-generator-9l6 https://github.com/cychu42/staticSiteCon https://cychu42.github.io/ JavaScript
Alexander Samaniego https://dev.to/alexsam29/dps909-blog-ssg-release-01-5ha4 https://github.com/alexsam29/ssg-cli-tool https://alexsam29.github.io/ssg-cli-tool/ JavaScript
Artem Tanyhin https://dev.to/devils2ndself/static-site-generator-with-go-ssgo-3da8 https://github.com/devils2ndself/SSGo https://devils2ndself.github.io/SSGo/ Go
Stefan Frunza https://dev.to/sfrunza13/static-site-gen-3fel https://github.com/sfrunza13/SiteGenerationTool https://dashing-bienenstitch-9a5f7c.netlify.app/ Python
Piotr Drozd https://dev.to/pdr0zd/piotr-drozd-open-source-release-01-3eig https://github.com/P-DR0ZD/pdrozd-ssg https://p-dr0zd.github.io/pdrozd/ Python
Tong Liu https://dev.to/liutng/release-01-dps909-1egp https://github.com/liutng/SSGifier https://tongluis.ml/ C++
Batuhan Ipci https://dev.to/batunpc/palpatine-release10-350g https://github.com/batunpc/palpatine https://emperor-palpatine.netlify.app/ C++
Tymur Levtsun https://dev.to/myrfion/izyum-not-only-a-wonderful-city-but-also-a-nice-ssg-tool-1ob3 https://github.com/Myrfion/izyum https://myrfion.github.io/izyum/ JavaScript
Samina Rahman Purba https://dev.to/saminarp/rwar-a-simple-static-site-generator-2b5a https://github.com/saminarp/rwar https://rwarr.netlify.app Python
Eakampreet Singh https://dev.to/eakam/rostgen-a-simple-static-site-generator-22pe https://github.com/Eakam1007/rost_gen https://eakam1007.github.io/rost_gen/ Rust
Maxim Nosov https://dev.to/mnosov622/open-source-development-release-01-5f0a https://github.com/mnosov622/simple-ssg1 https://simple-ssg1.vercel.app/ Javascript
Anshul Gandhi https://dev.to/anshul137/dps909-blog-static-site-generator-ag-ssg-release-01-25ln https://github.com/anshul137/ag-ssg https://anshul137.github.io/ag-ssg/ Java Script
Taimoor Dawami https://dev.to/tdaw/osd600-siteit-is-not-a-citation-tool-5cc9 https://github.com/SerpentBytes/siteit https://siteit.vercel.app JavaScript
Ivan Gabrovsky https://blogforwebdevelopment.blogspot.com/2022/09/lab-1-blog.html https://github.com/IvaniGabrovsky/text-ssg-tool https://ivan-text-ssg-tool.netlify.app/ JavaScript
Arryell Parris https://dev.to/aparris21/progress-on-release-01-2f5m https://github.com/a-parris21/ap21-ssg https://a-parris21.github.io/ssg_demo-site/ JavaScript
Gulnur Baimukhambetova https://dev.to/gulyapulya/my-first-command-line-tool-310i https://github.com/gulyapulya/SSGulnur https://ssg-gulnur-sample.vercel.app JavaScript
⚠️ **GitHub.com Fallback** ⚠️