Skip to content
This repository was archived by the owner on Nov 9, 2021. It is now read-only.
This repository was archived by the owner on Nov 9, 2021. It is now read-only.

[Idea] "Archive" done tasks #70

Description

@diego898

It would be a great feature to allow you "archive" done tasks - as in, "compress" them all into a bulletted list, or data tiddler, etc. and delete their actual full tiddlers.

I have quite a few ephemeral tiddlers lying around that will never be resurrected, and so don't need to be coming up in searches, tags, etc.

Activity

  1. diego898 commented on May 4, 2021

    @diego898
    Author

    Here is a simple "Archive" button that places as all todos tagged with done in an Archive tiddler as JSON.

    Note: multiple rounds of archiving will just keep appending the export to the bottom, meaning the import process/un-archiving would be more complicated, but this is just a proof of concept

    <$vars archiveTiddlerTitle="Archive" 
           todoText=<<jsontiddlers "[tag[done]]" >> 
           emptyJSON="[]" linebreak="
    
    "> 
        <$set name="newArchiveText" 
              filter="[<todoText>!match<emptyJSON>]" 
              value={{{ [title<archiveTiddlerTitle>get[text]addsuffix<linebreak>addsuffix<todoText>] }}} 
              emptyValue={{{ [title<archiveTiddlerTitle>get[text]] }}} >
    
            <$button>
                <$action-setfield $tiddler=<<archiveTiddlerTitle>> 
                                  $field="text" 
                                  $value=<<newArchiveText>> />
                <$action-deletetiddler $filter="[tag[done]]" />           
                Archive! 
            </$button>
    
        </$set>
    </$vars>
    
  2. pmario commented on May 5, 2021

    @pmario

    Good idea. ... Should it be possible to "resurrect" ToDos from the archive? ... just curious.

  3. diego898 commented on May 5, 2021

    @diego898
    Author

    @pmario - definitely. I posted about this on the GG as well.

    I think a problem towards un-archiving is:

    • In the proof-of-concept solution I gave above, different archiving batches will just be appended as separate JSON objects, instead of merging everything back into one large JSON object.
    • Even if that was solved, actually building the unarchiver is probably beyond my abilities, though it might be a good use case for Joshua's JSON Mangler.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions