journal
all all entries rss SoML excited dreams runes YRUU ultimate KTRU skate sleepy nihongo
Rob is 20,118 days old today.
prev day next day printable version

Entries this day: mens-circle-process thanks-to-fred-for-helping-with-mt3.com trying-to-use-castanet-theme

mens circle process

10:59 Thursday 19 July 2018 JST

Tonight I chose to work on my anger related to things not going my way.

Anger: why is this person standing blocking the escalator keeping people from going up?

Anger: why would R-san not trust a professional wine taster that he knows how to taste wine without getting drunk?

Anger: why would A-san suggest popcorn style for people to speak up instead of just asking each person?

Following the anger back, I came upon a scene in the game room back in the house where we lived until I was 7 years old. We had some slot cars that my dad showed me how to put oil on the cars to make them go faster. I put oil on them and basically clogged up the motors so they hardly ran at all.

My dad was so mad at me. He's the one who fuckin' showed me how to add oil to them!!

In my mind, I went back to the scene to just sit with myself-at-age-7 and be with him. Daddy was at work; mommy was at work. He was alone playing with the cars, likely trying to show his brother or the neighbor kids how to make the cars faster.

In my mind, I went to bat for 7-year-old-me when my dad came home. "Well, you showed him how to do it, and he did it. It's gonna be okay."

I allowed 7-year-old-me to come live in my heart and everything be okay.

I withdrew the projection that A-san doing popcorn style is imperfect. It's going to be okay.

I withdrew my projection that R-san should assume pro-san knows what he is doing. Maybe he doesn't.

I withdrew the projection that escalator-san was doing anything wrong by standing there. Maybe they are keeping back a few seconds so I won't get hit by a car later.

permalink

thanks to fred for helping with mt3.com

16:12 Thursday 19 July 2018 JST

Fred smurfed a script for me to smurf the markdown files related to Marble Track 3 into their own directory so I can use Hugo to smurf them into a website dedicated to Marble Track 3.

    #!/bin/bash
    # 
    # USAGE:
    #   $0 [year] |less     # visually confirm correct output
    #   $0 [year] |bash     # execute output.  dangerous!
    #   
    # Warning: 
    #   The output of this script is NOT protected against 
    #   funny characters in filenames or other bugs/unusual output.
    #   That's why this script does NOT change any file!
    #   It outputs a guess at the commands to perform the desired change.
    #   YOU MUST VISUALLY INSPECT THE OUTPUT BEFORE EXECUTING IT
    #  
    
    
    # set variable values.
    # also set values inside is_mt3 and process_files.
    
    # set these values
    
    year=${1:-2018}
    mt3_dest_dir=~/mt3/site/blog
    export mt3_dest_dir
    
    # return value is an exit status
    is_mt3() {
      local f="$1"
        
      # set these values
      local num_lines=4
      local string="mt3"
    
      # grep's exit code tells if we want this file,
      # meaning, has a line that:
      #   starts with "tags"
      #   contains $string
      head -n$num_lines "$f"   \
        |grep ^tags            \
        |grep "$string"        \
        >/dev/null
    
      return $?;                                # grep's exit code
    }
      
    
    # do a thing if file is an mt3 file
    process_file() {
      local g="$1"
       
      if is_mt3 "$g"   # need quotes in case filename has whitespace
      then
        local d=`dirname "$g"`
        local mt3_ddd="$mt3_dest_dir/$d"
    
        # Crude echo command, that does NOT escape anything!
        # Output is very vulnerable to funny chars in filename [;"\/]
        # Need a year/month from the file's subdir, in the dest dir.
        #
        # Crude but effective to mkdir the destination each time;
        # when you modify this script to accept all years in advance,
        # you can also have it make all the dest dirs in advance.
        echo
        echo mkdir -p \"$mt3_ddd\"
        echo cp \"$g\"    \"$mt3_ddd\"
      fi
    }
    
    
    # these must be exported, so the bash command in the "find" below
    # has access to them.
    export -f is_mt3
    export -f process_file
    
    
    echo mkdir -p \"$mt3_dest_dir\"
     
    
    # main()
    # only the shell can execute shell functions,
    # and so -exec has to run a shell:
    find $year -type f -exec bash -c 'process_file {}' \;
permalink

trying to use castanet theme

22:20 Thursday 19 July 2018 JST

I am trying to use castanet but cannot get it to show blog entries.

I guess I should more carefully read the docs for castanet.

07:02 Friday 20 July 2018 JST

One problem was having tags listed not in quotes. I had to change this

tags: [ "mt3" ]

to this

tags: [ "mt3" ]
permalink
prev day next day