Add version 2.2

This commit is contained in:
No Time To Play 2024-02-01 06:07:08 +00:00
parent 9ec947cc37
commit a30bed3eab
3 changed files with 39 additions and 6 deletions

10
NEWS.md
View File

@ -1,5 +1,15 @@
# OutNoted project news
## [2.2] - 2024-02-01
### Added
* Outline statistics
### Changed
* "Fold/unfold all" now applies to all notes, not just at top level.
## [2.1 beta] - 2024-01-31
### Added

View File

@ -16,13 +16,19 @@ Minimum screen resolution: 800x600. Recommended: 1024x768.
## Status
This document applies to OutNoted 2.1, in beta as of January 2024. This version comes with a redesigned user interface, including:
This document applies to OutNoted 2.x, current as of February 2024. New versions come with a redesigned user interface, including:
- menu system;
- extended toolbar with icons;
- full screen mode.
Most application logic is reused from the 1.x series, except for new features. There could be new bugs; please back up your data.
But also new features like:
- native file dialogs on X11;
- ability to interoperate with newsreaders;
- outline statistics.
Most application logic is reused from the 1.x series, except for added features. There could be new bugs; please back up your data.
## Features

View File

@ -207,7 +207,7 @@ def buildOPML(metadata, outline):
about_text = """
An outline note-taking editor
Version 2.1 beta (31 Jan 2024)
Version 2.2 (01 Feb 2024)
MIT License
"""
@ -266,7 +266,7 @@ def load_help():
viewport.insert("about", "end",
text="An outline note-taking editor")
viewport.insert("about", "end",
text="Version 2.1 beta (31 Jan 2024), by No Time To Play")
text="Version 2.2 (01 Feb 2024), by No Time To Play")
viewport.insert("about", "end",
text="Open source under the MIT License")
viewport.insert("", "end", "features", text="Features", open=1)
@ -805,6 +805,7 @@ def reset_note():
else:
viewport.set(focus, "status", "")
viewport.set(focus, "link", "")
viewport.set(focus, "feed", "")
viewport.item(focus, image="")
modified = True
status["text"] = "(modified)"
@ -848,11 +849,11 @@ def handle_paste():
status["text"] = "(modified)"
def fold_all():
for i in viewport.get_children():
for i in all_item_ids():
viewport.item(i, open=0)
def unfold_all():
for i in viewport.get_children():
for i in all_item_ids():
viewport.item(i, open=1)
def edit_props():
@ -865,6 +866,20 @@ def edit_props():
modified = True
status["text"] = "(modified)"
def show_stats():
items = all_item_ids()
note_count = len(items)
char_count = 0
link_count = 0
v = viewport
for i in items:
char_count += len(viewport.item(i, "text"))
if v.set(i, "link") != "" or v.set(i, "feed"):
link_count += 1
stats = "Notes: {}\nWith links: {}\nText size: {} chars"
stats = stats.format(note_count, link_count, char_count)
showinfo("Outline statistics", stats, parent=top)
def handle_reload():
if outline_filename == None:
showinfo("Oops!", "The outline was never saved.", parent=top)
@ -1071,7 +1086,9 @@ menu_item(m, "Save", 0, "Ctrl-S", handle_save)
m.add_separator()
menu_item(m, "Save as...", 5, comm=handle_saveas)
menu_item(m, "Reload", 0, "Ctrl-R", handle_reload)
m.add_separator()
menu_item(m, "Properties", 6, "Ctrl-T", edit_props)
menu_item(m, "Statistics", 4, None, show_stats)
m.add_separator()
menu_item(m, "Quit", 0, "Ctrl-Q", handle_quit)
menubar.add_cascade(menu=m, label="File", underline=0)