diff --git a/aikif/.z_prototype/ex_index_mydocs.py b/aikif/.z_prototype/ex_index_mydocs.py index ad68ba5b..7e73ad61 100644 --- a/aikif/.z_prototype/ex_index_mydocs.py +++ b/aikif/.z_prototype/ex_index_mydocs.py @@ -1,19 +1,25 @@ -# coding: utf-8 -# ex_index_mydocs.py written by Duncan Murray 22/5/2014 +#!/usr/bin/python3 +# -*- coding: utf-8 -*- +# ex_index_mydocs.py # Example program to index all personal data for keyword searches using AIKIF. # Source data is taken from Acute Softwares Diary and FileLister import os +import sys import aikif.index as ndx import aikif.config as mod_cfg import aikif.lib.cls_filelist as mod_fl local_folder = mod_cfg.fldrs['pers_data'] + os.sep + 'diary' + os.sep -diary_folder = 'C:\\APPS\\netDiary\\data' +diary_folder = os.path.join('T:\\','user','AIKIF','diary','netDiary_backup') -manual_files_to_index = [ - local_folder + 'diary_Ent_duncan.txt', +print('diary_folder = ', diary_folder) +print('local_folder = ', local_folder) + +sys.exit + +manual_files_to_index = [ # local_folder + 'diary_Ent_duncan.txt', local_folder + 'lf_folders.csv', local_folder + 'lf_files.csv' ] @@ -34,7 +40,7 @@ def main(): try: numFiles += 1 print('indexing ', str(numFiles) , ' of ', str(len(all_files)), ' : ', f) - ndx.buildIndex(f, ndxFile, 'Y', 'N') # run the index routine + ndx.buildIndex(f, ndxFile, 'Y', 'Y') # run the index routine except Exception: print('ERROR - cant index file ', f) @@ -44,7 +50,7 @@ def main(): def add_diary_files_to_list(lst, fldr): """ adds all Diary files from folder to the lst """ - fl = mod_fl.FileList([fldr], ['D2014*.DAT'], ["__pycache__", ".git"], "temp.csv") + fl = mod_fl.FileList([fldr], ['D2013*.DAT'], ["__pycache__", ".git"], "temp.csv") for f in fl.get_list(): lst.append(f)