From 9a79da9aa04225057df785102fa806a4f8ad0fab Mon Sep 17 00:00:00 2001 From: vladim0105 Date: Wed, 6 Nov 2019 09:53:31 +0800 Subject: [PATCH] Minor changes for presentation --- mainpage.html | 20 +++++++++++++++++++- mainstyle.css | 15 ++++++++++++--- package.json | 2 +- src/main.ts | 1 + src/twitter.ts | 18 +++++++++--------- 5 files changed, 42 insertions(+), 14 deletions(-) diff --git a/mainpage.html b/mainpage.html index 6e4f8c3..71ad2e5 100644 --- a/mainpage.html +++ b/mainpage.html @@ -34,6 +34,24 @@

Twitter Analyzer

+ +
  • Donghui Sun
  • Vladimir Monakhov
  • - Made using NodeJS, ChartJS, JQuery and Google NLP API + Made using NodeJS, ChartJS, and JQuery
    diff --git a/mainstyle.css b/mainstyle.css index c8792e8..ea0336f 100644 --- a/mainstyle.css +++ b/mainstyle.css @@ -263,7 +263,16 @@ li { margin: 0 auto; } -#GroupName{ +#GroupName { padding-left: 15px; - padding-top: 50px -} \ No newline at end of file + 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%; +} diff --git a/package.json b/package.json index 49359e1..c16c9f4 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/main.ts b/src/main.ts index 77a7b81..3c8f361 100644 --- a/src/main.ts +++ b/src/main.ts @@ -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(); diff --git a/src/twitter.ts b/src/twitter.ts index 5a35aba..e1b4e44 100644 --- a/src/twitter.ts +++ b/src/twitter.ts @@ -26,33 +26,33 @@ 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; @@ -60,7 +60,7 @@ export type TweetData = { 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 @@ -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