View Single Post
Old 05-20-2016, 08:45 AM   #6
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
How about this?

Using your command line access (kTerm, ssh, telnet, serial port, etc) -
Make a place for the book list script:
Code:
mntroot rw
mv /usr/bin/logThis.sh /usr/bin/logThis.bak
mntroot ro
Make a book listing script (two lines, Unix EoL), such as:
Code:
#!/bin/sh
find /mnt/us/documents "-name $@" >/mnt/us/extensions/booklist.txt
USB cable to PC -
Copy the above contents to top of visible storage as the file named:
logThis.sh
Safely remove -
Remove USB cable

Then again from your command line access:
Code:
mntroot rw
cp /mnt/us/logThis.sh /usr/bin/logThis.sh
mntroot ro
On the Kindle main screen, tap the search icon -
In the search bar type:
;log hide-me-*

Then (with however you view the USB storage - such as cable to PC) -
You should find (no pun intended) a list of books with the prefix:
'hide-me-'
in the file:
/extensions/booklist.txt

Note:
If you remove the '-name' from inside the quotes of the script, then you can use any set of 'find' commands to create the list.

The 'find' command that ships with 5.6.x and newer firmwares has this set of options:
Code:
Usage: find [PATH]... [EXPRESSION]

Search for files. The default PATH is the current directory,
default EXPRESSION is '-print'

EXPRESSION may consist of:
        -follow         Follow symlinks
        -xdev           Don't descend directories on other filesystems
        -maxdepth N     Descend at most N levels. -maxdepth 0 applies
                        tests/actions to command line arguments only
        -mindepth N     Don't act on first N levels
        -name PATTERN   File name (w/o directory name) matches PATTERN
        -iname PATTERN  Case insensitive -name
        -path PATTERN   Path matches PATTERN
        -regex PATTERN  Path matches regex PATTERN
        -type X         File type is X (X is one of: f,d,l,b,c,...)
        -perm NNN       Permissions match any of (+NNN), all of (-NNN),
                        or exactly NNN
        -mtime DAYS     Modified time is greater than (+N), less than (-N),
                        or exactly N days
        -mmin MINS      Modified time is greater than (+N), less than (-N),
                        or exactly N minutes
        -newer FILE     Modified time is more recent than FILE's
        -inum N         File has inode number N
        -user NAME      File is owned by user NAME (numeric user ID allowed)
        -group NAME     File belongs to group NAME (numeric group ID allowed)
        -depth          Process directory name after traversing it
        -size N[bck]    File size is N (c:bytes,k:kbytes,b:512 bytes(def.))
                        +/-N: file size is bigger/smaller than N
        -links N        Number of links is greater than (+N), less than (-N),
                        or exactly N
        -print          Print (default and assumed)
        -print0         Delimit output with null characters rather than
                        newlines
        -exec CMD ARG ; Run CMD with all instances of {} replaced by the
                        matching files
        -prune          Stop traversing current subtree
        (EXPR)          Group an expression
Now that you have your 'search bar, book list maker' -
All you have to do is decide how your going to 'hide' the books.
Note: just moving them out of /documents will hide them from the Kindle reader, but not from the KOreader, reader.

Then, I suppose, we would need to preempt one or more search bar command keys to trigger the hiding and un-hiding action.

= = = =

Note: I have not tested any of the above, I just typed up my first thought.
The above would be one way to create a list of books from a search bar command.

Note 2: There is a very good routine (Argon2) to convert a passphrase (say, entered into the search bar) into a cryptographic key.
https://github.com/janetizzy/phc-win.../tree/autotool
Which I am working on to add autotool and cross-compile support.

Note 3: Moving books into and out of a password protected zip file would probably 'hide' them well enough - especially if using Argon2 for the key generation from a searchbar entered passphrase.

Last edited by knc1; 05-20-2016 at 08:57 AM.
knc1 is offline   Reply With Quote