Skip to content
Discussion options

You must be logged in to vote

With a lot of pain and ChatGPT, I have arrived at this:

```dataviewjs
// Fetch pages from the experiments and reports directories
const experiments = dv.pages('"experiments"').where(p => p.tags && p.tags.includes("experiment_report"));
const reports = dv.pages('"report/exp_analyses"').where(p => p.tags && p.tags.includes("experiment_report"));

// Create maps to store file paths and cleaned names
const experimentMap = new Map();
const reportMap = new Map();

// Helper function to clean names
function cleanName(fileName, prefix) {
    return fileName.replace(/^[\_]+/, "").replace(new RegExp(`^${prefix}_`), ""); // Remove leading underscores and prefix
}

// Populate experimentMap
for (cons…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Gewerd-Strauss
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant