NicolasPetton / Projectify

Project management for TiddlyWiki
https://projectify.wiki
MIT License
140 stars 47 forks source link

[Idea] "Archive" done tasks #70

Open diego898 opened 3 years ago

diego898 commented 3 years ago

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.

diego898 commented 3 years ago

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>
pmario commented 3 years ago

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

diego898 commented 3 years ago

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

I think a problem towards un-archiving is: