citadel

My dotfiles, scripts and nix configs
git clone git://jb55.com/citadel
Log | Files | Refs | README | LICENSE

commit 750a8c5baee23ab3305ff626a8a2e54e3ea45575
parent 91d7e236947cd4637dd7eb0bfcca3d364bce6fb6
Author: William Casarin <jb55@jb55.com>
Date:   Sun,  8 Nov 2020 11:40:47 -0800

notmuch: simplify tagging

Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Mbin/notmuch-poll | 223+------------------------------------------------------------------------------
1 file changed, 2 insertions(+), 221 deletions(-)

diff --git a/bin/notmuch-poll b/bin/notmuch-poll @@ -8,141 +8,23 @@ notmuchcmd () { # sent notmuchcmd tag +sent tag:inbox and not tag:sent and folder:".Sent" -# youtube -notmuchcmd tag +youtube tag:inbox and not tag:youtube and folder:".YouTube" -notmuchcmd tag +talk from:"Talks at Google" and tag:youtube and tag:inbox and not tag:talk -notmuchcmd tag +lecture from:"Khan Academy" and tag:youtube and tag:inbox and not tag:lecture - # lobsters, ycombinator notmuchcmd tag +lobsters +rss +tech +busy tag:inbox and not tag:lobsters and folder:".Lists.lobsters" -notmuchcmd tag +hn +rss +tech +busy tag:inbox and not tag:hn and folder:".HackerNews" - # promote from busy if its interesting notmuchcmd tag -busy +haskell tag:inbox and not tag:haskell and '(tag:lobsters or tag:hn)' and subject:haskell -notmuchcmd tag -busy +icn tag:inbox and not tag:icn and '(tag:lobsters or tag:hn)' and subject:icn -notmuchcmd tag -busy +ndn tag:inbox and not tag:ndn and '(tag:lobsters or tag:hn)' and subject:ndn -notmuchcmd tag -busy +ccnx tag:inbox and not tag:ccnx and '(tag:lobsters or tag:hn)' and subject:ccnx -notmuchcmd tag -busy +cicn tag:inbox and not tag:cicn and '(tag:lobsters or tag:hn)' and subject:cicn notmuchcmd tag -busy +nix tag:inbox and not tag:nix and '(tag:lobsters or tag:hn)' and subject:nix -notmuchcmd tag -busy +spacemacs tag:inbox and not tag:spacemacs and '(tag:lobsters or tag:hn)' and subject:spacemacs notmuchcmd tag +list tag:inbox and to:"groups.io" -notmuchcmd tag +pony +pl tag:inbox and to:"pony.groups.io" -notmuchcmd tag +emacs +emacs-dev +list tag:inbox and folder:".Lists.emacs" -notmuchcmd tag +guix +list tag:inbox and folder:".Lists.guix" -notmuchcmd tag +arxiv +busy tag:inbox and not tag:arxiv and folder:".Arxiv" -notmuchcmd tag +ml tag:inbox and not tag:ml and tag:arxiv and subject:"stat.ML" # notmuch stuff notmuchcmd tag +francesc \(from:elies@posteo.net or from:francesc.elies@gmail.com\) and not tag:francesc notmuchcmd tag +notmuch +list to:notmuch and tag:inbox and not tag:notmuch -# rss -notmuchcmd tag +rss tag:inbox and not tag:rss and folder:".RSS" -notmuchcmd tag +rss +reddit +busy tag:inbox and not tag:reddit and folder:".Reddit" -notmuchcmd tag +best +haskell \ - tag:inbox and \ - from:"A Neighborhood of Infinity" or \ - from:"Haskell for all" or \ - from:"Shtetl-Optimized" or \ - from:"Lost in Technopolis" - -notmuchcmd tag +baez +best from:"John Baez" or from:Baez_J and not tag:baez -notmuchcmd tag +best +arxiv from:"ArXiv Query" and not tag:best and tag:inbox -notmuchcmd tag +best +tech from:"Technology Review" and not tag:best -notmuchcmd tag +best +physics +compsci from:from:"Shtetl-Optimized" and not tag:best -notmuchcmd tag +best +haskell +oleg from:"okmij" and not tag:best -notmuchcmd tag +best +edge from:"edge_manager" and not tag:best - -notmuchcmd tag +nix \ - tag:inbox and \ - not tag:nix and \ - from:"Newest questions tagged nix - Stack Overflow" or \ - from:"Thoughts about computer technologies" or \ - from:"NixOS Planet" - -notmuchcmd tag +busy +emacs +so +question \ - tag:inbox and \ - not tag:emacs and \ - from:"Emacs Stack Exchange" - -notmuchcmd tag +busy +bitcoin +so +question \ - tag:inbox and \ - not tag:so and \ - from:"Bitcoin Stack Exchange" - -notmuchcmd tag +elm \ - tag:inbox and \ - not tag:elm and \ - from:"Newest questions tagged elm" - -notmuchcmd tag +rust \ - tag:inbox and \ - not tag:rust and \ - from:rust - -notmuchcmd tag +emacs \ - tag:inbox and \ - not tag:emacs and \ - from:emacs - -notmuchcmd tag +busy +question +so \ - tag:inbox and \ - not tag:so and \ - from:"Stack Overflow" - -notmuchcmd tag +elec +busy tag:inbox and not tag:elec and from:"Adafruit Industries" -notmuchcmd tag +python tag:inbox and not tag:python and from:"Neopythonic" -notmuchcmd tag +physics \ - tag:inbox and \ - not tag:physics and \ - from:"Physics and cake" or \ - from:"symmetry magazine" - -notmuchcmd tag +ml +best -busy tag:inbox and not tag:ml and from:"Andrej Karpathy" -notmuchcmd tag +ml tag:inbox and not tag:ml and from:"Machine Learning" - -notmuchcmd tag +haskell \ - tag:inbox and \ - not tag:haskell and \ - from:"Bartosz Milewski" or \ - from:"Haskell" or \ - from:"Declarative Languages Blog" - -notmuchcmd tag +gamedev tag:inbox and not tag:gamedev and from:"Unity Technologies Blog" -notmuchcmd tag +prog +lisp tag:inbox and not tag:prog and from:"Peter Norvig" -notmuchcmd tag +startup tag:inbox and not tag:startup and from:"Paul Graham" -notmuchcmd tag +talk tag:inbox and not tag:talk and from:"Video Lectures" -notmuchcmd tag +js tag:inbox and not tag:js and from:"Vjeux" -notmuchcmd tag +cli +tips tag:inbox and not tag:cli and from:"UNIX Command Line" -notmuchcmd tag +go tag:inbox and not tag:go and from:"Planet 5" -notmuchcmd tag +busy +hack tag:inbox and not tag:hack and from:"Hackaday" -notmuchcmd tag +vim tag:inbox and not tag:hack and from:"Vimcasts" -notmuchcmd tag +comic tag:inbox and not tag:comic and from:"xkcd" -notmuchcmd tag +lesswrong +rationality tag:inbox and not tag:lesswrong and from:"Less Wrong" -notmuchcmd tag +rationality tag:inbox and \(from:"Slate Star Codex" \ - or from:"Overcoming Bias" \ - or from:"Information Processing"\) - # me -notmuchcmd tag +to-me not tag:to-me and not tag:rss and tag:inbox and to:jackbox55@gmail.com -notmuchcmd tag +to-me not tag:to-me and not tag:rss and tag:inbox and to:jb55@jb55.com -notmuchcmd tag +to-me not tag:to-me and not tag:rss and tag:inbox and to:jb@jb55.com -notmuchcmd tag +to-me not tag:to-me and not tag:rss and tag:inbox and to:bill@monstercat.com -notmuchcmd tag +to-me not tag:to-me and not tag:rss and tag:inbox and to:will.casarin@commit.dev -notmuchcmd tag +to-me not tag:to-me and not tag:rss and tag:inbox and to:will@blockstream.io -notmuchcmd tag +to-me not tag:to-me and not tag:rss and tag:inbox and to:will@blockstream.com -notmuchcmd tag +to-me not tag:to-me and not tag:rss and tag:inbox and to:bill@monster.cat -notmuchcmd tag +to-me not tag:to-me and not tag:rss and tag:inbox and to:bill@casarin.me -notmuchcmd tag +to-me not tag:to-me and not tag:rss and tag:inbox and to:bill@casarin.ca -notmuchcmd tag +to-me not tag:to-me and not tag:rss and tag:inbox and to:will@casarin.ca -notmuchcmd tag +to-me not tag:to-me and not tag:rss and tag:inbox and to:will@casarin.me -notmuchcmd tag +to-me not tag:to-me and not tag:rss and tag:inbox and to:william@casarin.ca -notmuchcmd tag +to-me not tag:to-me and not tag:rss and tag:inbox and to:william@casarin.me +notmuchcmd tag +to-me not tag:to-me and and tag:inbox and \(to:jackbox55@gmail.com or to:jb55@jb55.com\) notmuchcmd tag -to-me tag:to-me and tag:inbox and from:discoursemail.com notmuchcmd tag +flagged tag:inbox and not tag:flagged and to:jackbox55+star@gmail.com -notmuchcmd tag +flagged tag:inbox and not tag:flagged and to:jackbox55+s@gmail.com # annoying notmuchcmd tag +alert tag:inbox and folder:".Alerts" @@ -155,17 +37,10 @@ notmuchcmd tag +ci tag:inbox and from:gl@blockstream.io and subject:Pipeline # linux notmuchcmd tag +linux +list to:vger.kernel.org and tag:inbox and not tag:linux notmuchcmd tag +mesa +linux +list to:mesa-dev and tag:inbox and not tag:mesa -notmuchcmd tag +wine +list to:wine-devel@winehq.org and tag:inbox and not tag:wine -notmuchcmd tag +amd +linux +list to:amd-gfx and tag:inbox and not tag:amd-gfx -notmuchcmd tag +xorg +linux +list to:xorg-devel@lists.x.org and tag:inbox and not tag:xorg notmuchcmd tag +git +list to:git@vger.kernel.org and tag:inbox and not tag:git -notmuchcmd tag +dri +linux +list to:dri-devel@lists.freedesktop.org and tag:inbox and not tag:dri -notmuchcmd tag +sa-users +linux +list to:users@spamassassin.apache.org and tag:inbox and not tag:sa-users -notmuchcmd tag +nouveau +linux +list to:nouveau@lists.freedesktop.org and tag:inbox and not tag:nouveau # forums -notmuchcmd tag +suckless +list to:suckless.org and tag:inbox and not tag:suckless notmuchcmd tag +bitcoin +list folder:".Lists.bitcoin" and tag:inbox notmuchcmd tag +best -filed +bitcoin-dev +bitcoin +list to:"bitcoin-dev@lists.linuxfoundation.org" and tag:inbox and not tag:bitcoin-dev notmuchcmd tag +cypherpunks +list 'from:cypherpunks@lists.cpunks.org' and tag:inbox @@ -175,126 +50,32 @@ notmuchcmd tag +bitcoin +core +gui +busy to:bitcoin-core/gui and tag:inbox notmuchcmd tag +bitcoin +busy +bips to:"bitcoin/bips" and tag:inbox notmuchcmd tag +lightning +lightning-dev +list to:lightning-dev notmuchcmd tag +lightning to:"lightningnetwork/" and tag:inbox -notmuchcmd tag +lightning -busy lightning and tag:question and tag:inbox -notmuchcmd tag +cabal2nix +nix +list to:NixOS/cabal2nix and tag:inbox -notmuchcmd tag +cicn +icn +list to:cicn and tag:inbox -notmuchcmd tag +component +list to:componentjs.googlegroups.com and tag:inbox notmuchcmd tag +crypto +list to:cryptography.metzdowd.com and tag:inbox -notmuchcmd tag +elm +list folder:".Lists.elm" and tag:inbox notmuchcmd tag +github +filed \(folder:".GitHub" or from:github.com\) and tag:inbox -notmuchcmd tag +blockstream +green '(to:"ElementsProject/libwally-core" or to:"Blockstream/gdk" or to:"Blockstream/gdk_rpc" or to:"WalletElectron")' and tag:inbox notmuchcmd tag +lightning +clightning +list to:"c-lightning@lists.ozlabs.org" and tag:inbox notmuchcmd tag +lightning +clightning '(to:"ElementsProject/lightning" or to:"lightningd/plugins")' and tag:inbox -notmuchcmd tag +pr '"You can view, comment on, or merge this pull request online at"' and tag:github and not tag:pr and tag:inbox and not tag:issue -#notmuchcmd tag +issue '/issues\//' and tag:github and not tag:pr and not tag:issue and tag:inbox - -notmuch tag +pr $(notmuch search --output=threads tag:pr and tag:inbox) - -notmuchcmd tag +merged Merged and event from:notifications@github.com and not tag:merged and tag:inbox and tag:pr -notmuchcmd tag +closed Closed and event from:notifications@github.com and not tag:closed and tag:inbox and tag:pr - -notmuch tag +merged $(notmuch search --output=threads tag:merged and tag:inbox) -notmuch tag +closed $(notmuch search --output=threads tag:closed and tag:inbox) - -notmuchcmd tag +bot from:DrahtBot or '"Semi-automatic update"' or 'from:"GrahamC of Borg"' and not tag:bot and tag:inbox -notmuchcmd tag +haskell +cabal-dev +list to:cabal-devel.haskell.org and tag:inbox -notmuchcmd tag +haskell +commercial-haskell +list to:commercialhaskell.googlegroups.com and tag:inbox -notmuchcmd tag +haskell +ghc-devs +list to:ghc-devs.haskell.org and tag:inbox -notmuchcmd tag +haskell +haskell-cafe +list to:haskell-cafe.haskell.org and tag:inbox -notmuchcmd tag +haskell +haskell-libraries +list to:libraries.haskell.org or to:libraries@haskell.org and tag:inbox -notmuchcmd tag +haskell +list to:haskell.haskell.org and tag:inbox -notmuchcmd tag +haskell +pipes +list to:haskell-pipes.googlegroups.com and tag:inbox -notmuchcmd tag +haskell +streaming to:streaming-haskell.googlegroups.com and tag:inbox -notmuchcmd tag +icn +list folder:".Lists.icn" and tag:inbox -notmuchcmd tag +ndn +list to:ndn-interest and tag:inbox notmuchcmd tag +nix-dev +nix +list \(to:nix-dev@lists.science.uu.nl OR to:nix-dev@cs.uu.nl OR to:nix-devel@googlegroups.com OR from:nixos1@discoursemail.com\) and tag:inbox -notmuchcmd tag +nixpkgs +nix +busy +list to:nixpkgs@noreply.github.com and tag:inbox -notmuchcmd tag +nixpm +nix +list to:nix@noreply.github.com and tag:inbox -notmuchcmd tag +hydra +nix +list to:hydra@noreply.github.com and tag:inbox -notmuchcmd tag +otr +list to:otr-users.lists.cypherpunks.ca and tag:inbox notmuchcmd tag +redo +list to:redo-list.googlegroups.com and tag:inbox -notmuchcmd tag +shen +list to:qilang and tag:inbox -notmuchcmd tag +spacemacs +busy +list to:spacemacs@noreply.github.com and tag:inbox -notmuchcmd tag +webvr +vr +list to:web-vr-discuss and tag:inbox - -# razorcx -notmuchcmd tag +razorcx \(from:razorcx.com or from:"Vladislav Vyatkin" or from:"Dariya Kapelyukhovskaya"\) and tag:inbox and not tag:razorcx - -notmuchcmd tag +best -busy \ - tag:inbox and \ - not tag:best and \ - \(from:"Pieter Wuille" or \ - from:"Linus Torvalds" or \ - from:"Keith Packard" or \ - from:"Peter Todd" or \ - from:"Adam Back" or \ - from:"Rusty Russell" or \ - from:"Christian Decker" or \ - from:"Gregory Maxwell" or \ - from:"Jameson Lopp" or \ - from:roconnor \ - \) - -notmuchcmd tag +kindle tag:inbox and not tag:kindle and 'from:jb55+kindle@jb55.com' - -# things I'm interested in -notmuchcmd tag +psbt -filed +flagged -busy tag:inbox and not tag:bot and \ - '(psbt or bip174 or bip118 or "bip 118" or SIGHASH_NOINPUT or SIGHASH_NOINPUT_UNSAFE or "bip 174" or (tag:clightning and tag:list))' -notmuchcmd tag +flagged -busy tag:inbox and \ - \(\(bitcoin and not tag:github\) or altcoins or trezor or multi-ghc-travis or obs-studio or dragon-drop or clib or terra or wkhtmltopdf or altcoins or notmuch or navi10 or gfx10 or radv or vulkan or vkd3d or to:mesa-announce or to:workflows\) # filed notmuchcmd tag +filed '(tag:list or tag:rss or tag:busy)' and not tag:filed and not tag:best and not tag:flagged and tag:inbox # more contracting stuff -notmuchcmd tag +work +evc +commit -filed tag:inbox and subject:EventchainCanada notmuchcmd tag +work +steamoji tag:inbox and to:steamoji notmuchcmd tag +alert to:notifications.heroku.com notmuchcmd tag +work +commit -filed tag:inbox and to:will.casarin@commit.dev notmuchcmd tag +work +commit tag:github and tag:inbox and to:commitdev -notmuchcmd tag +work +blockstream -filed tag:inbox '(to:will@blockstream.io or to:will@blockstream.com)' -notmuchcmd tag +work +blockstream tag:inbox tag:github to:blockstream - # except if someone mentions e notmuchcmd tag +flagged -busy -filed tag:inbox and '(tag:list and tag:to-me) or to:mention@noreply.github.com or author@noreply.github.com or to:review_requested@noreply.github.com or to:comment@noreply.github.com or (subject:jb55 and tag:github)' -# remove annoying from inbox, should be last in file -notmuchcmd tag +filed tag:inbox and tag:update - -notmuchcmd tag -inbox +newsletter \ - tag:inbox and \ - from:newsletters.microsoft.com or \ - from:freescale - -notmuchcmd tag -inbox \ - tag:inbox and \ - from:philphys.phil.elte.hu or \ - from:everything-list.googlegroups.com or \ - from:codesite-noreply@google.com or \ - from:getsatisfaction.com or \ - from:post@tinyportal.net or \ - from:yahoo.com.hk - -notmuchcmd tag -inbox +brandalliance tag:inbox and from:mail@brandalliancelounge.com -notmuchcmd tag -inbox +spam tag:inbox and from:"zcheng <notifications@github.com>" -notmuchcmd tag -inbox +spam tag:inbox and folder:".Spam" -notmuchcmd tag -inbox +spam +facebook tag:inbox and to:"Jacob <jb55@jb55.com>" - - # not spam notmuchcmd tag +inbox -spam +flagged "bitcoin wizard" and tag:spam -# k9mail +# phone mail notmuchcmd tag -inbox tag:inbox and folder:".Archive" -# thunderbird I guess? -notmuchcmd tag -inbox tag:inbox and folder:".Archives.2017" - -# remove to-me from rss items -notmuchcmd tag -to-me tag:inbox and tag:rss and tag:to-me - printf "notmuch tagging done.\n"