#!/bin/sh
#] 
#] *********************
#] $ bash "$d_bin""recollindex_script.sh" -  whole-disk index of text for later searches (local search engine)
#  run from terminal as superuser (sudo -i) : 
#     # bash /home/bill/bin/recollindex_script
#
# This does ~ user files only, main drive plus ATA_WDC_500G
# 02Dec2014 initial script draft
# 


file_log="/home/bill/bin/recollindex_log.txt"

echo                    ""
echo                    ""
echo                    "**********************************************************"
echo                    "/home/bill/bin/recollindex_script -> starting weekly routine,  Date = " `date` 
echo        >>$file_log ""
echo        >>$file_log ""
echo        >>$file_log "*******************************************************"
echo        >>$file_log "/home/bill/bin/recollindex_script -> starting weekly routine,  Date = " `date` 
echo        >>$file_log ""

# 03Dec2014 See configuration file for details and past/current temporary changes and options : 
#   /usr/share/recoll/examples/recoll.conf 
# topdirs = ~ /media/bill/ATA_WDC_500G/

# 06Dec2014  Test indexing - the use of directory names enclosed by quotation marks.
# this should NOT erase previous indexing
# topdirs = "/media/bill/ATA_WDC_500G/Dads paintings" 
# skippedNames = #* bin CVS  Cache cache* caughtspam  tmp .thumbnails .svn \
#    *~ .beagle .git .hg .bzr loop.ps .xsession-errors \
#    .recoll* xapiandb recollrc recoll.conf
# I added backslash to previous line, then : 
#    "Dads paintings"
# >> Result : indexing was restricted to topdirs = "/media/bill/ATA_WDC_500G/Dads paintings" 
# >> error messages see "/home/bill/bin/recollindex_script 141206 errors with quoted dirname.png"

# 06Dec2014 - first attempt to index ATA_WDC_500G was ridiculous - it was held up indexing numbers in Climate model sheets! 
# need to avoid those directories, or ignore numbers
# line 24: 
# skippedNames = #* bin CVS  Cache cache* caughtspam  tmp .thumbnails .svn \
#    *~ .beagle .git .hg .bzr loop.ps .xsession-errors \
#    .recoll* xapiandb recollrc recoll.conf
# I added backslash to previous line, then : 
#    .Trash-1000 DVD_BigBattles_WWII DVD_GreatBattles_WWII DVD_HitlerLost DVD_SovietStory DVD_SuvorovTalks \
#    NN_conf_DVDs "lost+found" "Stalin supported Hitler" "Dads paintings" Datasets \



echo                    ""
echo                    "starting... recollindex >>/home/bill/bin/recollindex_log.txt"
echo                    "directories to index (as per /usr/share/recoll/examples/recoll.conf) :  ~  /media/bill/ATA_WDC_500G/" 
echo        >>$file_log ""
echo        >>$file_log "starting... recollindex >>/home/bill/bin/recollindex_log.txt" 
echo        >>$file_log "directories to index (as per /usr/share/recoll/examples/recoll.conf) :  ~  /media/bill/ATA_WDC_500G/" 
recollindex >>$file_log 


echo                    ""
echo                    "/home/bill/bin/recollindex_script -> end of weekly routine,    Date = " `date` 
echo        >>$file_log ""
echo        >>$file_log "/home/bill/bin/recollindex_script -> end of weekly routine,    Date = " `date` 
echo                    "**********************************************************"
echo                    ""
echo                    ""




# enddoc
