Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
breck7 committed Oct 11, 2024
1 parent 7bc2d19 commit 88ac90e
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 17 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@breck/wws",
"version": "0.15.0",
"version": "0.16.0",
"description": "The World Wide Scroll",
"main": "wws.js",
"engines": {
Expand Down
4 changes: 4 additions & 0 deletions releaseNotes.scroll
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ node_modules/scroll-cli/microlangs/changes.parsers

thinColumns 1

📦 0.16.0 10/11/2024
🎉 store data in users home dir. Thanks TD!
🏥 bug fixes

📦 0.15.0 10/11/2024
🎉 added http://scroll

Expand Down
6 changes: 3 additions & 3 deletions root.parsers
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ nameParser
extends abstractIdParser
description What is the folder name?

folderTitleParser
crux title
descriptionParser
crux description
extends abstractStringMeasureParser
description What is this site about? Maximum 7 words.
description What is this folder about? Maximum 7 words.
float sortIndex 1.001

webParser
Expand Down
16 changes: 8 additions & 8 deletions root.scroll
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildMeasures wwsMeasures.tsv
root.parsers

name public
title A Public Domain Company
description A Public Domain Company
web https://publicdomaincompany.com
source https://publicdomaincompany.com/publicdomaincompany.com.git
editor Breck Yunits
Expand All @@ -17,7 +17,7 @@ rep Breck Yunits
transactionId pi_3Q8SqRJktJxKl0r50QNBJBv1

name wifinder
title WiFinder: find great wifi near you
description WiFinder: find great wifi near you
web https://wifinder.wiki
source https://wifinder.wiki/wifinder.wiki.git
editor Breck Yunits
Expand All @@ -28,9 +28,9 @@ rep Breck Yunits
transactionId pm_1Q5Y9HJktJxKl0r5jeY4nOdh

name news
title BuilderNews: Watch people try web creations
description BuilderNews: Watch people try web creations
web https://news.pub
source http://news.pub/news.pub.git
source https://news.pub/news.pub.git
editor Breck Yunits
email breck7@gmail.com
registered 9/22/2024
Expand All @@ -39,7 +39,7 @@ rep Breck Yunits
transactionId pm_1Q1qilJktJxKl0r5ASsCMZ5K

name zombo
title You can do anything.
description You can do anything.
web https://zombo.togger.com
source http://zombo.togger.com/zombo.togger.com.git
editor Breck Yunits
Expand All @@ -50,7 +50,7 @@ rep Breck Yunits
transactionId pm_1Pz4fFJktJxKl0r537cx4sCs

name pldb
title A Programming Language DataBase
description A Programming Language DataBase
web https://pldb.io
source https://github.com/breck7/pldb
branch wws
Expand All @@ -62,7 +62,7 @@ rep Breck Yunits
transactionId pm_1PQxCOJktJxKl0r5l24p6Zwu

name breck
title Breck's Blog
description Breck's Blog
web https://breckyunits.com
source https://breckyunits.com/breckyunits.com.git
editor Breck Yunits
Expand All @@ -73,7 +73,7 @@ rep Breck Yunits
transactionId pm_1PQxCOJktJxKl0r5l24p6Zwu

name scroll
title A language for scientists of all ages
description A language for scientists of all ages
web https://scroll.pub
source https://github.com/breck7/scroll
editor Breck Yunits
Expand Down
14 changes: 9 additions & 5 deletions wws.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
const parseArgs = require("minimist")
const path = require("path")
const fs = require("fs")
const os = require("os")
const child_process = require("child_process")
const express = require("express")
const dns = require("dns")
Expand All @@ -25,7 +26,7 @@ const sanitizeFolderName = name => name.toLowerCase().replace(/[^a-z0-9._]/g, ""

class WWSCli extends SimpleCLI {
get wwsDir() {
return path.join(__dirname, "wws")
return path.join(os.homedir(), ".wws")
}

server = null
Expand Down Expand Up @@ -88,7 +89,7 @@ class WWSCli extends SimpleCLI {
"index.scroll": `The World Wide Scroll\n`
}
Disk.writeObjectToDisk(wwsDir, initFolder)
return this.log(`\n👍 Initialized new WWS cache in '${wwsDir}'.`)
return this.log(`\n👍 Initialized new WWS copy in '${wwsDir}'.`)
}

async buildIndexPage() {
Expand All @@ -103,7 +104,8 @@ buildHtml
center
Your copy of the WWS is stored in \`${wwsDir}\`. ${this.fetchedFolders.length}/${this.folders.length} folders fetched. WWS version: ${WWS_VERSION}.
../header.scroll
// todo: fix root includes in scroll and remove below.
${fs.readFileSync("header.scroll")}
center
table
Expand Down Expand Up @@ -170,7 +172,7 @@ viewSourceUrl https://github.com/breck7/wws/blob/main/wws.js
const { fetched, name, description } = folder
return {
" ": fetched ? "🟩" : "⬜️",
Folder: folder,
Folder: name,
Description: description
}
})
Expand Down Expand Up @@ -205,7 +207,9 @@ viewSourceUrl https://github.com/breck7/wws/blob/main/wws.js
this.log(`Fetching ${folderName}`)
Disk.mkdir(rootFolder)
// do a shallow clone of the built site (wws branch) into the folder:
child_process.execSync(`git clone --depth 1 --branch ${gitBranch} ${gitSource} ${rootFolder}`)
const cloneCommand = `git clone --branch ${gitBranch} ${gitSource} ${rootFolder}`
console.log(cloneCommand)
child_process.execSync(cloneCommand)
} else {
// update the shallow clone but still keep it shallow
this.log(`Updating ${folderName}`)
Expand Down

0 comments on commit 88ac90e

Please sign in to comment.