Skip to content

Instantly share code, notes, and snippets.

@pocky
Created May 14, 2018 21:34
Show Gist options
  • Save pocky/dc19039defe41e8b793df0f27bf740b8 to your computer and use it in GitHub Desktop.
Save pocky/dc19039defe41e8b793df0f27bf740b8 to your computer and use it in GitHub Desktop.
My Tweet deletion script
#!/usr/bin/env ruby
require "tweet_deletion"
require 'yaml'
config = YAML.load_file('config.yml')
TweetDeletion.with( config ) do
for_archive("./archive/") do
keep_if earlier_than(3.years.ago), tag:" ๐Ÿ“… " # When I was young, I was.
keep_if contains("crรฉation du compte twitter"), tag: " ๐Ÿฆ„ " # My first tweet
keep_if is_rt, tag: " ๐Ÿ˜˜ "
keep_if rt_by_more_than(10), tag: " โœจ "
keep_if has_media, tag: " ๐Ÿ“บ "
keep_if contains("php"), tag: " ๐Ÿ˜ "
keep_if contains("Verifying myself"), tag: " ๐Ÿ”‘ " # Keybase
else_delete tag: " ๐Ÿ—‘ "
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment