Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate creation of README.md #41

Open
jima80525 opened this issue Sep 13, 2017 · 4 comments
Open

Automate creation of README.md #41

jima80525 opened this issue Sep 13, 2017 · 4 comments

Comments

@jima80525
Copy link

Hi!
I love the idea and am adopting it myself. I've created a script which will auto-generate the README.md file using the information already in the directory structure and the titles of each of the TIL markdown files. I've got it working and producing output that is close: the diffs are:

  • alphabetization is different when python does it than some of your choices
  • you missed a # in front of Webpack
  • Someplaces you have custom capitalization (CSS instead of Css)
  • You also missed this line:

As I said, I've got the generation script, but I'm still thinking about how to get it into the work-flow. The options I can think of tonight are:

  1. a git hook which runs on pre-commit which modifies the README.md
  2. just have it as a command in the project that can be run manually

Neither of these are making me happy this evening, so I'm asking you if you have any ideas, that is, if you're interested at all.

Either way, Thanks for the great idea! I really like what you did. I'll admit I created my own before I saw your instructions (or thought about) forking your starter repo.

Thanks again!

@matthewwo
Copy link
Contributor

matthewwo commented Dec 28, 2017

git-hook seems reasonable for this use! What's your concern with using that?

Additionally I think it's useful to exit non-zero in the pre-commit hook if the script detects a mistake in the README file.

@jima80525
Copy link
Author

I'm not sure I remember why I didn't like the git-hook. I suspect I was mis-remembering where that hook ran. It runs on the client and so it's easy to install (server side hooks take a bit more access, at least). Totally agree on the return code. I'll try to get that added in the next few days. 👍

@jima80525
Copy link
Author

@prankymat - just added instructions on how to do it as a git hook to the template version of til over here:
til-collective/til-collective#6

Let me know if that's what you had in mind. Great idea!

@nirajpandkar
Copy link

A very handy script! Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants