Ho molte evidenziazioni e note in iBooks che ho letto e vorrei poterle raccogliere in un unico strumento facile da usare e manipolare il formato (ad esempio per scrivere articoli e citare citazioni).

Ad esempio, mi piacerebbe che un momento saliente come questo

producesse qualcosa (ad es. in CSV) come

Quod me nutrit me destruit – ciò che mi sostiene distrugge anche me, 14, Tamburlane parti uno e due, Christopher Marlowe, Anthony B . Dawson ed., Bloomsbury, https://itun.es/us/qSrZ0.l

Riesco a vedere come farlo (in qualche modo) laboriosamente, una nota alla volta, utilizzando la funzione di “condivisione” di iBook (o copia e incolla, ovviamente) ma non vedo alcun modo per farlo in blocco, per tutti i miei appunti da un libro o anche per tutti i miei libri.

Cè un modo per farlo, con un Apple Script o usando Automator, ad esempio? O forse cè un testo o file XML contenente le mie note ed evidenziando che potrei scrivere uno script (in Python, preferibilmente) da analizzare.

Commenti

  • La soluzione, si scopre, (come in molti casi), è quello di lasciarsi alle spalle Apple e passa a Kindle, che ha un ottimo supporto per esportare evidenziazioni e note.

Rispondi

iBooks non “t” hanno il supporto AppleScript. Le annotazioni sono memorizzate in un file SQLite : ~/Library/Containers/com.apple.iBooksX/Data/Documents/AEAnnotation/.

Potresti provare ad analizzare quello. Questa risposta fornisce un link a Digested , che legge quel database e quindi ti consente di esportare le tue annotazioni su Evernote, ma non so quale formattazione avranno o se vuoi fare confusione con Evernote.

Una (forse) semplice soluzione sarebbe aprire il libro in iBooks per iOS. Potresti quindi inviare le annotazioni in blocco tramite email a te stesso.

  1. Apri il libro
  2. Premi il “pulsante elenco” per visualizzare il sommario
  3. Passa alla scheda Note
  4. Premi il pulsante Condividi
  5. Seleziona Modifica note
  6. Seleziona tutto
  7. Condividi tramite email.

Modifica:

In realtà, dopo aver letto a commento su reddit , sembra esserci un modo per esportarli tutti da iBooks anche su OS X:

Puoi esportare le tue note in une-mail da Notes -> Seleziona tutto -> Condividi (è necessario tenere premuto ctrl mentre si fa clic con il tasto destro per mantenere la selezione). Le parti evidenziate verranno copiate nelle-mail con le note e formattate correttamente. Stranamente, sul Mac lapplicazione non si preoccupa se il libro è protetto dalla copia, ma copierà sempre la parte evidenziata. Lapplicazione iOS, però, fa distinzione. Se il tuo libro è protetto dalla copia, verrà condiviso solo il nome del capitolo. Purtroppo questo sembra essere lunico modo per farlo.: /

Usando il trackpad del mio laptop, ho dovuto tenere premuto ctrl + shift mentre si tocca il trackpad per visualizzare il menu contestuale mantenendo la selezione.

Commenti

  • Questo è molto utile. ‘ sono ancora molto lontano dallottenere le annotazioni in un CSV o in un altro modulo conveniente. Non riesco ‘ a ricavare nulla dal database SQL e la posta, per quanto bella, non è ‘ accessibile a livello di programmazione.
  • Sono solo io o non è più possibile nella nuova versione di iBooks? Non ‘ non vedo più il pulsante Modifica note. In tal caso, come faccio a esportare tutte le mie note?
  • @incandescentman ‘ è lì per me in iOS 8.4.
  • @ incandescentman I passaggi numerati nella mia risposta sopra erano per iOS. Lultima parte della risposta, la sezione dopo ” Modifica “, è per OS X. Per me funziona ancora su Yosemite.
  • Quindi, ‘ sono su el capitan ora, ma le indicazioni di quel commento su reddit funzionano ancora per me. Immagino che il processo differisca leggermente a seconda che ‘ utilizzi un mouse o un trackpad. Utilizzando il laptop senza una tastiera / mouse esterno, dopo aver selezionato i commenti utilizzando seleziona tutto, quindi premere control + shift + tap sul trackpad. Viene visualizzato questo: screenshot . Vengono selezionati i commenti nei capitoli.

Risposta

Ho scritto uno script per questo scopo che estrae le note dal tuo Mac e genera file di esportazione Evernote, pronti per il doppio clic. Forse potresti modificare il mio script se non si adatta esattamente ai tuoi scopi.

In breve, legge i database SQLite in:./Library/Containers/com.apple.iBooksX/Data/Documents/BKLibrary ./Library/Containers/com.apple.iBooksX/Data/Documents/AEAnnotations

… e in questo caso li esporta al formato .enex di Evernote “.

https://github.com/jorisw/ibooks2evernote/

 <?php /* * iBooks notes to Evernote converter * by Joris Witteman <[email protected]> * * Reads the iBooks Annotations library on your Mac and exports * them, tagged with their respective book title and imported in * separate notebooks. * * Usage: * * Move this script to the top of your personal home directory on your Mac. * This is the folder that has your name, which the Finder opens if you * click on the Finder icon in the Dock. * * To export your notes to Evernote: * * 1. Run the following command in the Terminal: * * php ./ibooks2evernote.php * * 2. Open the newly created "iBooks exports for Evernote" folder from your * home folder, open each file in there, Evernote will open and start * importing your notes. * */ // Default file locations for required iBooks data define("RESULT_DIRECTORY_NAME","iBooks exports for Evernote"); define("BOOKS_DATABASE_DIRECTORY","./Library/Containers/com.apple.iBooksX/Data/Documents/BKLibrary"); define("NOTES_DATABASE_DIRECTORY","./Library/Containers/com.apple.iBooksX/Data/Documents/AEAnnotation"); if(file_exists(RESULT_DIRECTORY_NAME)){ die("The destination folder for the exports already exists on your Mac.\nPlease move that one out of the way before proceeding.\n"); } // Verify presence of iBooks database if(!file_exists(BOOKS_DATABASE_DIRECTORY)){ die("Sorry, couldn"t find an iBooks Library on your Mac. Have you put any books in there?\n"); }else{ if(!$path = exec("ls ".BOOKS_DATABASE_DIRECTORY."/*.sqlite")){ die("Could not find the iBooks library database. Have you put any books in there?\n"); }else{ define("BOOKS_DATABASE_FILE",$path); } } // Verify presence of iBooks notes database if(!file_exists(NOTES_DATABASE_DIRECTORY)){ die("Sorry, couldn"t find any iBooks notes on your Mac. Have you actually taken any notes in iBooks?\n"); }else{ if(!$path = exec("ls ".NOTES_DATABASE_DIRECTORY."/*.sqlite")){ die("Could not find the iBooks notes database. Have you actually taken any notes in iBooks?\n"); }else{ define("NOTES_DATABASE_FILE",$path); } } // Fire up a SQLite parser class MyDB extends SQLite3 { function __construct($FileName) { $this->open($FileName); } } // Retrieve any books. $books = array(); $booksdb = new MyDB(BOOKS_DATABASE_FILE); if(!$booksdb){ echo $booksdb->lastErrorMsg(); } $res = $booksdb->query(" SELECT ZASSETID, ZTITLE AS Title, ZAUTHOR AS Author FROM ZBKLIBRARYASSET WHERE ZTITLE IS NOT NULL"); while($row = $res->fetchArray(SQLITE3_ASSOC) ){ $books[$row["ZASSETID"]] = $row; } $booksdb->close(); if(count($books)==0) die("No books found in your library. Have you added any to iBooks?\n"); // Retrieve the notes. $notesdb = new MyDB(NOTES_DATABASE_FILE); if(!$notesdb){ echo $notesdb->lastErrorMsg(); } $notes = array(); $res = $notesdb->query(" SELECT ZANNOTATIONREPRESENTATIVETEXT as BroaderText, ZANNOTATIONSELECTEDTEXT as SelectedText, ZANNOTATIONNOTE as Note, ZFUTUREPROOFING5 as Chapter, ZANNOTATIONCREATIONDATE as Created, ZANNOTATIONMODIFICATIONDATE as Modified, ZANNOTATIONASSETID FROM ZAEANNOTATION WHERE ZANNOTATIONSELECTEDTEXT IS NOT NULL ORDER BY ZANNOTATIONASSETID ASC,Created ASC"); while($row = $res->fetchArray(SQLITE3_ASSOC) ){ $notes[$row["ZANNOTATIONASSETID"]][] = $row; } $notesdb->close(); if(count($notes)==0) die("No notes found in your library. Have you added any to iBooks?\n\nIf you did on other devices than this Mac, make sure to enable iBooks notes/bookmarks syncing on all devices."); // Create a new directory and cd into it mkdir(RESULT_DIRECTORY_NAME); chdir(RESULT_DIRECTORY_NAME); $i=0; $j=0; $b=0; foreach($notes as $AssetID => $booknotes){ $Body = "<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE en-export SYSTEM "http://xml.evernote.com/pub/evernote-export3.dtd"> <en-export export-date="".@strftime("%Y%m%dT%H%M%S",time())."" application="iBooks2Evernote" version="iBooks2Evernote Mac 0.0.1">"; $BookTitle = $books[$AssetID]["Title"]; $j = 0; foreach($booknotes as $note){ $CappedText = null; $TextWithContext = null; // Skip empty notes if(strlen($note["BroaderText"]?$note["BroaderText"]:$note["SelectedText"])==0) continue; $HighlightedText = $note["SelectedText"]; // Cap the titles to 255 characters or Evernote will blank them. if(strlen($HighlightedText)>255) $CappedText = substr($note["SelectedText"],0,254)."…"; // If iBooks stored the surrounding paragraph of a highlighted text, show it and make the highlighted text show as highlighted. if(!empty($note["BroaderText"]) && $note["BroaderText"] != $note["SelectedText"]){ $TextWithContext = str_replace($note["SelectedText"],"<span style=\"background: yellow;\">".$note["SelectedText"]."</span>",$note["BroaderText"]); } // Keep some counters for commandline feedback if($j==0)$b++; $i++; $j++; // Put it in Evernote"s ENEX format. $Body .=" <note><title>".($CappedText?$CappedText:$HighlightedText)."</title><content><![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd"> <en-note> <div> <p>".($TextWithContext?$TextWithContext:$HighlightedText)."</p> <p><span style="color: rgb(169, 169, 169);font-size: 12px;">From chapter: ".$note["Chapter"]."</span></p> </div> <div>".$note["Note"]."</div> </en-note> ]]></content><created>".@strftime("%Y%m%dT%H%M%S",@strtotime("2001-01-01 +". ((int)$note["Created"])." seconds"))."</created><updated>".@strftime("%Y%m%dT%H%M%S",@strtotime("2001-01-01 +". ((int)$note["Modified"])." seconds"))."</updated><tag>".$BookTitle.".</tag><note-attributes><author>[email protected]</author><source>desktop.mac</source><reminder-order>0</reminder-order></note-attributes></note>"; } $Body .=" </en-export> "; file_put_contents($BookTitle.".enex", $Body); } echo "Done! Exported $i notes into $b separate export files in the "".RESULT_DIRECTORY_NAME."" folder.\n\n"; 

Risposta

  1. Installa il gratuito DB Browser for SQLite .
  2. Vai alla cartella delle annotazioni di iBooks: ~/Library/Containers/com.apple.iBooksX/Data/Documents/AEAnnotation/
  3. Copia il .sqlite file da qualche parte (come Desktop) per mantenere la cassaforte originale.
  4. Apri il file con DB Browser.
  5. Trova alcune note nel tuo libro di destinazione sfogliando i dati .
  6. Filtra per ZANNOTATIONASSETID per mostrare solo le note nel libro di destinazione.
  7. Copia e incolla le annotazioni che desideri in Numbers o in qualsiasi applicazione preferisci.

Commenti

  • Apple ‘ la famosa facilità duso!
  • @raxacoricofallapatorius: Sul serio. Questo ‘ è una trafila solo per ottenere un elenco delle parole del vocabolario che ho evidenziato.

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *