giuspen / cherrytree

cherrytree
https://www.giuspen.net/cherrytree/
Other
3.42k stars 464 forks source link

feature request: page / group toggle for checkboxes #1863

Open Arteneko opened 2 years ago

Arteneko commented 2 years ago

When dealing with a lot of checkboxes, e.g. as a regularly used planning sheet, it would be cool to be able to mass-toggle the state of a group of checkboxes (or of the whole page).

What do you think about the feasability of this?

giuspen commented 2 years ago

you mean the so called TODO lists?

Arteneko commented 2 years ago

I mean this, if that's the todo-list (which it probably is).

a series of checkboxes prefixing a few lines of text

metal450 commented 1 year ago

Same wish here - I have some notes that are i.e. a monthly ToDo list, & each time I have to go in and manually uncheck all the boxes one at a time to "reset" the list. Would be hugely helpful if there were a quick way to auto-check/auto-uncheck all of them within the current page.

Kansai53 commented 1 year ago

Yes, would make clearing out grocery lists a lot quicker and easier 🙏 🙏

Ricent82 commented 11 months ago

I have the same issue. Used to use OneNoteGem to do this when I was using OneNote, but while I way prefer cross-platform CherryTree, resetting my todo lists takes a lot of manual rote unchecking. Wish there was a one-button "uncheck all in note" option

giuspen commented 11 months ago

If the issue is only resetting to non ticked, there is a quick way to achieve that: just select all the elements you want to reset, then change the type of list to for example bulleted, then change again to Todo list

Ricent82 commented 11 months ago

That only works if there's no non-checkbox lines or content interspersed in the list. Otherwise, it will turn every line into a checkbox, rather than just unchecking the checkboxes that are already there.

Kansai53 commented 2 months ago

Could I ping on this again just since it's been another 12mo? Oh how I wish there were a way to not have to manually uncheck 50 checkboxes to reset my weekly todo list ;)

gitvectors commented 2 months ago

I follow these threads not to request new features but to learn how external scripts can meet different user needs.

Provided that you are using .ctd mode (you can always convert from other modes) then you can use XML parsing tools to parse your .ctd/xml code . This link refers to XML parsing. https://docs.python.org/3/library/xml.etree.elementtree.html An easier way of XML parsing is to use an XML editor such as free XMLCopyEditor. Change your checkboxes using xquery. A more general approach I'm considering it to develop a python plugin for Albert (in Ubuntu) or Alfred (in Mac) to conduct operations on multlple *.ctd documents. Later development task. There is a Windows alternative.

In a word .. automation scripts.

As an afterthought if a CodeBox is inserted in TODO node then a Python script can be run to configure checkboxes. Python does require the absolute path to the *.ctd file. Not currently offered in CherryTree (other than manual copying from top bar name of file) - but suggested in an earlier post of mine. One feature I suggested. But even that path image can be captured from the popup image using a CodeBox script to OCR the image to retrieve absolute path. A bit of a roundabout way..

https://github.com/giuspen/cherrytree/issues/2527

Kansai53 commented 2 months ago

I'm using multi-file (which is xml). Seems pretty hacky/brittle though - would have to know the node ids to update (to find the appropriate xml files), script needs to ask which one to navigate to in order to do the checkboxes, it would have to know which characters are used for checkboxes (from ct settings), etc. Doesn't scale to other users. Is it technically possible? Yeah. But with all that effort...have I really saved time over just clicking them manually? Probably not...

dbwiz commented 2 weeks ago

Checkboxes are just characters. You can just search and replace them all at once with CTRL+H. Search "☑ ", replace with "☐ " If you don't use CTRL+H often its even the default next time you use it - CTRL+H, then "Ok"

metal450 commented 2 weeks ago

That's....a great idea :rofl: :man_facepalming: