{"id":22303469,"url":"https://github.com/ebullient/sandbox-customjs","last_synced_at":"2025-07-29T03:34:00.760Z","repository":{"id":259449701,"uuid":"877459833","full_name":"ebullient/sandbox-customjs","owner":"ebullient","description":"CustomJS scripts for my Obsidian vaults","archived":false,"fork":false,"pushed_at":"2025-07-13T14:59:06.000Z","size":448,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-24T20:56:35.258Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ebullient.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-23T17:27:23.000Z","updated_at":"2025-07-13T14:59:10.000Z","dependencies_parsed_at":"2024-10-25T14:57:11.341Z","dependency_job_id":"d9c7dd5d-51c3-46b1-ae1f-37004b7d18f4","html_url":"https://github.com/ebullient/sandbox-customjs","commit_stats":null,"previous_names":["ebullient/sandbox-customjs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ebullient/sandbox-customjs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebullient%2Fsandbox-customjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebullient%2Fsandbox-customjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebullient%2Fsandbox-customjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebullient%2Fsandbox-customjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ebullient","download_url":"https://codeload.github.com/ebullient/sandbox-customjs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebullient%2Fsandbox-customjs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267623273,"owners_count":24117160,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-03T18:43:48.317Z","updated_at":"2025-07-29T03:34:00.738Z","avatar_url":"https://github.com/ebullient.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sandbox: CustomJS + JS Engine\n\nThese are the scripts I use in my vault(s) to replace Dataview\n\nI have two vaults: AllTheThings (actually, just most of the things) and Campaign Notes (TTRPG stuff).\n\nI converted my CustomJS scripts to TypeScript, which brings some caveats to keep CustomJS happy.\n\n## Building\n\n```console\npnpm install\n\n# Just build\nnpm run build\n\n# Push built files to repositories\nnpm run push\n\n# Build and watch for changes (and push those changes to repositories)\nnpm run dev\n\n# Lint / Clean up files\nnpm run lint\n```\n\n## Pushing files to repositories\n\nI have two repos, and not all of these scripts go to both places.\n\nI use a json file, `.dev-target.tson` to determine what files to copy where. It contains something like the following: \n\n```json\n{\n  \"_utils.ts\": [\n    \"/path/to/AllTheThings/assets/customjs/\",\n    \"/path/to/campaign-notes/assets/customjs/\"\n  ],\n}\n```\n\nFor each file in there, I define 1..n places it should get pushed. Works for me, you may think it's ridiculous. ;)\n\nThe scripts that achieve this are in `build/`\n\n## Repository structure\n\n### AllTheThings\n\n```\n├ assets/\n│ ├ customjs/\n│ └ templates/\n├ chronicles/\n│ ├ yyyy/\n│ │ ├ yyyy-mm-dd.md \n│ │ ├ yyyy-mm-dd_week.md \n│ │ ├ yyyy-mm_month_.md \n│ │ └ yyyy.md \n│ └ ...\n├ demesne (areas)\n└ quests (projects)\n```\n\nFor PARA-esque areas and projects (with funner names), I fall back to a Franklin-Covey-ish prioritization scheme: urgent and important are first; not-urgent and not-important are last. The frontmatter looks like this: \n\n```yaml\n---\naliases: [\"Note Alias\"]\ntype: quest\nimportant: yes\nurgent: no\nstatus: active\nrole: owner\n---\n```\n\nI prompt for important, urgent, status, and role on creation.\n\n### Campaign Notes\n\n```\n├ assets/\n│ ├ customjs/\n│ └ templates/\n├ heist/\n│ ├ calendar/\n│ │ ├ yyyy-harptosMonth-dd.md \n│ │ └ ... \n│ ├ characters/  (pc notes)\n│ ├ encounters/  (encounter notes: e.g. multi-session events, story threads)\n│ ├ sessions/\n│ │ └ nnn-session-title.md \n│ ├ tables/\n│ │ └ random generator tables\n│ ├ waterdeep/\n│ │ ├ calendar/  (events and holidays) \n│ │ ├ groups/    (notes for groups and factions) \n│ │ ├ npcs/      (notes for npcs) \n│ │ ├ places/    (notes for locations, which may include npcs) \n│ │ └ ... \n│ ├ all-summaries.md\n│ ├ all-timeline.md\n│ ├ grouped-timeline.md\n│ ├ heist.md\n│ └ ...\n└ ...\n```\n\nI use deeply nested tags in my notes. I have templater prompts to work through selecting tags from the right scope for all known tags, etc.\n\nI use a *LOT* of events in my notes (session notes and others).\n\n- I use with Calendarium span tag (never front-matter).\n- I have an emoji key that I use to code event descriptions: \n\nMy events look like this: \n\n```html\n\u003cspan data-date='1499-Mirtul-02-20' data-category='heist' data-name=\"🧵😵🦹💃🗿 Dalakhar makes a run for the Stone and Sky\"\u003e...\u003c/span\u003e\n```\n\n## Development\n\nFor build commands, architecture overview, and development guidance, see [CLAUDE.md](CLAUDE.md).\n\nThis file is primarily written for Claude Code (AI assistant) but contains useful information for human contributors as well, including:\n\n- Build and development commands\n- Project architecture overview\n- Integration points between components\n\n## Scripts\n\nThe Templater templates that work with these scripts are in the templates directory\n\n**Common**\n\n- [_utils.ts](src/_utils.ts) - general utility functions\n- [cmd-missing.ts](src/cmd-task-cleanup.ts) - CustomJS command; evaluate contents of vault, and update a note to list missing links and unreferenced files\n\n**AllTheThings**\n\n- [activity.ts](src/activity.ts) - activity charts, created by counting occurence of tags\n- [cmd-all-tasks.ts](src/cmd-all-tasks.ts) - CustomJS command; create/update a note that embeds `Tasks` sections from some notes\n- [cmd-task-cleanup.ts](src/cmd-task-cleanup.ts) - CustomJS command; evaluate contents of vault. Find tasks completed earlier than this month, and remove their task status (✔️ or 〰️)\n- [dated.ts](src/dated.ts) - Working with dated notes: daily notes for time blocking, weekly notes for planning, monthly for goals/reflection, years for \"dates to remember\"\n- [priority.ts](src/priority.ts) - Functions for working with PARA-esque Projects and Areas, including working with role/priority/status/etc.\n- [tasks.ts](src/tasks.ts) - Functions for working with tasks (specifically, finding the tasks in a file, or collecting a list of tasks completed in a given week)\n- [templater.ts](src/templater.ts) - Functions that augment templater templates (choosing values for prompts, transporting text\n\n**Campaign Notes**\n\n- [campaign.ts](src/activity.ts) - Campaign-specific utility functions\n- [cmd-heist-summaries.ts](src/cmd-heist-summaries.ts) - CustomJS command; merges the summary sections from all heist session notes into one note \n- [cmd-tag-lists.ts](src/cmd-tag-lists.ts) - CustomJS command; evaluate contents of vault. Find all notes with a certain tag, and create a rollable table with a row for each note (dice roller w/o dataview)\n- [cmd-timeline.ts](src/cmd-timeline.ts) - CustomJS command; Use the Calendarium API to find all events for a particular calendar. Update the contents of two notes: all-timeline (all events in chronological order), and grouped-timeline (all events grouped by faction or group, as determined by an emoji in the event title)\n- [reference.ts](src/reference.ts) - utility functions to find and create cross-referencing lists or tables for different types (locations, npcs, areas, factions)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Febullient%2Fsandbox-customjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Febullient%2Fsandbox-customjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Febullient%2Fsandbox-customjs/lists"}