

copyfile ( source, target ) counter += 1 print "Recent files now are:" print " \n ". mkdir ( RECENT ) counter = 1 for source in files : target = os. sort ( cmp = lambda b, a : cmp ( a, b )) files = for x in files ] shutil. walk ( path ): these = epubs += return epubs files = getfiles ( "/home/aquarius/Documents/Books" ) files.

#!/usr/bin/env python import os, shutil RECENT = "/home/aquarius/Documents/Books/000RECENT" def getfiles ( path ): epubs = for root, dirs, files in os. 3 This is also not complex stuff walk through all the list, sort them in last-modified time order, pick the top 10, copy them. So as a final step we create a folder called 000RECENT (so it is at the top of the list) and copy the ten most recently added books into it. It’s handy, when browsing my Books folder from my phone, to be able to see the books I added most recently to my list. Not very complicated if you’re desperate for the source, ask and I’ll send it over, but it’s really not hard. The actual book list is a reasonably simple PHP script which reads the JSON file and displays the list of books, or displays a list of reviews if that’s what you picked. sort ( key = lambda k :( k, k, k ), reverse = True ) print json. formats =EPUB -to-dir =/home/aquarius/Documents/Books \ Calibredb export -all -dont-save-cover -dont-write-opf \
