From a0717b21b65db14e6c799877a6d05039d6e4d53b Mon Sep 17 00:00:00 2001 From: thatHexa Date: Mon, 28 Nov 2016 11:58:28 +0200 Subject: [PATCH 1/4] Added missing whitespace and removed unneeded line --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 56e1153b1..9f94591ee 100644 --- a/README.md +++ b/README.md @@ -3,11 +3,10 @@ Hello, World! Hello world in every programming language. -Inspired by[Helloworldcollection.de](http://helloworldcollection.de/) +Inspired by [Helloworldcollection.de](http://helloworldcollection.de/) As I watch the collection expand, this project has blown up more than I ever thought possible. Thanks to everyone who continues to contribute, new languages are created every day! - Spin-Off project smartly suggested and implemented by @zenware Meet [FizzBuzz](https://github.com/zenware/FizzBuzz) the evolution of [hello-world](https://github.com/leachim6/hello-world) From 52dc43af98699002904b3fefb35978e0930b1891 Mon Sep 17 00:00:00 2001 From: thatHexa Date: Mon, 28 Nov 2016 12:04:48 +0200 Subject: [PATCH 2/4] Added auto lang listing and CONTRIBUTING.md Added a small framework for easily updating a list of all languages the repository contains a "Hello World" program in. See CONTRIBUTING.md for a command for updating the listing (using the list_langs.rb Ruby script). --- CONTRIBUTING.md | 10 ++++++++++ README_nolist.md | 12 ++++++++++++ list_langs.rb | 13 +++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 CONTRIBUTING.md create mode 100644 README_nolist.md create mode 100644 list_langs.rb diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..bd49834d1 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,10 @@ +Contributing +============ + +When adding new "Hello World" programs, please name the file according to the language it was written in, don't abbreviate the language name too much (so use "JavaScript", not "JS") but don't make it TOO long (so use "CSS" not "Cascading Style Sheets". Use hyphens ("-") as word seperators, and only use a single dot (for seperating the filename from the extension). For exmaple, a "Hello World" program in Objective C should be named "Objective-C.m, and the one in HTML should be named HTML.html. + +Use +```bash +cat README_nolist.md > README.md; echo >> README.md; echo "### This repository surrently contains "Hello World" programs in the following languages:" >> README.rb; ruby list_langs.rb >> README.md +``` +for updating the list of languages in `README.md`. diff --git a/README_nolist.md b/README_nolist.md new file mode 100644 index 000000000..9f94591ee --- /dev/null +++ b/README_nolist.md @@ -0,0 +1,12 @@ +Hello, World! +============= + +Hello world in every programming language. + +Inspired by [Helloworldcollection.de](http://helloworldcollection.de/) + +As I watch the collection expand, this project has blown up more than I ever thought possible. +Thanks to everyone who continues to contribute, new languages are created every day! + +Spin-Off project smartly suggested and implemented by @zenware +Meet [FizzBuzz](https://github.com/zenware/FizzBuzz) the evolution of [hello-world](https://github.com/leachim6/hello-world) diff --git a/list_langs.rb b/list_langs.rb new file mode 100644 index 000000000..15a4fffec --- /dev/null +++ b/list_langs.rb @@ -0,0 +1,13 @@ +Dir.foreach "." do |odir| + next if odir == "." or odir == ".." or not File.directory?(odir) + Dir.foreach odir do |dir| + next if dir == "." or dir == ".." + currdirname = "" + dir.split(".")[0].gsub("-", " ").split(" ").each do |str| + currdirname << str.capitalize + " " + end + currdirname.chomp(currdirname[-1]) + puts "* #{currdirname}" + end +end + From fcaf0638c4771600e73f7a27378ec9069fd5d1fd Mon Sep 17 00:00:00 2001 From: thatHexa Date: Mon, 28 Nov 2016 12:07:10 +0200 Subject: [PATCH 3/4] Fixed the command and added info --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bd49834d1..1a9bcec9e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,6 +5,6 @@ When adding new "Hello World" programs, please name the file according to the la Use ```bash -cat README_nolist.md > README.md; echo >> README.md; echo "### This repository surrently contains "Hello World" programs in the following languages:" >> README.rb; ruby list_langs.rb >> README.md +cat README_nolist.md > README.md; echo >> README.md; echo "### This repository surrently contains "Hello World" programs in the following languages:" >> README.md; ruby list_langs.rb >> README.md ``` -for updating the list of languages in `README.md`. +for updating the list of languages in `README.md` (make sure you are in the repository's root directory when invoking those commands). From 68aaa83cdf537b0771bba899e0fc119fda1ccf9d Mon Sep 17 00:00:00 2001 From: thatHexa Date: Mon, 28 Nov 2016 12:08:28 +0200 Subject: [PATCH 4/4] Fixed a typo Nobody's perfect :( --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1a9bcec9e..1c4f9b74d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,6 +5,6 @@ When adding new "Hello World" programs, please name the file according to the la Use ```bash -cat README_nolist.md > README.md; echo >> README.md; echo "### This repository surrently contains "Hello World" programs in the following languages:" >> README.md; ruby list_langs.rb >> README.md +cat README_nolist.md > README.md; echo >> README.md; echo "### This repository currently contains "Hello World" programs in the following languages:" >> README.md; ruby list_langs.rb >> README.md ``` for updating the list of languages in `README.md` (make sure you are in the repository's root directory when invoking those commands).