Skip to content

Commit 28b5a15

Browse files
committed
add translations for Recently Deleted
1 parent 3a01285 commit 28b5a15

File tree

8 files changed

+97
-6
lines changed

8 files changed

+97
-6
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [0.2.3] - 16.04.2025
6+
7+
### Changed
8+
9+
- Added translations for the folder "Recently Deleted" to be able to filter it on all the languages MacOS supports.
10+
- Small changes and updates to the README file.
11+
12+
### Fixed
13+
14+
- Fixed a bug caused by images on Notes when using the `-edit`flag. The images will not appear in the markdown preview (Temporary fix).
15+
516
## [0.2.2] - 14.04.2025
617

718
### Added
@@ -74,6 +85,7 @@ Initial release with core Apple Notes functionality:
7485
- Move notes between folders
7586
- List all folders and subfolders
7687

88+
[0.2.3]: https://github.com/antoniorodr/memo/releases/tag/v0.2.3
7789
[0.2.2]: https://github.com/antoniorodr/memo/releases/tag/v0.2.2
7890
[0.2.1]: https://github.com/antoniorodr/memo/releases/tag/v0.2.1
7991
[0.2.0]: https://github.com/antoniorodr/memo/releases/tag/v0.2.0

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ echo $EDITOR
157157

158158
## :pushpin: Roadmap
159159

160-
- Enhance the implementation of Apple Reminders.
160+
- Check the roadmap [here](https://github.com/users/antoniorodr/projects/2)
161161

162162
## :memo: License
163163

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
55
[project]
66
name = "memo"
77
authors = [{ name = "Antonio Rodriguez", email = "[email protected]" }]
8-
version = "0.2.2"
8+
version = "0.2.3"
99
description = "CLI app to manage your Apple Notes and Apple reminders"
1010
readme = "README.md"
1111
license = "MIT"

src/memo/memo.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
# TODO: Check if notes can be imported and exported.
1919
# TODO: Check if its possible to fetch .localized names from the folders.
20+
# TODO: Check alternative to md_converter to support images and attachments.
2021

2122

2223
@click.group(invoke_without_command=False)

src/memo_helpers/edit_memo.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,14 @@ def edit_note(note_id):
4242
set body of selectedNote to "{edited_html}"
4343
end tell
4444
"""
45-
subprocess.run(["osascript", "-e", update_script])
46-
click.secho("\nNote updated.", fg="green")
45+
process = subprocess.run(
46+
["osascript", "-e", update_script], capture_output=True, text=True
47+
)
48+
if process.returncode != 0:
49+
click.secho("\nError: Could not update note.\n", fg="red")
50+
click.secho(process.stderr, fg="red")
51+
else:
52+
click.secho("\nNote updated.", fg="green")
4753

4854

4955
def edit_reminder(reminder_id, part_to_edit):

src/memo_helpers/get_memo.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55

66
def get_note():
77
script = """
8+
set deletedTranslations to {"Recently Deleted", "Nylig slettet", "Senast raderade", "Senest slettet", "Zuletzt gelöscht", "Supprimés récemment", "Eliminados recientemente", "Eliminati di recente", "Recent verwijderd", "Ostatnio usunięte", "Недавно удалённые", "Apagados recentemente", "Apagadas recentemente", "最近删除", "最近刪除", "最近削除した項目", "최근 삭제된 항목", "Son Silinenler", "Äskettäin poistetut", "Nedávno smazané", "Πρόσφατα διαγραμμένα", "Nemrég töröltek", "Șterse recent", "Nedávno vymazané", "เพิ่งลบ", "Đã xóa gần đây", "Нещодавно видалені"}
9+
810
tell application "Notes"
911
set output to ""
1012
repeat with eachFolder in folders
1113
set folderName to name of eachFolder
12-
if folderName is not "Nylig slettet" and folderName is not "Recently Deleted" then
14+
if folderName is not in deletedTranslations then
1315
repeat with eachNote in notes of eachFolder
1416
set noteName to name of eachNote
1517
set noteID to id of eachNote

src/memo_helpers/md_converter.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ def md_converter(id_search_result):
55
original_html = id_search_result.stdout.strip()
66

77
text_maker = html2text.HTML2Text()
8+
text_maker.images_to_alt = True
89
text_maker.body_width = 0
910
original_md = text_maker.handle(original_html).strip()
1011
return [original_md, original_html]

uv.lock

Lines changed: 70 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)