Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hrbrmstr/2022-advent-of-code-ojs
🎄 2022 Advent of Code Solutions In OJS
https://github.com/hrbrmstr/2022-advent-of-code-ojs
advent-of-code advent-of-code-2022 d3js observablecollection observablehq
Last synced: 15 days ago
JSON representation
🎄 2022 Advent of Code Solutions In OJS
- Host: GitHub
- URL: https://github.com/hrbrmstr/2022-advent-of-code-ojs
- Owner: hrbrmstr
- License: mit
- Created: 2022-12-03T13:43:54.000Z (about 2 years ago)
- Default Branch: batman
- Last Pushed: 2022-12-26T11:55:58.000Z (about 2 years ago)
- Last Synced: 2024-11-15T14:42:33.427Z (3 months ago)
- Topics: advent-of-code, advent-of-code-2022, d3js, observablecollection, observablehq
- Homepage:
- Size: 58.6 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# 🎄 2022-advent-of-code-ojs
Local Quarto backup of the [Observable collection](https://observablehq.com/collection/@hrbrmstr/2022-advent-of-code) using:
```
#!/bin/bash
# Turn an Observable Notebook Collection into a directory of Quarto projects
#
# Provide the ""@user/collection" as the only command line argument and
# this script will create directories below the current directory filled with
# Quarto projects made with ohq2quarto
#
# System Requirements:
# - htmlq # https://github.com/mgdm/htmlq
# - jq # https://stedolan.github.io/jq/
# - ohq2quarto # https://github.com/hrbrmstr/ohq2quartoif [ -z "$1" ]
then
echo "Usage: col2quarto.sh @user/collection"
exit
ficurl --silent "https://observablehq.com/collection/$1" | \
htmlq --text "script#__NEXT_DATA__" | \
jq -r '.props.pageProps.collection.listings.results[] | "https://observablehq.com/@" + (.owner.login) + "/" + (.slug) ' | \
while read -r OBS_URL
do
SLUG="$(basename "${OBS_URL}")"
ohq2quarto --ohq-ref "${OBS_URL}" --output-dir "${SLUG}"done
```