Skip to content

release 0.1

Avelyn Hyunjeong Choi edited this page Sep 22, 2023 · 41 revisions

Release 0.1

Due Date

September 18th by midnight.

Overview

You are tasked with building a simple a command-line tool for authoring "Today I Learned" posts in Markdown, which can be converted to HTML for publishing on the web.

"Today I Learned" or TIL as it's more commonly known, is a post format in which the author shares something they've learned about a topic. Programmers and open source developers often use them to leave notes to themselves and others about concepts, technologies, and patterns they discover in their work.

Simon Willison is a prolific open source developer, blogger, and TIL author, and describes them like this:

A TIL—Today I Learned—is the most liberating form of content I know of.

Did you just learn how to do something? Write about that.

Call it a TIL—that way you’re not promising anyone a revelation or an in-depth tutorial. You’re saying “I just figured this out: here are my notes, you may find them useful too”.

I also like the humility of this kind of content. Part of the reason I publish them is to emphasize that even with 25 years of professional experience you should still celebrate learning even the most basic of things.

I learned the “interact” command in pdb the other day! Here’s my TIL.

I started publishing TILs in April 2020. I’m up to 346 now, and most of them took less than 10 minutes to write. It’s such a great format for quick and satisfying online writing.

My collection lives at https://til.simonwillison.net/—which publishes content from my simonw/til GitHub repository.

Imagine that you've spent the day researching some topic, and have loose notes, some screenshots, and a few snippets of code. You'd like to turn this into something you can post on the web without having to author HTML manually. Your TIL tool will allow you to enter a simple command that will convert everything to .html output file.

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 the freedom to work on real open source projects, but this first one is designed to give you a specific set of experiences.

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 static site generation, blogging, Markdown, HTML
  • working with the basics of git, including branches, commits, etc.
  • creating open source projects on GitHub
  • writing about your own work via your Blog

TIL Features

At first, your tool 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 and 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 til 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. GitHub README files are written in Markdown, which is a format you need to become comfortable using.

  5. choose a programming language. You can use any language you want: pick one 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. Students in previous semesters have used JavaScript, TypeScript, Python, C++, Go, Rust, Ruby, etc.

  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:

til ./file.txt

til ./folder-name

If the input is a .txt file, it should process that file; if it's a directory, your tool should look for and find all .txt files within that folder, processing each one.

  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 write output file(s) to a ./til folder by default. That is, if I run the tool, I should end-up with a new folder called til in the current directory, and it should contain one or more .html files. Each time the tool is run, an existing til folder should first be removed so that til always contains the latest output.

Optional Feature (implement at least 2)

In addition to the required features, you are asked to pick at least 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, til will be used, but if the user specifies a different output path, use that. Your program should create the directory if it does not exist.

  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: til -s https://cdnjs.cloudflare.com/ajax/libs/tufte-css/1.8.0/tufte.min.css notes.txt or til -s https://cdn.jsdelivr.net/npm/water.css@2/out/water.css notes.txt

  4. if the user specifies a folder as input, do a recursive search for .txt files and re-create this directory hierarchy in the output directory.

  5. 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.

  6. generate social media sharing and SEO <meta> tags and allow the user to include command-line args to populate this info (e.g., --author, --image, etc)

  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
  • GitHub Repo contains an examples/ directory with some sample/test TIL posts
  • 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 and include it in an examples/ folder in the repo. Use your work on this release to write some TIL posts, sharing things you learn as you work.

When you are ready to submit, generate a web site with tool post it somewhere on the web (e.g., Vercel, Netlify, GitHub Pages, Glitch, etc) Only host the built, static HTML, not the server itself. 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/til https://generated-site.com/sample JavaScript
Soham Thaker https://dev.to/soham-thaker/my-first-open-source-software-33hf https://github.com/sdthaker/Node-TILify https://sdthaker.github.io/Node-TILify/ JavaScript
Hyunjeong Choi https://dev.to/avelynhc/cli-processes-input-txt-files-generating-corresponding-html-files-4ijl https://github.com/avelynhc/til_tracker https://avelynhc.github.io/til_tracker/ TypeScript
Omar Hussein https://dev.to/omalk98/tilvert-my-first-open-source-project-5705 https://github.com/omalk98/TILvert https://omalk98.github.io/TILvert TypeScript
Maryam Najibi https://dev.to/mnajibi/introducing-tml-your-text-to-html-command-line-companion-3mbh https://github.com/mnajibi/tml https://mnajibi.github.io/tml Python
Seog-Jun Hong https://dev.to/seogjun/til-tool-command-line-converter-from-txt-to-html-8mb https://github.com/seog-jun/til-tool https://seog-jun.github.io/til-tool TypeScript
Rachit Chawla https://dev.to/rachit1313/my-journey-into-open-source-creating-my-first-tool-2j72 https://github.com/Rachit1313/txtToWeb https://txttoweb.netlify.app/ Python
Bhavikkumar Mistry https://dev.to/bhmistry/introducing-txttohtml-command-line-tool-transform-your-text-files-into-html-5elc https://github.com/bhavik001/TxtToHTML.git https://discreet-petal-crepe.glitch.me/ JavaScript
Paul Kim https://dev.to/paulkim26/til-to-html-a-markdown-to-html-conversion-tool-coj https://github.com/paulkim26/til-to-html https://paulkim26.github.io/til-to-html/ TypeScript
Amnish Singh Arora https://dev.to/amnish04/til-the-builder-135a https://github.com/Amnish04/til-page-builder https://6505272991bdff5a49cc51b6--tangerine-caramel-f7c5ca.netlify.app/ Python
Marco Pasqua https://dev.to/pasqua101/txt-to-html-conversion-tool-3j9l https://github.com/Pasqua101/txt-to-HTML-converter https://transcendent-tiramisu-e4917a.netlify.app/ Python
Ian Buenconsejo https://dev.to/rook4715/tiller-1c3o https://github.com/rook4715/tiller https://rook4715.github.io/ JavaScript
Pavel Belokon https://dev.to/pbelokon/bukurain-release-001-2goh https://github.com/pbelokon/BukuRain https://650780f590e9f37d97c20098--stupendous-pony-122a75.netlify.app/ JavaScript
Roy J. Wignarajah https://dev.to/rjwignar/first-command-line-tool-4c37 https://github.com/rjwignar/ctil https://rjwignar.github.io/ctil-website/ C++
Nicolas Amatuzio https://dev.to/namatuzio/an-intro-to-tiller-the-text-to-html-miller-49k8 https://github.com/Namatuzio/tiller https://namatuzio.github.io/tiller/ Python
Sher Ali Khan https://dev.to/alikhan1998/building-a-today-i-learned-til-tool-in-python-3a8j https://github.com/alikhan1998/TIL-Markdown2 https://alikhan1998.github.io/TIL-Markdown2/ Python
Yumei Wang https://dev.to/wanggithub0/converttxttohtml-a-new-command-line-tool-can-process-txt-files-into-html-3l6g https://github.com/WangGithub0/ConvertTxtToHtml https://wanggithub0.github.io/ConvertTxtToHtml/ Java
Mingming Ma https://dev.to/mingming-ma/introducing-txt2html-convert-your-txt-into-html-with-ease-38h3 https://github.com/mingming-ma/txt2html https://mingming-ma.github.io/txt2html-generate/test1.html Python
Ian Jacobs https://dev.to/ijacobscpa/textml-2gic https://github.com/ijacobs-cpa/textml https://ijacobs-cpa.github.io/textml/examples/liveTest/index.html Python
Muzzammil Ismathhimam https://dev.to/mismathh/my-first-open-source-project-tilerator-cjk https://github.com/mismathh/TILerator https://mismathh.github.io/TILerator/ JavaScript
Katie Liu https://dev.to/katiel/go-go-web-my-txt-to-html-converter-4l9o https://github.com/kliu57/go-go-web https://kliu57.github.io/gogoweb/ Python
Amir Helali https://dev.to/ahelaliesfahani/txt2statichtml-release-01-5b8h https://github.com/Amir-Helali/Txt2StaticHtml https://amir-helali.github.io/Txt2StaticHtml/ C#
Jilesh Patel https://dev.to/jilesh980/my-first-til-for-text-to-html-converter-1h69 https://github.com/Jilesh980/Text-To-HTML https://flourishing-bunny-8216f8.netlify.app/ JavaScript
Ronald Roldan https://dev.to/rabroldan/waypoint-4p5o https://github.com/rabroldan/Waypoint https://rabroldan-github-io.vercel.app/ Python
Shaily Shah https://dev.to/sshah135/release-10-text-to-html-converter-4og8 https://github.com/sshah135/Converter-txtToHtml file:///C:/Users/User/Documents/Converter-txtToHtml/til/example.html JavaScript
Bryce Seefieldt https://dev.to/bseefieldt/making-til-posts-ezer-479e https://github.com/bryce-seefieldt/ez-txt2html https://bryce-seefieldt.github.io/ez-txt2html/ Python
Vishnu Das Puthukudi https://dev.to/vishnudas2003/simplify-text-to-html-conversion-with-text2page-58k3 https://github.com/Vishnudas2003/Text2Page https://vishnudas2003.github.io/Text2Page/ Python
Yousef Majidi https://dev.to/yousefmajidi/learn2blog-1chc https://github.com/Yousef-Majidi/Learn2Blog https://release01-samples.glitch.me C#