• Authored on
    Body

    Went through the list from last week and was surprised by how much I could hear in my head. I got me wondering if knowing that I am going to look back to see what I can remember is making me try to remember albums more.

    That album from Sly & The Family Stone had so many "whoa" moments on it. The Minutemen rule, but it's kind of a sad listen. Replace the name of the president they were singing about with the current one and check it out. The Hippy Boys got me thinking about how there used to be a lot more instrumental music a long time ago. The album by Cecil Taylor is amazing because it is music built on modules. I love when an album makes me want to go to a place, and the Sir Douglas Quintet did that. Grant Green reminded me how much I love when guitarists make a decision and go with it. Be super sharp and treble-y or take off all the treble.

    • Sly & The Family Stone There's a Riot Goin' On #Soul
    • Minutemen Introducing the Minutemen #Punk
    • The Hippy Boys Reggae with the Hippy Boys #Reggae
    • Cecil Taylor Unit Structures #Jazz   
    • Sir Douglas Quintet The Mono Singles '68-'72 #Rock
    • Grant Green Grant's First Stand #Jazz    
  • Authored on
    Body

    Took a second to update my morning writing workflow. Before, I was using a plug-in in Obsidian to see a word cloud of all my free-writing gibberish. I'd love to automate that step, so I found some JavaScript that I could drop into an Apple Shortcut. I'll add the script below.

    So now my morning flow is to run the Morning shortcut. The shortcut:

    • Creates a random linear drum pattern and puts it in my task list for Today
    • Asks me what I did yesterday and appends it to a text file called Story
    • Asks me what I learned yesterday and appends it to a text file called Wisdom
    • Selects one random Japanese grammar for me to practice and puts it in my task list for Today
    • Selects one thing to deep clean from a list and puts it in my task list for Today

    Doing this seems to incrementally move the pieces forward.

    Here is the Javascript for counting all the words in all the text files in a folder.

    function run(input) {
        var app = Application.currentApplication();
        app.includeStandardAdditions = true;
    
        var folderPath = input[0]; // Get selected folder
        var wordCount = {};
    
        // Get list of .txt files
        var files = app.doShellScript(`find "${folderPath}" -type f -name "*.txt"`).split("\r");
    
        files.forEach(function(file) {
            var content = app.doShellScript(`cat "${file}"`).toLowerCase();
            var words = content.match(/\b[a-zA-Z']+\b/g); // Extract words
    
            if (words) {
                words.forEach(function(word) {
                    if (word.length > 3) { // Ignore short words
                        wordCount[word] = (wordCount[word] || 0) + 1;
                    }
                });
            }
        });
    
        // Sort words by frequency
        var sortedWords = Object.entries(wordCount).sort((a, b) => b[1] - a[1]).slice(0, 100);
    
        // Create output text
        var output = "# Top 100 Words Used:\n\n" + sortedWords.map(([word, count]) => `${count}: ${word}`).join("\n");
    
        return output; // Send to Drafts
    }