diff --git a/engine/plugins/insert_image.py b/engine/plugins/insert_image.py index 0d5fa78..08f3329 100644 --- a/engine/plugins/insert_image.py +++ b/engine/plugins/insert_image.py @@ -171,7 +171,7 @@ def insert_image_in_md(text, td, IMG_PREFIX, verbose=False): changed = True else: if verbose: - print('Coping', source_path, td + IMG_PREFIX + t) + print('insert_image.py: coping', source_path, td + IMG_PREFIX + t) ltext[c] = '![](' + IMG_PREFIX + t + ') '# + creation_date # + t + ')' changed = True ############################ diff --git a/geekbookapp.py b/geekbookapp.py index 4954ce1..3a42326 100755 --- a/geekbookapp.py +++ b/geekbookapp.py @@ -26,7 +26,7 @@ from engine.colors import bcolors from engine.searcher import make_db from engine.plugins import ia_writer - +PINNED_NOTES = ['workflow.md'] class GeekbookError(Exception): pass @@ -67,6 +67,9 @@ def get_files(self): Update: alwasy get an updated list!""" self.get_filelist() self.sort_by_mtime() + self.md_files = PINNED_NOTES + self.md_files + # remove duplicates, if case if the pinned note is alos the recent edit + self.md_files = list(dict.fromkeys(self.md_files)) return self.md_files @@ -114,6 +117,7 @@ def start(self): logger.info('You have %i notes' % len(mf.get_files()) + ' with ' + out + ' lines! Congrats, keep noting!') index = Index() + print(mf.get_files()) index.update(mf.get_files()) # yappi.start()