Google Keep Notes Sorter - Autoshare Command 1.1

Sort text in Google Keep Notes

  1. Nightcustard
    Screenshot_20220709-202702.png Screenshot_20220709-202242.png

    This project is a slight reworking of my 'Google Keep Notes Sorter' AutoShare project, produced after the Autoshare Text Processor method stopped working for me - for some reason the 'sorter' task no longer runs when the profile is triggered. The only way forward I found which worked uses the Autoshare Command method. Instead of passing the sorted text back to Google Keep, the Command method passes it to the clipboard so you'll have to re-highlight the unsorted text and paste over it with the contents of the clipboard.

    This is a very simplistic use of AutoShare and Tasker within Android to overcome the irritating omission from Google Keep Notes of an alphabetic sort facility. It only works on text with no tick boxes (you can't do a 'select all' with tick boxes visible as this will only select that one item).
    The sorting is performed by one line of javascript - the previous version could only sort alphabetically but thanks to those nice folks at Stack Overflow, the code can now sort alphanumerically and treats upper and lower cases appropriately. A link to the Stack Overflow page is given within the code.
    Please note I accept no responsibility for deleted/corrupted/mangled notes. Please try it out on a copy of the note you want to sort before trying it out on the real thing, although if it does something unwanted, you can always recover your note by pressing the anticlockwise arrow beneath the mangled note.

    I'm running Android 11, Tasker 5.15.14 and AutoShare v2.1.1

    TL/DR instructions:

    Install AutoShare; Create a Command (called 'SortCommand'), back out of AutoShare to save. Import the 'Keep_Sorter' project. Within Tasker ensure the 'SortCommand' profile is enabled and (hopefully) that's the set up done.

    To use, open a previously saved list in Google Keep Notes, remove any check boxes and then do a select all. Follow this by pressing 'Share' and select 'SortCommand' from the Share menu pop-up. After a few seconds a message pops up saying the sorted text is in the clipboard. Do a 'select all' to select the unsorted text again and then select 'Paste'. Your list is now sorted.

    Longer-winded instructions:

    Install AutoShare
    Click on 'Manage Commands'
    Press the '+' button in the upper right hand corner to add a new command.
    Name the command 'SortCommand' (to match the profile in the Tasker project, of course you can use any name you like if you edit the project to suit).
    Select an Icon from the list (it can be anything - I chose the AutoShare icon from the 'App Icons' list)
    Leave all other settings at their defaults.
    Back out of AutoShare to save the changes.

    Press the 'Download Now' button to download 'Keep_Sorter.prj.xml'
    Open Tasker
    Long press the home icon at the bottom left of the screen.
    In the popup menu which appears, select 'Import Project'.
    Navigate to where you've downloaded the 'Keep_Sorter.prj.xml' file (probably the 'Download' folder) and select 'Keep_Sorter'.
    Tasker should then import the project with no error messages.
    You'll find you have a new project listed on the project bar - press it to select.
    Go to 'Profiles' and ensure the only profile listed ('SortCommand') is enabled. Enable it if not.
    Exit Tasker via the three vertical dot menu in the top right hand corner.

    To use:
    Open Google Keep Notes.
    As advised above, make a copy of the first list you want to sort.
    Open that list.
    Remove any tick boxes by pressing the three vertical dot menu at the top right of the display and selecting 'Hide Checkboxes'.
    Long press on the text to be sorted and choose 'Select all' in the share menu which will have appeared.
    From the same share menu choose 'Share'.
    One of the choices in the 'Share' pop-up is 'SortCommand' - select it.
    After a couple of seconds a message will pop up saying the sorted text is now in the clipboard.
    Again, Long press on the text to be sorted and choose 'Select all' in the share menu which will have appeared.
    Press 'Paste'. Your list will now be sorted.

Recent Updates

  1. JavaScript sort script updated