Skip to content

Commit

Permalink
Minor changes for presentation
Browse files Browse the repository at this point in the history
  • Loading branch information
vladim0105 committed Nov 6, 2019
1 parent 553fd24 commit 9a79da9
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 14 deletions.
20 changes: 19 additions & 1 deletion mainpage.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,24 @@
<img src="res/icon_big.png" />
<!--https://image.flaticon.com/icons/svg/124/124021.svg-->
<h1>Twitter Analyzer</h1>
<!--
<p class="info">
Natural Language Processing is a powerful tool and is used by
companies to conduct large market research. Twitter Analyzer lets you,
the user, do the exact same thing as companies on your own computer.
For free. Before you get started, here are a few things to know:
</p></br>
<p class = "info">
Natural Language Processing takes in text and spits out a sentiment. A
sentiment consist of two parts: a score and a magnitude. Sentiment
score represents a persons positivity and is in the range of [-1.0,
1.0], where a negative score means negativity whilst a positive score
means positivity. Sentiment magnitude represent the emotionality of a
person, how strongly they feel about something. Magnitude is
represented as a positive number, with no upper limit.
</p>
-->

<div class="handle_input_field">
<input
type="text"
Expand All @@ -60,7 +78,7 @@ <h2>
<li><span>D</span>onghui Sun</li>
<li><span>V</span>ladimir Monakhov</li>
</ul>
Made using NodeJS, ChartJS, JQuery and Google NLP API
Made using NodeJS, ChartJS, and JQuery
</h2>
</div>
</div>
Expand Down
15 changes: 12 additions & 3 deletions mainstyle.css
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,16 @@ li {
margin: 0 auto;
}

#GroupName{
#GroupName {
padding-left: 15px;
padding-top: 50px
}
padding-top: 50px;
}
.info {
width: 40%;
color: black;
font-weight: 800;
font-size: 125%;

background-color: rgba(100, 100, 100, 0.7);
border-radius: 5%;
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "twitter-analyzer",
"version": "1.0.0",
"version": "1.0.1",
"description": "Analyzes Twitter Accounts",
"icon": "res/icon.ico",
"main": "./dist/main.js",
Expand Down
1 change: 1 addition & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ function createWindow() {
// and load the index.html of the app.
mainWindow.loadFile(path.join(__dirname, "../mainpage.html"));
console.log(isDev);
mainWindow.setMenu(null);
if (!isDev) {
mainWindow.setMenu(null);
mainWindow.webContents.closeDevTools();
Expand Down
18 changes: 9 additions & 9 deletions src/twitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,41 +26,41 @@ export type TwitterUser = {

export type HashtagObject = {
text: string;
}
};
export type URLObject = {
display_url: string; //url as displayed
expanded_url: string; //expanded into browser
}
};
export type MentionObject = {
id: number; //id of mentioned user
name: string; //Display name of mentioned
screen_name: string; //Unique handle of mentioned
}
};
export type Place = {
id: number;
id: number;
place_type: string; //"city"
name: string; //human-readable
full_name: string; //Manhattan, NY
country_code: string; //US
country: string; //United States
}
};

//TODO: Fix experimental export:
export type TweetEntities = {
hashtags: HashtagObject[]; // #hashtag
media: any[]; // Note: Nonexistent if no embedded media
urls: URLObject[];
user_mentions: MentionObject[];
user_mentions: MentionObject[];
symbols: any[]; // ???
}
};

export type TweetData = {
user: TwitterUser;
/** Contents of the tweet */
text: string;
created_at: string;
favorite_count: number;
retweet_count: number;
retweet_count: number;
coordinates: Coordinates; //?null
entities: TweetEntities;
retweeted_status: any; //Exists only if this post is a retweet
Expand Down Expand Up @@ -119,7 +119,7 @@ export class TwitterAPI {
method: "GET",
qs: {
screen_name: username,
count: isDev ? 50 : 200 //Max amount of tweets we can request.
count: 150 //Max amount of tweets we can request.
},
headers: {
Authorization: "Bearer " + authToken
Expand Down

0 comments on commit 9a79da9

Please sign in to comment.