Skip to content

Custom Rules

Dennis Jen edited this page Sep 13, 2019 · 2 revisions

Gobo includes built-in rules (e.g. virality, gender) and custom rules that can be configured. These custom rules include:

  • Keyword rules: Excluded content that contains any of the keywords
  • Additive rules: Includes content from accounts users don't follow already

After creating a custom rule, it is not visible to any users until shared. Content will not appear until fetched.

Keyword Rules

New keyword rules can be created using the flask CLI, flask create_keyword_rule. Run that command without parameters for details.

An example of creating a keyword rule is as follows:

flask create_keyword_rule --creator-id 0 --creator-display-name "Gobo" --title "2020 US Election News" --description "Political news can be overwhelming! This hides anything about candidates running for the US 2020 Presidential election." --exclude-terms "Cory Booker, Pete Buttigieg, Julian Castro, John Delaney, Tulsi Gabbard, Kirsten Gillibrand, Kamala Harris, John Hickenlooper, Jay Inslee, Amy Klobuchar, Wayne Messam, Beto O'Rourke, Bernie Sanders, Elizabeth Warren, Bill Weld, Marianne Williamson, Andrew Yang, Donald Trump, President Trump, 2020 Election, 2020 Presidential, 2020 Dems"

Additive Rules

New additive rules can be created using the flask CLI, flask create_additive_rule. Run that command without parameters for details.

Once the rule is created, accounts to present content from can be linked to the rule. Run flask add_additive_rule_link without parameters for more information.

Gobo has two additive rules: Politics and Tech Perspectives. For examples of how to set them up, see below.

Politics

Example of create_additive_rule

flask create_additive_rule --creator-id 0 --creator-display-name "Media Cloud" --title "Politics" --description "See stories matching or challenging your political perspective." --level-names "Left,Center,Right" --shareable False --long-description 'Worried about your "echo chamber"? Gobo lets you add posts from political perspectives that might be different from your own. We curated a list of popular U.S. news sources from the left, center, and right, so you can explore a range of positions on U.S. politics.' --link "https://mediacloud.org/"

Example of add_additive_rule_link

flask add_additive_rule_link --rule-id 4 --source 'twitter' --level 1 --link 'https://twitter.com/usatoday' --name 'USA Today' --display-uri 'http://usatoday.com/'
Name Facebook Twitter Home URL Level
Huffington Post https://www.facebook.com/HuffPost https://twitter.com/HuffPost http://www.huffingtonpost.com 0
MSNBC https://www.facebook.com/msnbc/ https://twitter.com/msnbc http://www.msnbc.msn.com/ 0
Vox https://www.facebook.com/Vox https://twitter.com/voxdotcom http://www.vox.com 0
NPR https://www.facebook.com/NPR/ https://twitter.com/NPR http://www.npr.org/ 0
Politicus USA https://www.facebook.com/PoliticusUSA/ https://twitter.com/politicususa http://www.politicususa.com 0
The Daily Beast https://www.facebook.com/thedailybeast/ https://twitter.com/thedailybeast http://www.thedailybeast.com/ 0
Slate https://www.facebook.com/Slate https://twitter.com/slate http://www.slate.com 0
Raw Story https://www.facebook.com/TheRawStory https://twitter.com/rawstory http://rawstory.com 0
Salon https://www.facebook.com/salon/ https://twitter.com/salon http://www.salon.com/ 0
Daily Kos https://www.facebook.com/dailykos/ https://twitter.com/dailykos http://www.dailykos.com 0
The Hill https://www.facebook.com/TheHill https://twitter.com/thehill http://thehill.com 1
ABC News https://www.facebook.com/ABCNews https://twitter.com/abcnews http://abcnews.go.com/ 1
USA Today https://www.facebook.com/usatoday https://twitter.com/usatoday http://usatoday.com/ 1
Business Insider https://www.facebook.com/businessinsider https://twitter.com/businessinsider http://www.businessinsider.com 1
Wall Street Journal https://www.facebook.com/wsj https://twitter.com/WSJ http://online.wsj.com/ 1
Reuters https://www.facebook.com/Reuters https://twitter.com/reuters http://www.reuters.com 1
The Intercept https://www.facebook.com/theinterceptflm https://twitter.com/theintercept https://theintercept.com/ 1
Mediaite https://www.facebook.com/mediaite https://twitter.com/mediaite http://www.mediaite.com 1
Business Week https://www.facebook.com/bloombergbusinessweek/ https://twitter.com/BW http://businessweek.com 1
CNBC https://www.facebook.com/cnbc/ https://twitter.com/CNBC https://twitter.com/CNBC 1
Breitbart https://www.facebook.com/Breitbart https://twitter.com/BreitbartNews http://www.breitbart.com 2
Conservative Tribune https://www.facebook.com/theconservativetribune/ https://twitter.com/conserv_tribune http://conservativetribune.com 2
The Blaze https://www.facebook.com/theblaze https://twitter.com/theblaze http://www.theblaze.com 2
Daily Caller https://www.facebook.com/DailyCaller https://twitter.com/dailycaller http://dailycaller.com 2
Fox News https://www.facebook.com/FoxNews https://twitter.com/FoxNews http://www.foxnews.com 2
Daily Mail https://www.facebook.com/DailyMail https://twitter.com/DailyMail http://www.dailymail.co.uk 2
The Gateway Pundit https://www.facebook.com/gatewaypundit https://twitter.com/gatewaypundit http://www.thegatewaypundit.com 2
Western Journalism https://www.facebook.com/WesternJournalism/ https://twitter.com/WestJournalism http://www.westernjournalism.com 2
NY Post https://www.facebook.com/NYPost/ https://twitter.com/nypost http://www.nypost.com 2
The Political Insider https://www.facebook.com/thepoliticalinsider https://twitter.com/TPInsidr http://thepoliticalinsider.com 2

Tech Perspectives

Example of create_additive_rule

flask create_additive_rule --creator-id 0 --creator-display-name "Gobo" --title "Tech Perspectives" --description "Explore the Internet's love-hate relationship with tech." --level-names "Tech Critics,Tech Journalists,Tech Companies" --shareable False --long-description "We figured as Gobo users, you might be interested in the latest tech news. But how is tech being talked about by different people? We believe that tech is political, so we curated a list of source with different perspectives on tech. Gobo lets you add posts from these accounts to your feed, so you can explore the range of opinions on the latest tech news."

Example of add_additive_rule_link

flask add_additive_rule_link --rule-id 3 --source "twitter" --level 0 --link "https://twitter.com/techworkersco" --name "Tech Workers Coalition"

List of Accounts

Name Link Level
Tech Workers Coalition https://twitter.com/techworkersco 0
Data & Society https://twitter.com/datasociety 0
Data for Black Lives https://twitter.com/Data4BlackLives 0
Joy Buolamwini https://twitter.com/jovialjoy 0
Lilly Irani https://twitter.com/gleemie 0
Kate Crawford https://twitter.com/katecrawford 0
Safiya Noble https://twitter.com/safiyanoble 0
Danah Boyd https://twitter.com/zephoria 0
Forbes Tech https://twitter.com/ForbesTech 1
Wall Street Journal Tech https://twitter.com/WSJTech 1
NBC News Tech https://twitter.com/NBCNewsTech 1
Bloomberg Technology https://twitter.com/technology 1
Reuters Tech News https://twitter.com/ReutersTech 1
Google https://twitter.com/Google 2
Facebook https://twitter.com/facebook 2
Microsoft https://twitter.com/Microsoft 2
Apple https://twitter.com/Apple 2
Amazon https://twitter.com/amazon 2
Twitter https://twitter.com/Twitter 2
Uber https://twitter.com/Uber 2
Lyft https://twitter.com/lyft 2

Sharing a Rule

Custom rules can be visible to either individuals or to all users of the system.

Example of sharing a custom rule to a specific user using share_rule_to_user:

flask share_rule_to_user --user-id 3 --rule-id 4

Example of sharing a custom rule to all users using share_rule_all_users:

flask share_rule_all_users --rule-id 2 --enabled True
Clone this wiki locally