Abbrechen
Suchergebnisse werden angezeigt für 
Stattdessen suchen nach 
Meintest du: 

Jetzt anmelden und Teil der Community werden!

Limite von 500 Notizen "umgehen"

profile.country.de_DE.title
spitfirech
Besucher

Limite von 500 Notizen "umgehen"

Da ich mit einem Sachbuch nicht vernünftig arbeiten kann, wenn die Anzahl Notizen auf 500 beschränkt ist, habe ich versucht, diese Limite per SQL-Trigger so gut es geht zu umgehen.

Dazu kann man ein Lesezeichen mit dem Inhalt 'on' setzen. Alle Notizen ausserhalb eines Bereiches von -30 bis +20 Seiten um das Lesezeichen werden "maskiert" (einem fiktiven Buch zugeordnet), so dass wieder Platz zur Verfügung steht. Mit einem Lesezeichen 'off' lassen sich wieder alle Notizen einblenden.

Hier das SQL-Skript samt Installationsanleitung (es wird KEIN Rooting benötigt!):


/* Trigger set to soften the 500 notes limit
 * =========================================
 * v 0.1.0, 2012-05-04
 *
 * Installation: (no rooting required!)
 *
 * Connect your reader and open the drive named 'READER'
 * Create a backup copy of \Sony_Reader\database
 * Get a SQLLite Manager. Example: SQLite Manager AddOn for Firefox:
 *   http://code.google.com/p/sqlite-manager/
 * Start the manager and open \Sony_Reader\database\books.db (on the READER drive)
 * Copy paste the script at hand into the 'Excecute SQL' tab and hit RUN SQL
 * --> if no error shows up in 'Last Error' you are done :slight_smile:
 * Close the database and deconnect your reader.
 * If anything goes wrong, you can use your backup to undo the changes (or simply drop the triggers)
 *
 * Usage:
 *
 * Activate edit mode:
 *   Add or update bookmark (by keyboard) containing a memo 'on' (without '')
 *   --> This masks all notes more than 30 pages before the bookmark and 20 pages after the bookmark,
 *         allowing you to add new notes
 *   Exit the book (home key) and reopen it
 *
 * Activate reading mode:
 *   Add or update bookmark (by keyboard) containing a memo 'off' (without '')
 *   --> This restores all previously masked notes
 *   Exit the book (home key) and reopen it
 *
 * Restrictions/Bugs:
 * -----
 * If you have already reached the limit, you cannot add a new bookmark. Change an existing bookmark to 'on', instead.
 *   If the error does not go away, simply click the home button and reopen the book.
 *   If you don't have an existing bookmark and have crossed the limit already, you will have to use the SQL-Lite manager to manually mask the existing notes.
 *      Feel free to ask for help.
 * To mask the notes, 100000 is added to the content_id (book number). If you have 100000 books installed, this won't work.
 * The effect on synchronization using 'Reader for PC' has NOT been tested. It is possible, that it will remove the masked notes.
 *      --> Always unmask the notes before synchronization (using the off bookmark) !!!
 * Old on/off bookmarks should be removed when adding a new one, but this does not always work --> manually clean them up
 */



-- === Delete the triggers, if they exist already === --
DROP TRIGGER IF EXISTS markup_limit_bypass_ON_I;
DROP TRIGGER IF EXISTS markup_limit_bypass_ON_U;
DROP TRIGGER IF EXISTS markup_limit_bypass_OFF_I;
DROP TRIGGER IF EXISTS markup_limit_bypass_OFF_U;


-- === Trigger fires, when new bookmark named 'on' is added --> "masks" all notes outside of the range of the bookmark === --
CREATE TRIGGER markup_limit_bypass_ON_I AFTER INSERT ON bookmark
FOR EACH ROW
WHEN new.name IN ('on', 'ON', 'On')
BEGIN
    -- first, restore all notes
    UPDATE annotation
    SET content_id = content_id-100000
    WHERE content_id = new.content_id+100000;
   
    -- delete previous on/off bookmarks (does not work, why???)
    DELETE
    FROM bookmark
    WHERE content_id = new.content_id
    AND name IN ('on', 'ON', 'On', 'off', 'OFF', 'Off')
    AND _id <> new._id;
   
    -- assign all out of range notes to new content_id (range: -30 to +20 of current page)
    UPDATE annotation
    SET content_id = content_id+100000
    WHERE content_id = new.content_id
    AND (page <= new.page-30 OR page >= new.page+20)
    AND markup_type = 10;
END;


-- === Trigger fires, when existing bookmark name is changed to 'on' --> "masks" all notes outside of the range of the bookmark === --
CREATE TRIGGER markup_limit_bypass_ON_U AFTER UPDATE ON bookmark
FOR EACH ROW
WHEN new.name IN ('on', 'ON', 'On')
BEGIN
    -- first, restore all notes
    UPDATE annotation
    SET content_id = content_id-100000
    WHERE content_id = new.content_id+100000;

    -- assign all out of range notes to new content_id (range: -30 to +20 of current page)
    UPDATE annotation
    SET content_id = content_id+100000
    WHERE content_id = new.content_id
    AND (page <= new.page-30 OR page >= new.page+20)
    AND markup_type = 10;
END;


-- === Trigger fires, when new bookmark named 'off' is added --> unmasks all notes === --
CREATE TRIGGER markup_limit_bypass_OFF_I AFTER INSERT ON bookmark
FOR EACH ROW
WHEN new.name IN ('off', 'OFF', 'Off')
BEGIN
    -- delete previous on/off bookmarks (does not work, why???)
    DELETE
    FROM bookmark
    WHERE content_id = new.content_id
    AND name IN ('on', 'ON', 'On', 'off', 'OFF', 'Off')
    AND _id <> new._id;

    -- restore all notes
    UPDATE annotation
    SET content_id = content_id-100000
    WHERE content_id = new.content_id+100000;
END;


-- === Trigger fires, when existing bookmark name is changed to 'off'--> unmasks all notes === --
CREATE TRIGGER markup_limit_bypass_OFF_U AFTER UPDATE ON bookmark
FOR EACH ROW
WHEN new.name IN ('off', 'OFF', 'Off')
BEGIN
    -- restore all notes
    UPDATE annotation
    SET content_id = content_id-100000
    WHERE content_id = new.content_id+100000;
END;

5 ANTWORTEN 5
profile.country.de_DE.title
sucat-----
Besucher

wow!

profile.country.de_DE.title
omas360
Mitglied

500 Lesezeichen in einem Buch reichen nicht.
Ja ne is klar :cool:

Lieben GruГџ omas360
profile.country.de_DE.title
conysho
Vielschreiber

Kann ich schon verstehen, wenn ich an Studienzeiten zurückdenke waren in meinen Büchern jede Menge Markierungen.... 500 reichten da echt nicht.

Cony

DRM - was ist das.... Kann man das essen?
profile.country.de_DE.title
omas360
Mitglied

Ok ok.
So sind Leute unterschiedlich. Ich hatte immer schon Aversionen in ein Buch reinzuschreiben - auch im Studium :wink: .

Ich schätze mal man hatte bei Sony Angst, mehr als 500 würden die Hardware überfordern (Performance).
Insgesamt halte ich die Lösungen für Markierungen/Notizen in den aktuellen Readern noch für sehr suboptimal. Irgendwie kommt mir da die analoge Variante noch sehr überlegen vor vom Handling.
Wahrscheinlich sind das auch die Gründe, weshalb ich sowas nicht nutze. :smileymischief:

Lieben GruГџ omas360
profile.country.de_DE.title
de1esl
Neues Mitglied

Ok ok.
So sind Leute unterschiedlich. Ich hatte immer schon Aversionen in ein Buch reinzuschreiben - auch im Studium :wink: .

Wenn ich da sehe, was in unsere Bücher so reingeschrieben wird - und das sind nur ausgeliehene, denn ich arbeite in einer Universitätsbibliothek - wünsche ich mir mehr Menschen mit solchen Skrupeln. Wobei das reinschreiben ja noch geht, oft genug werden Seiten ausgerissen. Da ist das "Verleihen" von eBooks dann doch besser, das ist dann immer wie neu. Sorry, war jetzt off topic, aber da musste ich bei Deinem Kommentar direkt dran denken.

DRM - Disable Rights Management