Skip to content

Commit

Permalink
Generate showcase.json and showcase.md.
Browse files Browse the repository at this point in the history
  • Loading branch information
artob committed Nov 12, 2024
1 parent 29b688b commit 2805e8e
Show file tree
Hide file tree
Showing 4 changed files with 234 additions and 10 deletions.
41 changes: 33 additions & 8 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,40 @@
require 'json'
require 'stringio'

PROJECTS = Dir['projects/**/*.json'].sort.freeze
SHOWCASE = Dir['showcase/**/*.json'].sort.freeze

task default: %w(projects.json projects.md)
task default: %w(projects.json projects.md showcase.json showcase.md)

file 'projects.json': PROJECTS do |t|
File.open(t.name, 'w') do |out|
out.puts JSON.pretty_unparse(projects(t.prerequisites))
out.puts generate_json(t.prerequisites)
end
end

file 'projects.md': PROJECTS do |t|
File.open(t.name, 'w') do |out|
out.puts "| Name | Summary | Repository |"
out.puts "| :--- | :------ | :--------- |"
projects(t.prerequisites).each do |project|
out.puts generate_markdown(t.prerequisites)
end
end

file 'showcase.json': SHOWCASE do |t|
File.open(t.name, 'w') do |out|
out.puts generate_json(t.prerequisites)
end
end

file 'showcase.md': SHOWCASE do |t|
File.open(t.name, 'w') do |out|
out.puts generate_markdown(t.prerequisites)
end
end

def generate_markdown(input_paths)
StringIO.open do |out|
out.puts "| Project | Summary | Repository |"
out.puts "| :------ | :------ | :--------- |"
load_projects(input_paths).each do |project|
project_name = project['name']
project_link = "[#{project_name}](#{project['homepage']})"
project_desc = project['shortdesc']['en']
Expand All @@ -30,11 +50,16 @@ file 'projects.md': PROJECTS do |t|
end
out.puts "| " + [project_link, project_desc, project_vcs].join(" | ") + " |"
end
out.string
end
end

def projects(project_paths = PROJECTS)
project_paths.map do |project_path|
JSON.parse(File.read(project_path))
def generate_json(input_paths)
JSON.pretty_unparse(load_projects(input_paths))
end

def load_projects(input_paths)
input_paths.map do |input_path|
JSON.parse(File.read(input_path))
end
end
4 changes: 2 additions & 2 deletions projects.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
| Name | Summary | Repository |
| :--- | :------ | :--------- |
| Project | Summary | Repository |
| :------ | :------ | :--------- |
| [anaphoric-variants](https://www.hexstreamsoft.com/libraries/anaphoric-variants/) | Gives access to anaphoric variants of operators through one macro: ANAPHORIC. The user explicitly provides a variable name, preserving sanity, in contrast to the traditional use of an evil implicit variable ("IT"). Some operators can bind additional handy variables when explicitly requested. | [GitHub](https://github.com/Hexstream/anaphoric-variants) |
| [asciiart](https://github.com/frankbraun/asciiart) | Parser for hierarchical ASCII art. | [GitHub](https://github.com/frankbraun/asciiart) |
| [bubble-operator-upwards](https://www.hexstreamsoft.com/libraries/bubble-operator-upwards/) | A function that "bubbles an operator upwards" in a form, demultiplexing all alternative branches by way of cartesian product. This operation is notably useful for easy implementation of certain kinds of shorthand notations in macros. A cartesian-product function is also exported, as it's needed to implement the main function. | [GitHub](https://github.com/Hexstream/bubble-operator-upwards) |
Expand Down
182 changes: 182 additions & 0 deletions showcase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
[
{
"name": "furl",
"homepage": "https://github.com/gruns/furl",
"shortdesc": {
"en": "URL parsing and manipulation made easy."
},
"repository": {
"browse": "https://github.com/gruns/furl",
"location": "https://github.com/gruns/furl.git"
},
"license": "https://github.com/gruns/furl/blob/master/LICENSE.md"
},
{
"name": "gl3w",
"homepage": "https://github.com/skaslev/gl3w",
"shortdesc": {
"en": "Simple OpenGL core profile loader."
},
"repository": {
"browse": "https://github.com/skaslev/gl3w",
"location": "https://github.com/skaslev/gl3w.git"
},
"license": "https://github.com/skaslev/gl3w/blob/master/UNLICENSE"
},
{
"name": "Kakoune",
"homepage": "https://kakoune.org",
"shortdesc": {
"en": "An experimental text editor heavily inspired by Vim."
},
"repository": {
"browse": "https://github.com/mawww/kakoune",
"location": "https://github.com/mawww/kakoune.git"
},
"license": "https://github.com/mawww/kakoune/blob/master/UNLICENSE"
},
{
"name": "Miniz",
"homepage": "https://github.com/richgel999/miniz",
"shortdesc": {
"en": "A single-source-file, high-performance deflate/inflate compression library with a zlib-compatible API."
},
"repository": {
"browse": "https://github.com/richgel999/miniz",
"location": "https://github.com/richgel999/miniz.git"
},
"license": "https://github.com/richgel999/miniz/blob/master/miniz.c#L621"
},
{
"name": "node-rdf",
"homepage": "https://npmjs.com/package/rdf",
"shortdesc": {
"en": "An ECMAScript/Node.js library for handling RDF data."
},
"repository": {
"browse": "https://github.com/awwright/node-rdf",
"location": "https://github.com/awwright/node-rdf.git"
},
"license": "https://github.com/awwright/node-rdf/blob/master/UNLICENSE"
},
{
"name": "Poolboy",
"homepage": "https://github.com/devinus/poolboy",
"shortdesc": {
"en": "A hunky Erlang worker pool factory."
},
"repository": {
"browse": "https://github.com/devinus/poolboy",
"location": "https://github.com/devinus/poolboy.git"
},
"license": "https://github.com/devinus/poolboy/blob/master/UNLICENSE"
},
{
"name": "Protoflow",
"homepage": "https://protoflow.rs",
"shortdesc": {
"en": "Protoflow implements flow-based programming (FBP) for Rust using Protocol Buffers messages."
},
"repository": {
"browse": "https://github.com/AsimovPlatform/protoflow",
"location": "https://github.com/AsimovPlatform/protoflow.git"
},
"license": "https://github.com/AsimovPlatform/protoflow/blob/master/UNLICENSE"
},
{
"name": "RDF.rb",
"homepage": "https://rubygems.org/gems/rdf",
"shortdesc": {
"en": "A Ruby library for working with Resource Description Framework (RDF) data."
},
"repository": {
"browse": "https://github.com/ruby-rdf/rdf",
"location": "https://github.com/ruby-rdf/rdf.git"
},
"license": "https://github.com/ruby-rdf/rdf/blob/develop/UNLICENSE"
},
{
"name": "RSS-Bridge",
"homepage": "https://github.com/RSS-Bridge",
"shortdesc": {
"en": "A PHP web application that generates RSS feeds for websites that don't have one."
},
"repository": {
"browse": "https://github.com/RSS-Bridge/rss-bridge",
"location": "https://github.com/RSS-Bridge/rss-bridge.git"
},
"license": "https://github.com/RSS-Bridge/rss-bridge/blob/master/UNLICENSE"
},
{
"name": "stb",
"homepage": "https://github.com/nothings/stb",
"shortdesc": {
"en": "A set of single-file public domain libraries for C/C++."
},
"repository": {
"browse": "https://github.com/nothings/stb",
"location": "https://github.com/nothings/stb.git"
},
"license": "https://github.com/nothings/stb/blob/master/docs/why_public_domain.md"
},
{
"name": "Tor.rb",
"homepage": "https://rubygems.org/gems/tor",
"shortdesc": {
"en": "A Ruby library for interacting with the Tor anonymity network."
},
"repository": {
"browse": "https://github.com/dryruby/tor.rb",
"location": "https://github.com/dryruby/tor.rb.git"
},
"license": "https://github.com/dryruby/tor.rb/blob/master/UNLICENSE"
},
{
"name": "Tween-o-Matic",
"homepage": "https://github.com/simonwhitaker/tween-o-matic",
"shortdesc": {
"en": "A macOS application for designing CAMediaTimingFunction animation curves."
},
"repository": {
"browse": "https://github.com/simonwhitaker/tween-o-matic",
"location": "https://github.com/simonwhitaker/tween-o-matic.git"
},
"license": "https://github.com/simonwhitaker/tween-o-matic/blob/master/UNLICENSE"
},
{
"name": "UN",
"homepage": "https://unlicense.developpez.com",
"shortdesc": {
"en": "Aiming to write a public domain all-purpose standard library for Java."
},
"repository": {
"browse": "https://bitbucket.org/Eclesia/un-lib",
"location": "https://bitbucket.org/Eclesia/un-lib.git"
},
"license": "https://bitbucket.org/Eclesia/un-lib/src/master/license/UNLICENSE.txt"
},
{
"name": "WjCryptLib",
"homepage": "https://github.com/WaterJuice/WjCryptLib",
"shortdesc": {
"en": "A collection of cryptographic functions written in C."
},
"repository": {
"browse": "https://github.com/WaterJuice/WjCryptLib",
"location": "https://github.com/WaterJuice/WjCryptLib.git"
},
"license": "https://github.com/WaterJuice/WjCryptLib/blob/master/UNLICENSE"
},
{
"name": "youtube-dl",
"homepage": "https://rg3.github.io/youtube-dl/",
"shortdesc": {
"en": "A command-line program to download videos from YouTube.com and a few more sites."
},
"repository": {
"browse": "https://github.com/rg3/youtube-dl",
"location": "https://github.com/rg3/youtube-dl.git"
},
"license": "https://github.com/rg3/youtube-dl/blob/master/LICENSE"
}
]
17 changes: 17 additions & 0 deletions showcase.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
| Project | Summary | Repository |
| :------ | :------ | :--------- |
| [furl](https://github.com/gruns/furl) | URL parsing and manipulation made easy. | [GitHub](https://github.com/gruns/furl) |
| [gl3w](https://github.com/skaslev/gl3w) | Simple OpenGL core profile loader. | [GitHub](https://github.com/skaslev/gl3w) |
| [Kakoune](https://kakoune.org) | An experimental text editor heavily inspired by Vim. | [GitHub](https://github.com/mawww/kakoune) |
| [Miniz](https://github.com/richgel999/miniz) | A single-source-file, high-performance deflate/inflate compression library with a zlib-compatible API. | [GitHub](https://github.com/richgel999/miniz) |
| [node-rdf](https://npmjs.com/package/rdf) | An ECMAScript/Node.js library for handling RDF data. | [GitHub](https://github.com/awwright/node-rdf) |
| [Poolboy](https://github.com/devinus/poolboy) | A hunky Erlang worker pool factory. | [GitHub](https://github.com/devinus/poolboy) |
| [Protoflow](https://protoflow.rs) | Protoflow implements flow-based programming (FBP) for Rust using Protocol Buffers messages. | [GitHub](https://github.com/AsimovPlatform/protoflow) |
| [RDF.rb](https://rubygems.org/gems/rdf) | A Ruby library for working with Resource Description Framework (RDF) data. | [GitHub](https://github.com/ruby-rdf/rdf) |
| [RSS-Bridge](https://github.com/RSS-Bridge) | A PHP web application that generates RSS feeds for websites that don't have one. | [GitHub](https://github.com/RSS-Bridge/rss-bridge) |
| [stb](https://github.com/nothings/stb) | A set of single-file public domain libraries for C/C++. | [GitHub](https://github.com/nothings/stb) |
| [Tor.rb](https://rubygems.org/gems/tor) | A Ruby library for interacting with the Tor anonymity network. | [GitHub](https://github.com/dryruby/tor.rb) |
| [Tween-o-Matic](https://github.com/simonwhitaker/tween-o-matic) | A macOS application for designing CAMediaTimingFunction animation curves. | [GitHub](https://github.com/simonwhitaker/tween-o-matic) |
| [UN](https://unlicense.developpez.com) | Aiming to write a public domain all-purpose standard library for Java. | [Bitbucket](https://bitbucket.org/Eclesia/un-lib) |
| [WjCryptLib](https://github.com/WaterJuice/WjCryptLib) | A collection of cryptographic functions written in C. | [GitHub](https://github.com/WaterJuice/WjCryptLib) |
| [youtube-dl](https://rg3.github.io/youtube-dl/) | A command-line program to download videos from YouTube.com and a few more sites. | [GitHub](https://github.com/rg3/youtube-dl) |

0 comments on commit 2805e8e

Please sign in to comment.