Open jun6lee opened 1 year ago
Then of course, there's also colours: ZANNOTATIONSTYLE
// The annotation's highlight style.
// Possible values:
0 => "underline",
1 => "green",
2 => "blue",
3 => "yellow",
4 => "pink",
5 => "purple"
From: https://github.com/57uff3r/ibooks_notes_exporter/pull/6/files
Can be done in css if values are pulled at the very least.
https://github.com/57uff3r/ibooks_notes_exporter/pull/6
func styleToColor(style int) string {
switch style {
case 1:
// green
return "#a8e196"
case 2:
// blue
return "#a5c3ff"
case 3:
// yellow
return "#fde15c"
case 4:
// pink
return "#ffaabf"
case 5:
// purple
return "#cdbbfb"
default:
return ""
}
}
Date conversion from https://artm.dev/notes/how-to-programmatically-get-highlights-from-apple-books/
const APPLE_EPOCH_START = new Date("2001-01-01").getTime();
function convertAppleTime(appleTime: number): number {
return new Date(APPLE_EPOCH_START + appleTime * 1000).getTime();
}
Will try and figure out some of the gaps and send in PR's