Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/svenfuchs/gmail_filters
https://github.com/svenfuchs/gmail_filters
Last synced: 12 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/svenfuchs/gmail_filters
- Owner: svenfuchs
- Created: 2017-03-15T21:23:48.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-15T21:55:25.000Z (almost 8 years ago)
- Last Synced: 2024-10-26T22:39:52.809Z (2 months ago)
- Language: Ruby
- Size: 6.84 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Gmail Filters
*The things we do because Gmail rules do not allow to delete a label*
Experimental, not much to see.
## Usage
Define filters in Ruby files, e.g.:
```ruby
# ~/.gmail_filters/trash.rbfilter do
has 'in:spam'
archive
mark_read
endfilter do
from '[email protected]', '[email protected]'
archive
mark_read
delete
end
```To exclude conditions from previous filters:
```ruby
# ~/.gmail_filters/github.rbfilter do
list 'foo.my-org.github.com'
# ...
endfilter do
list 'bar.my-org.github.com'
# ...
end# exports "list:*[email protected] AND -(list:[email protected] OR list:bar.my-org.github.com)
otherwise do
list '*.my-org.github.com'
# ...
end
```Optionally configure author and email:
```yaml
# ~/.gmail_filters/config.ymlauthor: Sven Fuchs
email: [email protected]
```Export to XML:
```
$ bin/gmail-filters export
```## Credits
**Heavily** inspired by [@antifuchs](https://github.com/antifuchs)' very nice [gmail-britta](https://github.com/antifuchs/gmail-britta).