Skip to content

Commit 912c0d4

Browse files
committed
final 0.6.7 testing
1 parent 610f4c8 commit 912c0d4

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ KIM by default appends labels as hashtags at the end of notes. However, Keep can
182182
```bash
183183
> python kim.py -d
184184
```
185+
**NOTE: If you've used inline hashtagging within notes that have unusual characters, this option will not modify the hashtag within the note. Use the -p option to preserve labels and hashtags in their original form without modification**
185186

186187
#### Archive Notes
187188
KIM has an option to export only Keep archive notes. All other note types are ignored with this option

kim.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -500,14 +500,6 @@ def save_md_file(note, note_tags, note_date, opts):
500500
try:
501501
fs = FileService()
502502

503-
# 0.6.6 - if label hashtags are embedded then don't append
504-
if opts.delete_labels:
505-
for label in note_tags.split():
506-
pattern = rf"{re.escape(label)}"
507-
if re.search(pattern, note.text):
508-
note_tags = note_tags.replace(label, "")
509-
510-
511503
md_text = Markdown().format_check_boxes(note.text)
512504
note.title = NameService().check_duplicate_name(note.title, note_date)
513505

@@ -718,7 +710,15 @@ def keep_query_convert(keep, keepquery, opts):
718710

719711
note.title = note.title.replace("/", "")
720712
note.text = note.text.replace("(" + NOTE_PREFIX,"(" + KEEP_URL)
721-
713+
714+
# 0.6.6 - if label hashtags are embedded then don't append
715+
if opts.delete_labels:
716+
for label in note_labels.split():
717+
pattern = rf"{re.escape(label)}"
718+
if re.search(pattern, note.text):
719+
note_labels = note_labels.replace(label, "")
720+
note_labels = note_labels.lstrip()
721+
722722
if opts.archive_only:
723723
if note.archived and note.trashed == False:
724724
keep_get_blobs(keep, note)

0 commit comments

Comments
 (0)