use notedir when generate cache file

use notedir when generate cache file
use docopt for cli

use docopt for cli
check whether need to sync
Merge branch 'dev'