Skip to content

Commit

Permalink
Site updated: 2021-10-20 02:22:21
Browse files Browse the repository at this point in the history
  • Loading branch information
brownsloth committed Oct 20, 2021
1 parent b1f3c09 commit 9b25d09
Show file tree
Hide file tree
Showing 13 changed files with 1,127 additions and 21 deletions.
2 changes: 2 additions & 0 deletions 2021/10/05/word-bubbles/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,8 @@ <h2 id="Here’s-how-it-turned-out"><a href="#Here’s-how-it-turned-out" class=
</section>
<section class="post-nav">

<a class="prev" rel="prev" href="/2021/10/12/twitter-bot/">twitter-bot</a>


<a class="next" rel="next" href="/2021/10/02/lemon-stand-assets/">lemon-stand-assets</a>

Expand Down
237 changes: 237 additions & 0 deletions 2021/10/12/twitter-bot/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,237 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">

<meta name="author" content="Tarun Sharma">



<meta name="description" content="personal blog of brownsloth as he journeys through the mystical land of ITP">



<title>twitter-bot | My ITP Journey</title>



<link rel="icon" href="/favicon.ico">




<!-- stylesheets list from _config.yml -->

<link rel="stylesheet" href="/css/style.css">




<!-- scripts list from _config.yml -->

<script src="/js/script.js"></script>

<script src="/js/tocbot.min.js"></script>










<meta name="generator" content="Hexo 5.4.0"></head>

<body>
<script>
// this function is used to check current theme before page loaded.
(() => {
const currentTheme = window.localStorage && window.localStorage.getItem('theme') || '';
const isDark = currentTheme === 'dark';
const pagebody = document.getElementsByTagName('body')[0]
if (isDark) {
pagebody.classList.add('dark-theme');
// mobile
document.getElementById("mobile-toggle-theme").innerText = "· Dark"
} else {
pagebody.classList.remove('dark-theme');
// mobile
document.getElementById("mobile-toggle-theme").innerText = "· Light"
}
})();
</script>

<div class="wrapper">
<header>
<nav class="navbar">
<div class="container">
<div class="navbar-header header-logo"><a href="/">Aloha, Kemosabe!</a></div>
<div class="menu navbar-right">

<a class="menu-item" href="/archives">Posts</a>

<a class="menu-item" href="/category">Categories</a>

<a class="menu-item" href="/tag">Tags</a>

<a class="menu-item" href="/about">About</a>

<input id="switch_default" type="checkbox" class="switch_default">
<label for="switch_default" class="toggleBtn"></label>
</div>
</div>
</nav>


<nav class="navbar-mobile" id="nav-mobile">
<div class="container">
<div class="navbar-header">
<div>
<a href="/">Aloha, Kemosabe!</a><a id="mobile-toggle-theme">·&nbsp;Light</a>
</div>
<div class="menu-toggle" onclick="mobileBtn()">&#9776; Menu</div>
</div>
<div class="menu" id="mobile-menu">

<a class="menu-item" href="/archives">Posts</a>

<a class="menu-item" href="/category">Categories</a>

<a class="menu-item" href="/tag">Tags</a>

<a class="menu-item" href="/about">About</a>

</div>
</div>
</nav>

</header>
<script>
var mobileBtn = function f() {
var toggleMenu = document.getElementsByClassName("menu-toggle")[0];
var mobileMenu = document.getElementById("mobile-menu");
if(toggleMenu.classList.contains("active")){
toggleMenu.classList.remove("active")
mobileMenu.classList.remove("active")
}else{
toggleMenu.classList.add("active")
mobileMenu.classList.add("active")
}
}
</script>
<div class="main">
<div class="container">




<article class="post-wrap">
<header class="post-header">
<h1 class="post-title">twitter-bot</h1>

<div class="post-meta">

Author: <a itemprop="author" rel="author" href="/">Tarun Sharma</a>



<span class="post-time">
Date: <a href="#">October 12, 2021&nbsp;&nbsp;12:45:24</a>
</span>


<span class="post-category">
Category:

<a href="/categories/Programming-A-to-Z-Fall-2021/">Programming A to Z - Fall 2021</a>

</span>

</div>

</header>

<div class="post-content">
<p>For the past few days, I have been trying to get a hang of Google’s Dialogflow as well as the Riverscript library. My aim is to develop one twitter bot each using these libraries, so I get to compare the pros and cons. During class last week, I made a twitter bot modelled on Michael Scott’s character from the Office, which tweeted a random quote from Michael everytime I ran the nodejs script. I found a list of all the quotes in a text file online and directly used that as source after verifying a few lines myself.<br>It was fun, but I want to host the script online so that I don’t have to run the script myself. Also, I would like it to pick random users to talk to rather than throwing out quotes into the vaccum.</p>
<p>As for a twitter bot for the class project, I have a few ideas in mind:</p>
<ul>
<li>An IWantToLearn bot, which could be summoned by users who want to learn something and it would respond with ways they could go about it. One source the bot could refer to is the <a target="_blank" rel="noopener" href="https://www.reddit.com/r/IWantToLearn/">IWTL subreddit</a>. Moreover, the bot will let you know each day what the people you are following are trying to learn, if you enable this feature. I already found a <a target="_blank" rel="noopener" href="https://github.com/not-an-aardvark/snoowrap">javascript wrapper for the reddit api</a> and I am looking forward to experimenting with it. </li>
<li>A ChangeMyMood bot, which when summoned shares a media (image/gif/video/audio) that would try to change your mood and bring it back to normal. As for the IWTL bot, this one can also summarize the moods of your followers daily, if you enable that feature.</li>
<li>A linker bot, which maintains a minimum-separation graph of all the people that have summoned him in the past hour, and would let you know the path through which you might be related to those other twitter handles.</li>
</ul>
<p>My initial impressions: DialogFlow seems a lot of work if the bot is required to do simple things like say hello to its summoners. It’s also time consuming since its a third party service which needs to be invoked every time. However, DialogFlow exposes a way to programatically set the intents which I couldnt find in RiverScript where you have to manually create all the <code>rives</code>.</p>

</div>


<section class="post-copyright">

<p class="copyright-item">
<span>Author:</span>
<span>Tarun Sharma</span>
</p>


<p class="copyright-item">
<span>Permalink:</span>
<span><a href="https://brownsloth.github.io/2021/10/12/twitter-bot/">https://brownsloth.github.io/2021/10/12/twitter-bot/</a></span>
</p>


<p class="copyright-item">
<span>License:</span>
<span>Copyright (c) 2019 <a target="_blank" rel="noopener" href="http://creativecommons.org/licenses/by-nc/4.0/">CC-BY-NC-4.0</a> LICENSE</span>
</p>


<p class="copyright-item">
<span>Slogan:</span>
<span>Do you believe in <strong>DESTINY<strong>?</span>
</p>


</section>

<section class="post-tags">
<div>
<span>Tag(s):</span>
<span class="tag">

</span>
</div>
<div>
<a href="javascript:window.history.back();">back</a>
<span>· </span>
<a href="/">home</a>
</div>
</section>
<section class="post-nav">

<a class="prev" rel="prev" href="/2021/10/20/rap-mashup-bot/">Mashup Discord Bot</a>


<a class="next" rel="next" href="/2021/10/05/word-bubbles/">Word Bubbles</a>

</section>


</article>
</div>

</div>
<footer id="footer" class="footer">
<div class="copyright">
<span>© Tarun Sharma | Font credits: <a href="https://opendyslexic.org/" target="_blank">OpenDyslexic</a> | Powered by <a href="https://hexo.io" target="_blank">Hexo</a> & <a href="https://github.com/Siricee/hexo-theme-Chic" target="_blank">Chic</a></span>
</div>
</footer>

</div>
</body>

</html>
Loading

0 comments on commit 9b25d09

Please sign in to comment.