Life Admin Pack Index in Apple Notes

If you want to use the index from the Life Admin Pack in Apple Notes, I have found a solution that works 90+%.

This requires that you have a Mac and some confidence with the Terminal.app.

General workflow

  1. Install Homebrew, if not already
  2. Install pandoc through Homebrew
  3. Convert a copy of the Obsidian folder from markdown to HTML (see example script)
  4. Import the HTML files in Notes.app

Known issues

The tags with a slash are not recognised by Notes.app. You can remove these lines or replace the slash (/) with a double hyphen (--). Do this in the markdown files before conversion .

I intend to remove all default tags and add a #JDex tag to be able to create a Smart Folder to create a flat list of all index files.

I have found a few quirks in the converted HTML file. For example, the table in 15.50 is not perfect. I have not spent any time to fix this with pandoc, but you might tune or tweak it yourself. I myself will fix this manually in Notes.

The converted HTML files are all in one folder. If you want to have these in subfolders for areas and categories, you should manually create the folder structure (or also copy it from the pack) and move the files in the appropriate folder before you import. When importing, Notes.app will provide you the option to ā€˜preserve folder structureā€™, which you should do.

Example script

A sample bash conversion script (thank you, ChatGPT) might look like this (only run this at your own risk if you understand it).

You should only need to specify the location of the Obsidian folder of the Life Admin Pack in SOURCE_DIR.

jdex2notes.sh

#!/bin/bash

# Check if pandoc is installed
if ! command -v pandoc &> /dev/null
then
    echo "Pandoc is not installed. Please install it and try again."
    exit 1
fi

# Directory containing the source files to be copied
SOURCE_DIR="source_files"
# Get the list of source Markdown files
SOURCE_FILES=("$SOURCE_DIR"/*.md)

# Get the user's Desktop path
DESKTOP_DIR="$HOME/Desktop"

# Directory where the Markdown files are located
INPUT_DIR="$DESKTOP_DIR/markdown_files"
# Directory where the HTML files should be saved
OUTPUT_DIR="$DESKTOP_DIR/html_files"

# Create the input directory if it doesn't exist
if [ ! -d "$INPUT_DIR" ]; then
    mkdir -p "$INPUT_DIR"
fi

# Create the output directory if it doesn't exist
if [ ! -d "$OUTPUT_DIR" ]; then
    mkdir -p "$OUTPUT_DIR"
fi

# Clean the output directory by removing any existing files
rm -f "$OUTPUT_DIR"/*.html
echo "HTML output directory has been cleaned."

# Copy the Markdown files from the source directory to the input directory
cp "${SOURCE_FILES[@]}" "$INPUT_DIR"

# Check if there are any Markdown files in the input directory
if [ ${#SOURCE_FILES[@]} -eq 0 ]; then
    echo "No Markdown files found in $SOURCE_DIR."
    exit 1
fi

# Loop through each .md file in the input directory
for md_file in "$INPUT_DIR"/*.md; do
    # Get the filename without the extension
    filename=$(basename "$md_file" .md)
    # Convert the .md file to .html
    pandoc "$md_file" -o "$OUTPUT_DIR/$filename.html"
    echo "$md_file has been converted to $OUTPUT_DIR/$filename.html"
done

# Delete the copied Markdown files from the input directory
rm "$INPUT_DIR"/*.md
echo "Copied Markdown files have been deleted from $INPUT_DIR."

echo "All files have been copied, converted, and cleaned up."

Example after import

1 Like

Whoa! Nice effort. Thank you.

Which got me thinkingā€¦

You could provide an extra HTML version of the pack index in a next release in an ā€˜Apple Notesā€™ subfolder aside Bear and Obsidian. :wink:

1 Like

I will! I had no idea that Notes could import HTML. Will test out this week.

1 Like

Done! Thanks to ChatGPT and about two hours of tinkering.

Why why why couldnā€™t they have just built a markdown importer. Whyyyyyyy.

For those who ever consider migrating from Apple Notes to Obsidian. There is a fairly decent importer.

1 Like