![[ResearchDiary.png]]
## What Sparked This Note?
Building a Research Record for my DBA. I want to put daily activities in my daily note and collate them into a map of content by date.
## Links To Online Content
You can follow the entire iteration with [Claude](https://cloud.typingmind.com/share/cc86b579-1c1b-4cbe-8424-a6d5d654ca27) by following the link.
## Notes
This installation package was generated by Claude Sonnet 3.7 after the script was proved to work in my vault so it could be shared with others.
### Claude says:
To make this solution easily shareable with others, I'll create a reusable "mini-plugin" for Obsidian that allows users to simply paste in their own paths. Here's how to package it up:
# Readme File:
# Research Diary Generator for Obsidian
This script automatically creates a Research Diary note that compiles entries from your daily notes into a chronological table. Perfect for tracking research progress, project notes, or any recurring topic across daily notes.
## Installation
1. **Install Required Plugin:**
- Install [Dataview plugin](https://github.com/blacksmithgu/obsidian-dataview) from Obsidian's Community Plugins
2. **Create a JavaScript Template:**
- Create a new note in your vault
- Paste the entire script from the `research-diary-generator.js` file
- Save this note in a location where you can easily find it, like a "Scripts" folder
## Configuration
Edit the CONFIG section at the top of the script to match your vault structure:
```javascript
const CONFIG = {
// Path where the Research Diary note will be created/updated
RESEARCH_DIARY_PATH: "Path/To/Your/Research Diary.md",
// Tag to look for in daily notes (can be any tag)
TAG_TO_EXTRACT: "#YourTag",
// Header level where the tag appears (e.g., "###" for H3)
HEADER_LEVEL: "###",
// Path to your daily notes folder
DAILY_NOTES_PATH: "Path/To/Daily/Notes",
// Maximum number of recent daily notes to check (for performance)
MAX_DAYS_TO_CHECK: 30,
// Title for your research diary
DIARY_TITLE: "Your Research Diary Title"
};
```
## Actual Script to Edit
This is how the result should look if parameters are all set correctly.
![[ResearchDiary.png]]
### [Download the file from this link](https://risestrategic.au/obsidianFiles/researchDiary.zip)
The file is in zip format. You will need to decompress.
## Usage
### How to Run the Script
1. Open the script in a text editor or VS Code
2. Create a copy to store and work in original
3. Edit the lines of code as above
4. Save the script
5. Create a new Obsidian note called Research Diary or name of your choosing
6. Copy the revised script into the note where you want it to appear in this manner:
1. Insert 3 tildas on the page followed by dataviewjs (tildas = ~) top left of keyboard
2. This will automatically insert another 3 tildas below.
3. Paste your script between the two.
4. Marvel at your brilliance!
7. Add your entries to your daily note under your tag
### How to Add Entries
1. In your daily note, create a header with your chosen tag:
### #YourTag
2. Add bullet points or text below that header
3. Run the script to update your Research Diary
4. Ensure you have another header after the bullet points even if it is blank so the script knows where to stop generating entries.
## Troubleshooting
- If no entries appear, check that:
- Your file paths in CONFIG are correct
- Your daily notes contain headers with the exact tag specified
- The Dataview plugin is installed and enabled
### Advanced: Automation with Templater
If you use the Templater plugin, you can set up the script to run automatically:
1. Move the script to your Templater scripts folder
2. Uncomment the Templater integration code in the script
3. Create a Templater template to execute the script
4. Set up a folder template to run automatically when daily notes are modified
## License
This script is provided under the MIT License. Feel free to modify and share!
### Integration Options
For added functionality, you could integrate this with:
1. **Templater Plugin**: Automatically run when creating new daily notes
2. **QuickAdd Plugin**: Create a macro that can be triggered from the command palette
3. **Buttons Plugin**: Add a button to your Research Diary to refresh it manually
4. **Periodic Notes**: Automatically update the diary when creating weekly/monthly notes