From 6e3c59c02248dc8ee020557234b97a9029dda9f7 Mon Sep 17 00:00:00 2001 From: Breck Yunits Date: Mon, 20 May 2024 06:12:04 -0400 Subject: [PATCH] Code cleanup --- Computer.js | 4 ++-- cli.js | 2 +- code/conceptPage.scroll | 2 +- code/{pldbMeasures.scroll => measures.scroll} | 0 download.scroll | 4 ++-- pages/join.scroll | 6 +++--- readme.scroll | 10 +++++----- 7 files changed, 14 insertions(+), 14 deletions(-) rename code/{pldbMeasures.scroll => measures.scroll} (100%) diff --git a/Computer.js b/Computer.js index 89693591422b..32134b94c4bf 100644 --- a/Computer.js +++ b/Computer.js @@ -4,7 +4,7 @@ const { TreeNode } = require("jtree/products/TreeNode.js") const { Disk } = require("jtree/products/Disk.node.js") const { Utils } = require("jtree/products/Utils.js") const { shiftRight, removeReturnChars } = Utils -const ParserFile = new TreeNode(Disk.read(path.join(__dirname, "code", "pldbMeasures.scroll"))) +const ParserFile = new TreeNode(Disk.read(path.join(__dirname, "code", "measures.scroll"))) const listsFolder = path.join(__dirname, "lists") const pagesDir = path.join(__dirname, "pages") const numeral = require("numeral") @@ -1271,7 +1271,7 @@ codeWithHeader ${this.title} Keywo class Feature { constructor(measure, computer) { this.measure = measure - this.fileName = "pldbMeasures.scroll" + this.fileName = "measures.scroll" this.id = measure.Name this.computer = computer } diff --git a/cli.js b/cli.js index 106a1f332c84..7e33ae0427c9 100755 --- a/cli.js +++ b/cli.js @@ -188,7 +188,7 @@ node_modules/scroll-cli/grammar/blankLine.grammar node_modules/scroll-cli/grammar/measures.grammar node_modules/scroll-cli/grammar/import.grammar node_modules/scroll-cli/grammar/errors.grammar -code/pldbMeasures.scroll` +code/measures.scroll` .split("\n") .map(filepath => Disk.read(path.join(__dirname, filepath))) .join("\n\n") diff --git a/code/conceptPage.scroll b/code/conceptPage.scroll index 1ac17ca151a2..e9dc3fd509aa 100644 --- a/code/conceptPage.scroll +++ b/code/conceptPage.scroll @@ -8,7 +8,7 @@ replaceJs TEMPLATE Tables.getLanguageTemplate(absolutePath); } -import pldbMeasures.scroll +import measures.scroll import ../header.scroll diff --git a/code/pldbMeasures.scroll b/code/measures.scroll similarity index 100% rename from code/pldbMeasures.scroll rename to code/measures.scroll diff --git a/download.scroll b/download.scroll index c66c78f02f19..06ac362da59b 100644 --- a/download.scroll +++ b/download.scroll @@ -13,12 +13,12 @@ css text-overflow: ellipsis; } -Download the PLDB concept database as: CSV | TSV | JSON +Download the PLDB ScrollSet as: CSV | TSV | JSON link pldb.csv CSV link pldb.tsv TSV link pldb.json JSON -import code/pldbMeasures.scroll +import code/measures.scroll loadConcepts concepts Statistics on the measures (columns) are below and can be downloaded as: CSV | TSV | JSON diff --git a/pages/join.scroll b/pages/join.scroll index 0f6eb3ab65de..251d13cc9175 100644 --- a/pages/join.scroll +++ b/pages/join.scroll @@ -16,10 +16,10 @@ Become an active contributor to PLDB! - Write a data backed guest post on the blog link ../posts/index.html blog -- Add or edit languages in the concept database -- Add or edit language features and examples in the concept database +- Add or edit languages to the ScrollSet +- Add or edit language features and examples to the ScrollSet - Improve or add a data importer for a source like Wikipedia or Github -- Write or connect AI models that can add information to the concept database +- Write or connect AI models that can add information to the ScrollSet - Discuss and improve the data grammar and ranking algorithm - Improve the website or codebase diff --git a/readme.scroll b/readme.scroll index d8bc73f5b351..2fb22b28fe7c 100644 --- a/readme.scroll +++ b/readme.scroll @@ -13,12 +13,12 @@ wideColumns 1 import code/ciBadges.scroll -PLDB is a public domain database and website containing over 135,000 facts about over 4,000 programming languages. +PLDB is a public domain ScrollSet and website containing over 135,000 facts about over 4,000 programming languages. -This repo contains the entire database, code, and website for https://pldb.io. +This repo contains the entire ScrollSet, code, and website for https://pldb.io. ## To download the data -The entire database is ready to analyze in popular formats. Full documentation is here: https://pldb.io/download.html +The entire ScrollSet is ready to analyze in popular formats. Full documentation is here: https://pldb.io/download.html - As CSV: https://pldb.io/pldb.csv - As TSV: https://pldb.io/pldb.tsv - As JSON: https://pldb.io/pldb.json @@ -34,7 +34,7 @@ Create a new Scroll file in `concepts` with a unique URL friendly filename and s Edit the corresponding `concepts/*.scroll` file and send a pull request. ## To add a new measure -Update the file `code/pldbMeasures.scroll` and add at least 1 measurement to a concept in `concepts` and send a pull request. +Update the file `code/measures.scroll` and add at least 1 measurement to a concept in `concepts` and send a pull request. ## To build the site locally code @@ -51,7 +51,7 @@ code npm run format ## To explore this repo -The most important folder is `concepts`, which contains a file for each entity. The folder `measures` contains the grammar files (schema) for the database. +The most important folder is `concepts`, which contains the ScrollSet (a file for each concept). The file `code/measures.scroll` contains the Parsers (schema) for the ScrollSet. You can see the `cloc` language stats on this repo at https://pldb.io/pages/about.html. ## To use as an npm package: