Skip Navigation
InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)MI
Michelle @sh.itjust.works
Posts 0
Comments 3
Does anyone have a collection of templates for daily notes?
  • This is the code for showing the previous and next days, but only if they are created. So if you have June 26 and are on that note, but you don't have the 25th or 27th created but you do have the 24th created, it will display something like this ← 2023-06-24 | 2023-W26 | (none) → with the middle one here being the week.

    I took this dataviewjs code I found from the obsidian forums and modified it slightly:

    class PreviousNextDay {
        base_path = "a journal/"
    
        display(dv) {
            var none = '(none)';
            var t = dv.current().file.day ? dv.current().file.day.toISODate() : luxon.DateTime.now().toISODate();
    
            var year = moment(t, format).format("YYYY");
            
            var p = dv.pages('"' + this.base_path + year + '"').where(p => p.file.day).map(p => [p.file.name, p.file.day.toISODate()]).sort(p => p[1]);
    
            // Obsidian uses moment.js; Luxon’s format strings differ!
            var format = app['internalPlugins']['plugins']['daily-notes']['instance']['options']['format'] || 'YYYY-MM-DD';
    
            var week_format = 'gggg-[W]WW';
            var week = moment(t, format).format(week_format);
    
            var nav = [];
            var today = p.find(p => p[1] == t);
            var next = p.find(p => p[1] > t);
            var prev = undefined;
            p.forEach(function (p, i) {
                if (p[1] < t) {
                    prev = p;
                }
            });
            nav.push(prev ? '[[' + prev[0] + ']]' : none);
            nav.push(today ? '[[' + week + ']]' : "N/A");
            nav.push(next ? '[[' + next[0] + ']]' : none);
    
            dv.paragraph(' ← ' + nav[0] + ' | ' + nav[1] + ' | ' + nav[2] + ' → ');
        }
    }
    
  • Does anyone have a collection of templates for daily notes?
  • I use the plugins CustomJS, Dataview, and Templater to make this daily journal entry.

    A few notes about this template:

    • The file name is YYYY-MM-DD so I make an alias in the format of "Mon June 26 2023" so it's easier for me to search for specific day later
    • I use CustomJS to import my dataviewjs files to display the previous and next days, any birthdays for today, and any backlinks to this journal entry
    • I used \ so this all displays in a single code block, don't include these when using a template in obsidian
    ---
    aliases: <% tp.date.now("ddd MMMM D YYYY", 0, tp.file.title, "YYYY-MM-DD") %>
    title: 
    day: <% tp.file.title %>
    ---
    
    \```dataviewjs
    const {PreviousNextDay} = customJS
    PreviousNextDay.display(dv)
    \```
    
    ---
    
    # <% tp.date.now("ddd MMMM D YYYY", 0, tp.file.title, "YYYY-MM-DD") %>
    
    \```dataviewjs
    const {Birthdays} = customJS
    Birthdays.display(dv)
    \```
    
    \```dataviewjs
    const {Backlinks} = customJS
    Backlinks.display(dv)
    \```
    
    ## Journal
    
    
  • What apps do you use in conjunction with Obsidian?
  • the only things I use with it are OneDrive to sync my files on desktop, then the OneSync app on my android so I can use obsidian on my phone. I also back up all markdown and other text files in my vault with git (I'm not using the obsidian git plugin for this).

    I have some javascript files that I use for dataview so I edit those in vscode

  • What are the keyboard shortcuts you use the most?
  • I'd recommend going into settings/options and having a look at the "Hotkeys" tab. There's a lot of things that aren't currently set, or default hotkeys that might be useful to you, like:

    • Toggle pin - (not set by default) I set this to ctrl + shift + p which pins the current tab so it can't be replaced with another tab
    • Close current tab - By default it's set to ctrl + w
    • Command palette - opens the command palette. By default it's set to ctrl + p. The command palette is amazing because it shows you everything in the "Hotkeys" tab. So you don't even need a hotkey set to use something. Like you can open the command palette and search for "release notes" and it will show you the current release notes. If you have the emoji plugin installed, you can open the command palette and search for "emoji" and it will open the emoji toolbar.
    • Quick switcher - search by note title. By default it's set to ctrl + o. But I have the Omnisearch plugin installed so I set this hotkey to that instead.

    The plugin QuickAdd is really useful here as well, you can create your own hotkeys. I made one so when I press ctrl + n it creates a new note in a specific folder with today's date and time as the file name, so I can quickly write something down.

  • What python project(s) are you currently working on?
  • Yeah I'm not sure where that change should be made, all depends on the source code and how much of a pain it would be to change something like that. Could always be a front end change with some javascript, the downside being javascript needs to be enabled and it wouldn't work on any mobile apps.

  • What do you use Obsidian for?
  • I started to use it as a personal journal (with the help of Templater and Periodic Notes). HUGE upgrade from trying to use wordpress as a journal 😭

    But now I also use it as my central collection of notes (about programming, video games, recipes I like, really good short stories or blog posts). Pretty much anything I want to remember, find interesting, or want to learn more about later. I used to have my notes littering my desktop and cloud storage accounts but I've since moved everything into Obsidian. Recently I figured out how QuickAdd works, so now when I press ctrl + n it quickly creates a new note with today's date and time which is a lifesaver.

  • What python project(s) are you currently working on?
  • Yes! I've got it on github here. I've forgotten to update the readme but I've added a --watch flag as well (watches my Obsidian blog posts folder for changes every 10 seconds then only copies over the files that were changed).

    I haven't dealt with images yet. Currently I throw the images up onto my server then I can link to them in Obsidian, and the link stays the same for Hugo as it's regular markdown for external images:

    ![alt text](link_to_image_on_my_server)

    I don't use images too much currently so this messy setup works for now.

  • What python project(s) are you currently working on?
  • I've made a small python script to copy over blog posts I write from Obsidian to Hugo, and change the hyperlinks from the markdown format to the Hugo format.

    I really love working on small projects in python, such a great language.

  • Your top 5 plugins?
    • Periodic Notes
    • Templater (works really well with Periodic Notes)
    • QuickAdd
    • Dataview
    • I made my own plugin to convert all pngs in my vault into slightly compressed jpgs (as long as there's no transparent pixels in the image)

    (just tried omnisearch because of this post and it's such a good plugin)