Fixed but How? 🤷🏼‍♂️ Jan 16 '23 Needing Serious Advice re: Losing Faith in Apple Notes

I suppose there is small comfort in that! :slightly_smiling_face:

This is disappoint to read but confirms my decision to abandon AN except for the occasional temporary note.

Anyone using the Apple Pencil with Notebooks that can share the experience?

Thank you, I’ll take a closer look at this to see what I think. I suspect this will not be ideal for me because I’ve settled on OF as my task manager.

Thanks, I’ll take a closer look at Notebooks. Much appreciated.

You may want to try a different browser to clip sites into UpNote. For example, for a given site I find that using the UpNote web clipper in Firefox generally gets a much better result than using the UpNote web clipper in Brave.

Which confirms my decision to abandon AN.

1 Like

that’s interesting, never thought that would produce different results. Would give it a go, thanks

I really enjoyed reading your post and workflow - thanks! I’m in the middle of working through a new system using Things 3 and Craft. Quick question:

Is there a particular reason you split PKM and filing, research and PDF management? I’m continually debating with myself about having one or two apps for this. I can see some strengths of Notebooks compared to Craft (e.g. files) but then I wonder about having to manage, search, organize two apps instead of one. Or alternatively, why not use the Finder for pdfs/files - how has Notebooks app struck a chord for you? I’m curious about your thoughts and hoping it will help me make some decisions! :slight_smile:

Are you still using obsidian as the repository from Readwise? I’m thinking through meeting notes vs articles and summaries and leaning toward obsidian for that sort of “pkm or second brain” since it’s all text.

Yes, I’m using Obsidian for my research files and atomic notes (PKM). However, I’ve canceled Readwise, I can’t justify the cost. Instead, I just use Bookcision to download all of my book highlights and notes to Obsidian. It’s free and I can find anything I need.

I, too, have been bitten by a Notes sync issue. Also, all of the (old) advice that can be found about restoring a previous Notes DB is wrong (or, I haven’t found the right article, yet).

To help address the possibility that I’ll lose my Notes data, I have taken three steps.

  1. I consider Notes a temporary, or an additional, location for my data. I use the app for projects - each note represents a project - and journaling - each note is a day (and I am a heavy Logitech Crayon v2 user).
  2. When I’m done with the note or some time has passed, I export the notes to PDF (which, besides text, is probably the most future-proof format around). They are kept in my Documents folder, which is synced to iCloud. I shunned “Desktop & Documents” in iCloud, for years, but, since a copy is always kept on my Mac, and I’m granted the ability to find and search for files via the Files.app in iOS, I think the tradeoffs are worth it.
  3. I backup my notes to HTML files, weekly. HTML files can be imported relatively easily back into the Notes app. To save space/clutter, I do just the ones that changed since the last backup. I use the script below.

Yes, it’s all a lot of work and completely silly. Apple should do better, here. But, I’ve been around long enough to know that, no matter the tool or technology, you do yourself a lot of favors by being able to control and manage your data to a certain extent. No tool or company will save you, ultimately.

set wkhtmltopdfPath to "/usr/local/bin/wkhtmltopdf"

property fontName : "Helvetica"

property A4Width : 700
property A4Height : 990

-- Apple uses <object> tags to represent attachments, which is useless on export.
-- We convert these to img tags that point to the attachment file on disk
-- Assumption: all attachments are images.
property objectStart : "<object type=\"application/x-apple-msg-attachment\" data=\""
property objectEnd : "\"></object>"

property imageDivStart : "<div class=\"image\">"
property imageDivEnd : "</div>"
property imageStart : "<img src=\""
property imageEnd : "\" />"

property styleSheet : "<head>
<style>
body {
  font-family: \"" & fontName & "\";
}
.image {
  width: " & A4Width & "px;
  height: " & A4Height & "px;
}
div.image img {
  display: inline-block;
  vertical-align: middle;
  max-height: 100%;
  max-width: 100%;
}
</style>"

-- Remove colons and limit the length of the title because the title is
-- used as the filename and Mac doesn't allow colons in filenames
on buildTitle(originalText)
	set normalizedText to my replace(originalText, ":", "-")
	set finalTitle to my firstChars(normalizedText, 100)
	return finalTitle
end buildTitle

-- Search and replace text in a string
on replace(originalText, fromText, toText)
	set AppleScript's text item delimiters to the fromText
	set the item_list to every text item of originalText
	set AppleScript's text item delimiters to the toText
	set originalText to the item_list as string
	set AppleScript's text item delimiters to ""
	return originalText
end replace

-- Truncate a string to maxChars
on firstChars(originalText, maxChars)
	if length of originalText is less than maxChars then
		return originalText
	else
		set limitedText to text 1 thru maxChars of originalText
		return limitedText
	end if
end firstChars

-- Write filecontents to filename as UTF-8
on writeToFile(filename, filecontents)
	set the output to open for access file filename with write permission
	set eof of the output to 0
	write ((ASCII character 239) & (ASCII character 187) & (ASCII character 191)) to output
	write filecontents to the output starting at eof as «class utf8»
	close access the output
end writeToFile

-- Convert a date to YYYY-MM-DD HHMMSS
on convertDate(dateToConvert)
	set y to text -4 thru -1 of ("0000" & (year of dateToConvert))
	set m to text -2 thru -1 of ("00" & ((month of dateToConvert) as integer))
	set d to text -2 thru -1 of ("00" & (day of dateToConvert))
	set h to text -2 thru -1 of ("00" & (hours of dateToConvert))
	set min to text -2 thru -1 of ("00" & (minutes of dateToConvert))
	set s to text -2 thru -1 of ("00" & (seconds of dateToConvert))
	return y & "-" & m & "-" & d & " " & h & min & s
end convertDate

on imageNeedsScaling(imageFile)
	try
		tell application "Image Events"
			set thisImage to open imageFile
			copy the dimensions of thisImage to {h, w}
			close thisImage
		end tell
		
		if h > A4Height or w > A4Width then
			return true
		else
			return false
		end if
		
	end try
	
	return false
end imageNeedsScaling

on createObjectTag(contentIdentifier)
	set resultString to objectStart & contentIdentifier & objectEnd
	return resultString
end createObjectTag

on createImgTag(attachmentName, addDiv)
	set resultString to imageStart & attachmentName & imageEnd
	
	if addDiv then
		set resultString to imageDivStart & resultString & imageDivEnd
	end if
	return resultString
end createImgTag
set currentRunDate to my convertDate(current date)
set rootFolder to "fusion:Users:john:Files:Notes app:Notes.app Exports:"

tell application "Finder"
	try
		set lastRunDate to name of last item of (sort every folder of folder rootFolder by name)
	end try
	make new folder at rootFolder with properties {name:currentRunDate}
end tell

tell application "Notes"
	activate
	
	set exportFolder to rootFolder & currentRunDate & ":"
	
	repeat with each in every note
		set noteName to name of each
		set noteBody to body of each
		set noteTitle to my buildTitle(noteName)
		set modifiedDate to my convertDate(modification date of each)
		set tempFiles to {}
		
		-- Use a search and replace to add the style
		set noteBody to styleSheet & my replace(noteBody, "<head>", styleSheet)
		set filename to ((exportFolder as string) & noteTitle & ".html")
		-- set filename to ((exportFolder as string) & (my convertDate(creation date of each)) & " " & noteTitle & ".html")
		-- set outputFilename to ((exportFolder as string) & (my convertDate(creation date of each)) & " " & noteTitle & ".pdf")
		
		-- Save each attachment to a file so each one can be rendered
		-- with the html.
		
		-- START ONLY GET MODIFIED FILES SINCE X FOR EXPORT
		
		if modifiedDate > lastRunDate then
			-- SEE END OF IF AT BOTTOM
			tell each
				repeat with each in every attachment
					set attachmentFilename to ((exportFolder as string) & noteTitle & " " & name of each)
					
					try
						tell each to save in attachmentFilename
					end try
					-- Put the filename in the list so we can delete it easily later.
					set end of tempFiles to attachmentFilename
					-- Replace the object tag data attribute with a reference
					-- to the attachment filename so the image can be rendered
					
					set objectTag to my createObjectTag(content identifier of each)
					
					-- If the image is bigger than the width or height of
					-- the page, put it inside a fixed size <div> and scale it down
					-- to fit.
					set scaleImage to my imageNeedsScaling(attachmentFilename)
					set imageTag to my createImgTag(name of each, scaleImage)
					
					set noteBody to my replace(noteBody, objectTag, imageTag)
				end repeat
			end tell
			
			my writeToFile(filename, noteBody as text)
			-- Put the filename in the list so we can delete it easily later.
			set end of tempFiles to filename
			
			
			-- END ONLY GET MODIFIED FILES SINCE X FOR EXPORT
		end if
		-- SEE START OF IF AT TOP
		
	end repeat
	
end tell
1 Like

As a V1 (orange) Crayon user do you know if there’s a real improvement to functionality here? Except a clearly improved design decision to get rid of that stupid orange rubber cap that keeps coming off!

In terms of exporting handwritten notes in iOS I’ve had good success with Nebo. Their handwriting recognition is fantastic even with my scrawl. The only thing is that there is no export (of the OCRd text layer) to md, but only txt. I mostly write in markdown so as an in between solution I push all my OCRd handwritten notes as txt to Drafts, and from there on either to Obsidian or to Devonthink. I’m very close to not carrying analogue notebooks at all anymore. This circumvents any syncing problems entirely, too. But if you are a heavy user then the multiple steps may become tedious.

1 Like

I just discovered one advantage of using Upnote. I recently start playing around in the Linux world, totally a newbie there. One thing that I am familiar and can sync my notes across many platforms is Upnote. I use the Upnote web clipper on Firefox on a Debian box that I run my Home Assistant server. Upnote is really the gem that I keep going back to

2 Likes

I like that there is a physical on/off switch on the v2. I hated that membrane on the v1. That was the main driver for me.

1 Like

Sorry for the late reply… I had intended to keep everything in Craft. However, as nice as Craft is, it’s not a filing cabinet. You can’t search and find content inside attached files. It’s a great document creator, note editor, and has good integration with task managers etc. It also makes sharing of notes or entire spaces easy.

To solve the filing cabinet problem, I had considered just using Finder and something like Houdah for search. But having a tool like Notebooks sitting over the top of the folder structure just gives an additional layer of organisation with tags, good built in search etc. One can also annotate PDFs and add text notes alongside the files. I have sometimes exported entire archived project folders from Craft in PDF form and stored them for easy retrieval inside Notebooks (could just as easily use markdown too).

So I guess I see Craft as more of an editor and place to create notes, rather than a place for long term storage. I hope that helps.

1 Like

Finder and Houdahspot is a good solution. I used it for many years until I found EagleFiler. I agree that “having a tool … sitting over the top of the folder structure just gives an additional layer of organisation” that I appreciate having. We have a wealth of everything bucket apps to choose from today to solve what you call the “filing cabinet problem.” I’ve been having a blast reading about and looking into all of them. :slightly_smiling_face:

2 Likes

The AN problem is still unresolved. I’m suppose to get another call from tech support today at 6pm my time. I was suppose to receive the call this morning at 8am. :frowning:

Question, what would happen if I deleted this library file?

I’m thinking maybe Notes would rebuild it upon relaunch and perhaps solve the issue? Notes works perfectly using iCloud.com and on all of my mobile devices. But, any change --new note, adding text, moving a note, etc-- that I make in Notes on my MBP do not upload to iCloud and thus do not sync to my mobile devices.

Can you do a quick Time Machine or other backup, delete, rebuild and see?

Good luck!