doing 1.0.32 → 1.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +10 -0
- data/lib/doing/version.rb +1 -1
- data/lib/doing/wwid.rb +22 -1
- metadata +17 -43
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: d00d66a9e4fa16bdc40697f2fa7b42685d87e64c757d6f5e0096dd8a07af4c37
         | 
| 4 | 
            +
              data.tar.gz: d7624aefddb7eb42b1a86c97f140e0881cbf2d8a41b34109d1f2f3a31b82c9b3
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: a50d44f0db2756591fc7b7e276dd521a27f13fc893c91928386a504ffc874657bb3913cad123c59e5c86fbb858812aa91914082bd183652857a43d0455ee3047
         | 
| 7 | 
            +
              data.tar.gz: bf9684307fbdf99a5f6846ae09ecc3c574eecba8be0d609ce0ce7f00c838470d39b434e065725c951a140d1be921910b61376c0793319be184997daa0d4b98e3
         | 
    
        data/README.md
    CHANGED
    
    | @@ -464,6 +464,16 @@ To add autotagging, include a section like this in your `~/.doingrc` file: | |
| 464 464 | 
             
                    - posting
         | 
| 465 465 | 
             
                    - publishing
         | 
| 466 466 |  | 
| 467 | 
            +
            ###### Tag transformation
         | 
| 468 | 
            +
             | 
| 469 | 
            +
            You can include a `transform` section in the autotag config which contains pairs of regular expressions and replacement patterns separated by a colon. These will be used to look at existing tags in the text and generate additional tags from them. For example:
         | 
| 470 | 
            +
             | 
| 471 | 
            +
              autotag:
         | 
| 472 | 
            +
                transform:
         | 
| 473 | 
            +
                - (\w+)-\d+:$1
         | 
| 474 | 
            +
             | 
| 475 | 
            +
            This creates a search pattern looking for a string of word characters followed by a hyphen and one or more digits, e.g. `@projecttag-12`. Do not include the @ symbol in the pattern. The replacement (`$1`) indicates that the first matched group (in parenthesis) should be used to generate the new tag, resulting in `@projecttag` being added to the entry.
         | 
| 476 | 
            +
             | 
| 467 477 | 
             
            ##### Annotating
         | 
| 468 478 |  | 
| 469 479 | 
             
            `note` lets you append a note to the last entry. You can specify a section to grab the last entry from with `-s section_name`. `-e` will open your `$EDITOR` for typing the note, but you can also just include it on the command line after any flags. You can also pipe a note in on STDIN (`echo "fun stuff"|doing note`). If you don't use the `-r` switch, new notes will be appended to the existing notes, and using the `-e` switch will let you edit and add to an existing note. The `-r` switch will remove/replace a note; if there's new note text passed when using the `-r` switch, it will replace any existing note. If the `-r` switch is used alone, any existing note will be removed.
         | 
    
        data/lib/doing/version.rb
    CHANGED
    
    
    
        data/lib/doing/wwid.rb
    CHANGED
    
    | @@ -581,6 +581,8 @@ class WWID | |
| 581 581 | 
             
                opt[:back] ||= Time.now
         | 
| 582 582 | 
             
                opt[:timed] ||= false
         | 
| 583 583 |  | 
| 584 | 
            +
                opt[:note] = [opt[:note]] if opt[:note].class == String
         | 
| 585 | 
            +
             | 
| 584 586 | 
             
                title = [title.strip.cap_first]
         | 
| 585 587 | 
             
                title = title.join(' ')
         | 
| 586 588 |  | 
| @@ -602,7 +604,7 @@ class WWID | |
| 602 604 | 
             
                title.gsub!(/ +/,' ')
         | 
| 603 605 | 
             
                entry = {'title' => title.strip, 'date' => opt[:back]}
         | 
| 604 606 | 
             
                unless opt[:note].join('').strip == ''
         | 
| 605 | 
            -
                  entry['note'] = opt[:note].map {|n| n. | 
| 607 | 
            +
                  entry['note'] = opt[:note].map {|n| n.chomp}
         | 
| 606 608 | 
             
                end
         | 
| 607 609 | 
             
                items = @content[section]['items']
         | 
| 608 610 | 
             
                if opt[:timed]
         | 
| @@ -1693,6 +1695,25 @@ EOS | |
| 1693 1695 | 
             
                    end
         | 
| 1694 1696 | 
             
                  }
         | 
| 1695 1697 | 
             
                }
         | 
| 1698 | 
            +
                if @config['autotag'].key? 'transform'
         | 
| 1699 | 
            +
                  @config['autotag']['transform'].each {|tag|
         | 
| 1700 | 
            +
                    if tag =~ /\S+:\S+/
         | 
| 1701 | 
            +
                      rx, r = tag.split(/:/)
         | 
| 1702 | 
            +
                      r.gsub!(/\$/,'\\')
         | 
| 1703 | 
            +
                      rx.sub!(/^@/,'')
         | 
| 1704 | 
            +
                      regex = Regexp.new('@' + rx + '\b')
         | 
| 1705 | 
            +
             | 
| 1706 | 
            +
                      matches = text.scan(regex)
         | 
| 1707 | 
            +
             | 
| 1708 | 
            +
                      matches.each {|m|
         | 
| 1709 | 
            +
                        puts rx,r
         | 
| 1710 | 
            +
                        new_tag = m[0].sub(Regexp.new(rx), r)
         | 
| 1711 | 
            +
                        puts new_tag
         | 
| 1712 | 
            +
                        tail_tags.push(new_tag)
         | 
| 1713 | 
            +
                      } if matches
         | 
| 1714 | 
            +
                    end
         | 
| 1715 | 
            +
                  }
         | 
| 1716 | 
            +
                end
         | 
| 1696 1717 | 
             
                if whitelisted.length > 0
         | 
| 1697 1718 | 
             
                  @results.push("Whitelisted tags: #{whitelisted.join(', ')}")
         | 
| 1698 1719 | 
             
                end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: doing
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1.0. | 
| 4 | 
            +
              version: 1.0.37
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Brett Terpstra
         | 
| 8 8 | 
             
            autorequire:
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date:  | 
| 11 | 
            +
            date: 2021-05-14 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: rake
         | 
| @@ -16,48 +16,42 @@ dependencies: | |
| 16 16 | 
             
                requirements:
         | 
| 17 17 | 
             
                - - ">="
         | 
| 18 18 | 
             
                  - !ruby/object:Gem::Version
         | 
| 19 | 
            -
                    version:  | 
| 19 | 
            +
                    version: 13.0.1
         | 
| 20 20 | 
             
              type: :development
         | 
| 21 21 | 
             
              prerelease: false
         | 
| 22 22 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 23 23 | 
             
                requirements:
         | 
| 24 24 | 
             
                - - ">="
         | 
| 25 25 | 
             
                  - !ruby/object:Gem::Version
         | 
| 26 | 
            -
                    version:  | 
| 26 | 
            +
                    version: 13.0.1
         | 
| 27 27 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 28 28 | 
             
              name: rdoc
         | 
| 29 29 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 30 30 | 
             
                requirements:
         | 
| 31 31 | 
             
                - - "~>"
         | 
| 32 32 | 
             
                  - !ruby/object:Gem::Version
         | 
| 33 | 
            -
                    version:  | 
| 34 | 
            -
                - - ">="
         | 
| 35 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 36 | 
            -
                    version: 4.1.1
         | 
| 33 | 
            +
                    version: 6.2.1
         | 
| 37 34 | 
             
              type: :development
         | 
| 38 35 | 
             
              prerelease: false
         | 
| 39 36 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 40 37 | 
             
                requirements:
         | 
| 41 38 | 
             
                - - "~>"
         | 
| 42 39 | 
             
                  - !ruby/object:Gem::Version
         | 
| 43 | 
            -
                    version:  | 
| 44 | 
            -
                - - ">="
         | 
| 45 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 46 | 
            -
                    version: 4.1.1
         | 
| 40 | 
            +
                    version: 6.2.1
         | 
| 47 41 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 48 42 | 
             
              name: aruba
         | 
| 49 43 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 50 44 | 
             
                requirements:
         | 
| 51 45 | 
             
                - - "~>"
         | 
| 52 46 | 
             
                  - !ruby/object:Gem::Version
         | 
| 53 | 
            -
                    version:  | 
| 47 | 
            +
                    version: 1.0.2
         | 
| 54 48 | 
             
              type: :development
         | 
| 55 49 | 
             
              prerelease: false
         | 
| 56 50 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 57 51 | 
             
                requirements:
         | 
| 58 52 | 
             
                - - "~>"
         | 
| 59 53 | 
             
                  - !ruby/object:Gem::Version
         | 
| 60 | 
            -
                    version:  | 
| 54 | 
            +
                    version: 1.0.2
         | 
| 61 55 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 62 56 | 
             
              name: test-unit
         | 
| 63 57 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| @@ -78,38 +72,38 @@ dependencies: | |
| 78 72 | 
             
                requirements:
         | 
| 79 73 | 
             
                - - "~>"
         | 
| 80 74 | 
             
                  - !ruby/object:Gem::Version
         | 
| 81 | 
            -
                    version: '2. | 
| 75 | 
            +
                    version: '2.19'
         | 
| 82 76 | 
             
                - - ">="
         | 
| 83 77 | 
             
                  - !ruby/object:Gem::Version
         | 
| 84 | 
            -
                    version: 2. | 
| 78 | 
            +
                    version: 2.19.2
         | 
| 85 79 | 
             
              type: :runtime
         | 
| 86 80 | 
             
              prerelease: false
         | 
| 87 81 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 88 82 | 
             
                requirements:
         | 
| 89 83 | 
             
                - - "~>"
         | 
| 90 84 | 
             
                  - !ruby/object:Gem::Version
         | 
| 91 | 
            -
                    version: '2. | 
| 85 | 
            +
                    version: '2.19'
         | 
| 92 86 | 
             
                - - ">="
         | 
| 93 87 | 
             
                  - !ruby/object:Gem::Version
         | 
| 94 | 
            -
                    version: 2. | 
| 88 | 
            +
                    version: 2.19.2
         | 
| 95 89 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 96 90 | 
             
              name: haml
         | 
| 97 91 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 98 92 | 
             
                requirements:
         | 
| 99 | 
            -
                - - " | 
| 93 | 
            +
                - - "~>"
         | 
| 100 94 | 
             
                  - !ruby/object:Gem::Version
         | 
| 101 95 | 
             
                    version: 5.0.0
         | 
| 102 | 
            -
                - - " | 
| 96 | 
            +
                - - ">="
         | 
| 103 97 | 
             
                  - !ruby/object:Gem::Version
         | 
| 104 98 | 
             
                    version: 5.0.0
         | 
| 105 99 | 
             
              type: :runtime
         | 
| 106 100 | 
             
              prerelease: false
         | 
| 107 101 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 108 102 | 
             
                requirements:
         | 
| 109 | 
            -
                - - " | 
| 103 | 
            +
                - - "~>"
         | 
| 110 104 | 
             
                  - !ruby/object:Gem::Version
         | 
| 111 105 | 
             
                    version: 5.0.0
         | 
| 112 | 
            -
                - - " | 
| 106 | 
            +
                - - ">="
         | 
| 113 107 | 
             
                  - !ruby/object:Gem::Version
         | 
| 114 108 | 
             
                    version: 5.0.0
         | 
| 115 109 | 
             
            - !ruby/object:Gem::Dependency
         | 
| @@ -152,26 +146,6 @@ dependencies: | |
| 152 146 | 
             
                - - ">="
         | 
| 153 147 | 
             
                  - !ruby/object:Gem::Version
         | 
| 154 148 | 
             
                    version: 1.2.1
         | 
| 155 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 156 | 
            -
              name: json
         | 
| 157 | 
            -
              requirement: !ruby/object:Gem::Requirement
         | 
| 158 | 
            -
                requirements:
         | 
| 159 | 
            -
                - - ">="
         | 
| 160 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 161 | 
            -
                    version: 1.8.1
         | 
| 162 | 
            -
                - - "~>"
         | 
| 163 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 164 | 
            -
                    version: 2.2.0
         | 
| 165 | 
            -
              type: :runtime
         | 
| 166 | 
            -
              prerelease: false
         | 
| 167 | 
            -
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 168 | 
            -
                requirements:
         | 
| 169 | 
            -
                - - ">="
         | 
| 170 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 171 | 
            -
                    version: 1.8.1
         | 
| 172 | 
            -
                - - "~>"
         | 
| 173 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 174 | 
            -
                    version: 2.2.0
         | 
| 175 149 | 
             
            description: A tool for managing a TaskPaper-like file of recent activites. Perfect
         | 
| 176 150 | 
             
              for the late-night hacker on too much caffeine to remember what they accomplished
         | 
| 177 151 | 
             
              at 2 in the morning.
         | 
| @@ -216,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 216 190 | 
             
                - !ruby/object:Gem::Version
         | 
| 217 191 | 
             
                  version: '0'
         | 
| 218 192 | 
             
            requirements: []
         | 
| 219 | 
            -
            rubygems_version: 3. | 
| 193 | 
            +
            rubygems_version: 3.2.16
         | 
| 220 194 | 
             
            signing_key:
         | 
| 221 195 | 
             
            specification_version: 4
         | 
| 222 196 | 
             
            summary: A command line tool for managing What Was I Doing reminders
         |