Repository: fossasia/loklak_movietweets
Branch: gh-pages
Commit: d14ad7670692
Files: 3
Total size: 6.5 KB
Directory structure:
gitextract_guks0mz7/
├── README.md
├── index.html
└── script.js
================================================
FILE CONTENTS
================================================
================================================
FILE: README.md
================================================
# loklak Movie Tweets
This form uses the [loklak public API](http://loklak.org/) to search the last 100 most recent tweets about the specified films.
Styles by [Bootstrap](http://getbootstrap.com/).
## Use
Since it's plain HTML/JS, you only have to download both `index.html` and `script.js` and place them in the same directory.
Every time you change the content of the text box with a new film name and press <kbd>ENTER</kbd>, the results should update automatically. However, if it doesn't work, you can use the *Search!* button at the right.
> Your browser must have JavaScript enabled, and Internet connection
You can find a live demo [here](http://yagogg.github.io/GCI2015/loklak%20Movie%20Tweets/).
*(Hosted by GitHub Pages)*
## Screenshots


================================================
FILE: index.html
================================================
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<title>GCI | Loklak Movie Tweets</title>
</head>
<body>
<div class="container">
<div class="page-header">
<h1>Loklak Movie Tweets</h1>
<h2><small>Google Code-in - FOSSASIA</small></h2>
</div>
<h2>Search a movie</h2>
<div class="row">
<div class="col-lg-6">
<div class="input-group">
<input type="text" id="film" class="form-control" placeholder="e.g.: matrix" onchange="searchTweets();">
<span class="input-group-btn">
<button class="btn btn-default" type="button" onclick="searchTweets();">Search!</button>
</span>
</div>
<br>
<div id="loading" class="well" style="display: none;">
<h4 style="text-align: center;">Loading...</h4>
<div class="progress">
<div class="progress-bar progress-bar-striped active" role="progressbar" style="width: 100%;">
</div>
</div>
</div>
</div>
</div><br>
<div id="resultsBox" style="display: none;">
<h2>Results</h2>
<div id="tweetCount" class="alert alert-info"></div>
<ul id="tweets" class="list-group">
</ul>
</div>
<footer>
<hr>
<div class="well">
<b>Google Code-in 2015</b> | Made by Yago González with <3, for the Open Source community<br>
Powered by <a href="http://getbootstrap.com"><b>Bootstrap</b></a> and the <a href="http://loklak.org"><b>loklak public API</b></a>
</div>
</footer>
</div>
<template>
<li class="list-group-item">
<div class="media">
<div class="media-left">
<img class="media-object" src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9InllcyI/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iNjQiIGhlaWdodD0iNjQiIHZpZXdCb3g9IjAgMCA2NCA2NCIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+PCEtLQpTb3VyY2UgVVJMOiBob2xkZXIuanMvNjR4NjQKQ3JlYXRlZCB3aXRoIEhvbGRlci5qcyAyLjYuMC4KTGVhcm4gbW9yZSBhdCBodHRwOi8vaG9sZGVyanMuY29tCihjKSAyMDEyLTIwMTUgSXZhbiBNYWxvcGluc2t5IC0gaHR0cDovL2ltc2t5LmNvCi0tPjxkZWZzPjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+PCFbQ0RBVEFbI2hvbGRlcl8xNTFmMmVkZjk4NSB0ZXh0IHsgZmlsbDojQUFBQUFBO2ZvbnQtd2VpZ2h0OmJvbGQ7Zm9udC1mYW1pbHk6QXJpYWwsIEhlbHZldGljYSwgT3BlbiBTYW5zLCBzYW5zLXNlcmlmLCBtb25vc3BhY2U7Zm9udC1zaXplOjEwcHQgfSBdXT48L3N0eWxlPjwvZGVmcz48ZyBpZD0iaG9sZGVyXzE1MWYyZWRmOTg1Ij48cmVjdCB3aWR0aD0iNjQiIGhlaWdodD0iNjQiIGZpbGw9IiNFRUVFRUUiLz48Zz48dGV4dCB4PSIxNC41IiB5PSIzNi44Ij42NHg2NDwvdGV4dD48L2c+PC9nPjwvc3ZnPg==">
</div>
<div class="media-body">
<h4>@user <small>(30 Dic 13:37)</small></h4>
<span>Text</span>
</div>
</div>
</li>
</template>
<!-- jQuery JS -->
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<!-- Bootstrap JS -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
<script src="./script.js"></script>
<script id="loklakAPICall"></script>
</body>
</html>
================================================
FILE: script.js
================================================
function searchTweets() { // Query the loklak.org API
var film = document.getElementById('film').value;
var url = 'http://loklak.org/api/search.json?q=' + film + ' film&minified=true&callback=updateResults';
document.body.removeChild(document.getElementById('loklakAPICall')); // Delete old script calls
// Creation of the new script, to support JSONP
var script = document.createElement('script');
script.id = 'loklakAPICall';
script.src = url;
document.body.appendChild(script);
document.getElementById('loading').style.display = 'block'; // Make loading box visible
}
function updateResults(input) { // Function called to interpret the results from the API, through JSONP
var statuses = input.statuses;
document.getElementById('resultsBox').style.display = 'block';
var tweetsBox = document.getElementById('tweets');
while(tweetsBox.childElementCount > 0) { // Empty the tweets box
tweetsBox.removeChild(tweetsBox.lastChild);
}
var media, mBody;
document.getElementById('tweetCount').innerHTML = "Found " + statuses.length + " tweets"; // Show amount of tweets in the alert
for(i in statuses) {
current = document.getElementsByTagName('template')[0].content.children[0].cloneNode(true); // Clone the tweet format, from the <template>
media = current.getElementsByClassName('media')[0];
media.getElementsByClassName('media-object')[0].src = statuses[i].user.profile_image_url_https; // Set user's picture
mBody = media.getElementsByClassName('media-body')[0];
mBody.getElementsByTagName('h4')[0].innerHTML = '<a style="color: black;" href="https://twitter.com' + statuses[i].screen_name + '/">@' + statuses[i].screen_name + '</a> <small><a style="color: black;" href="' + statuses[i].link + '">' + new Date(statuses[i].created_at).toUTCString() + '</a></small>'; // Set username and tweet's date
mBody.getElementsByTagName('span')[0].innerHTML = statuses[i].text; // Set tweet's content
tweetsBox.appendChild(current); // Add the complete tweet to the list
}
document.getElementById('loading').style.display = 'none'; // Hide the loading progress bar
}
gitextract_guks0mz7/ ├── README.md ├── index.html └── script.js
SYMBOL INDEX (2 symbols across 1 files)
FILE: script.js
function searchTweets (line 1) | function searchTweets() { // Query the loklak.org API
function updateResults (line 17) | function updateResults(input) { // Function called to interpret the resu...
Condensed preview — 3 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (7K chars).
[
{
"path": "README.md",
"chars": 1064,
"preview": "# loklak Movie Tweets\n\nThis form uses the [loklak public API](http://loklak.org/) to search the last 100 most recent twe"
},
{
"path": "index.html",
"chars": 3402,
"preview": "<!DOCTYPE html>\n<html>\n<head>\n <meta charset=\"utf-8\">\n <!-- Bootstrap CSS -->\n <link rel=\"stylesheet\" href=\"https://m"
},
{
"path": "script.js",
"chars": 2144,
"preview": "function searchTweets() { // Query the loklak.org API\n var film = document.getElementById('film').value;\n\n var url = '"
}
]
About this extraction
This page contains the full source code of the fossasia/loklak_movietweets GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 3 files (6.5 KB), approximately 2.3k tokens, and a symbol index with 2 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.