Large diffs are not rendered by default.

@@ -1,20 +1,32 @@
5E5A8CAA958F43E283A7322B931D8621
12FA9A7604244D8A98AAE85BCFC6EC1A
3F79813F966346A189A4E1BA44205201
E28A78FFCD74403DBB3A05209C1D0ECA
B02F6EC7CF854ECF9C499B238D999CCE
F45D2337B63A4A969DDDEBB869D6020F
173D890A6F0042D09AE76768711C3C0D
5B6C6F2B8A154FC2BD88046F77634FBC
7780CC64783B4002B8DC353FA54FAA53
A19CCC79247A40E6A631AA13A962AC70
9954D279CB8E4A09BC44A1AFD366E63B
397C3EC5E4E74B9DA51A71EB9971CAA6
DE255512DD6B4F038CD2D87088346CC0
9A13FF3E17D440388A53D15623B86565
B43AFA4AAFB44D278A6841F8CF7CCA06
0240245BE7A546779730B530C18D7A6C
373299C10990405586BBD665C9126E82
5EBE96B7D7664C59A70B6875E9AA28DC
7E4E14EF18E244F9BBA0E087C0225CEF
64BD5654A2FD4231BCEFBA505AA7E37A
F6ADE959441641E9A74C7F6B48DE1EC2
B878B30A559C4384A2D80527EEA38035
2F413B3DEBDB4C5BA09D8F02E6EF8782
570B7B0F1565442B9220B1048E2E9D67
6541582FCC6540BD8BBE38D6BC9E23A7
B878B30A559C4384A2D80527EEA38035
6D90ADC36F7D4E0C87FAFB8212EA0112
7CB73CA537854347A445D8B1FA0181C7
D5EEB9CCB5E845158B37D90FE96FDD7D
18036A8E0CC64685800641514C7ED1C4
11C5F7E114DD4D7BB25E0A6EA6E36DB6
40B86142AA374EFDA5F8D73D81BDDA85
D18822921EBE4E1E8C768885432650FD
083F8C3D08BD4C3D8C3CCC7D9C48246F
CBF804781E354255B489CB7D7C87F137
B5CC7139AF7E4CA3AE1BF6388719CB01
BADC6B0239924C7AA9BE3B1CF18E665B
367DBFE4C448450EAFB08FD02335E9CB
74FEC065CDBD41E884E953AEA945AA17
@@ -23,28 +35,17 @@ FFE989C340464A40AAD365946431CE71
F6C5671503344CCD96708F084E44E146
D3C0002D67704B629C58AB50B0552054
B717051A3891470D8FEF3BAFF82E8E23
D4BB4DFA11E84B2D82B9AEE52815DA73
13F0AF6F57AF4E78B91FEFE2D663A31D
F61F7F8281BE43AB960FF1D439DC67FB
43D463E57F974D489F4EE359102B9CC4
69FAAAFD038F4F428AF65231C28006C2
1BB74B8CD35D4241B93C76BD7405BF7C
384224BF16394023BE59A74F4A0CD7A5
11F97D89EA9C42C287627E797BCF9D0F
39AD3CB9CC0E4269B7EF8B846A1BB894
AA78D4461A9049078218A5E41F290D30
A1ACC529662445909A0E1F3F22C8FDF2
67DBAEFAB28443428E2AB3478DFC34D2
C379B893A6294843BBA2314021FCDC42
E2FE9FE1699E4214B6FE3F5F2B12FBB3
7FAD353D634B4E51B17B6A59AD200D9A
2F2E96EFB492454C9DF44E5F3A076984
C71CBF38657641F193ED42123C26BE4E
3EEF5FB1F0DF471EA73CB81C77F16C4D
55C39B68ADFF4538A95E5838057FD080
B632D3D5E6E94708AA7F60A510B72B2D
8907E228F26D4297B87698FD42E9E48B
E68A2833D5C94A8EBB0034F2147E8EF6
F6EDE129DAB24B4088CEE0D9AD3C310D
32B16D21093F4987AAD5A2151636A510
E4AB753208594421AB4737D03B474A70
@@ -56,16 +57,14 @@ BDCF10B90362400C85305D6E71A97937
F56D0FA64E2F4892B30A9C0722396716
3DA91C8D75FF4859839125E6CC5CAE71
72AB23BCF2D44D08852AFF72C1C77E1E
6CF9BC0CB18F4D919AB38B57D2E9BABA
60F48AA0040B4588BA67593801B28885
9B80A20B3188433399B827F6F8004002
8880738B0B9E46409994AE65D5D5929A
359F6B22A00F4D6ABDB7CAA63ABE1BC9
AEF45B3CB3BA4FCAA6364AFF9026D677
4FD6120E2ABF4104846A22C6D971F011
AB148470795E430892E089C90CE3597E
15CD934763704ACD9FA63D9E63E044B4
33282141C85A4CBB816DCEF04E87C134
23D9F5031E32450EB70A05D9D7C1B345
945EC67929B94B62840BC6EDDF83AF68
B046B377AA0C447DAB93FDCE9A64A236
A03F086C7B194C89ABBE76CD0ED33193
@@ -0,0 +1,34 @@
[
{
"country_short": "USA",
"city": "Washington",
"description": "We are looking n a typical banking day you will enjoy a high level of customer contact. The primary focus of this role includes:\n \n•Directly impacting the growth and retention of deposit and loan customers. Leading the branch in fostering a proactive approach to building customer relationships while always maintaining the highest level of professionalism, integrity and ethics.\n \n•Providing quality customer service and placing an emphasis on increasing the proactive sales and service efforts of team members through individual coaching sessions and team meetings. It is important that the Assistant Branch Manager create an enthusiastic, energetic and positive work environment for the team to flourish.\n \n•Upholding the operational integrity of the branch by assisting the team in all areas of branch operations and demonstrating sound decision making skills as it relates to risk, profitability and customer service.\n \n\n \nQualifications: The successful candidate will have the following qualifications:\n \n• Bachelor degree required. Will consider commensurate experience.\n \n• Retail banking experience preferred.\n \n• Managerial or leadership experience is required.\n \n• A minimum of one to three years customer service experience including demonstrated ability to achieve sales goals and deliver outstanding customer service is required.\n \n• Must be able to travel to branches with varied evening and weekend hours.\n \n• Must have excellent written and verbal communication skills to include professional grammar and demeanor.\n \n• Ability to work a flexible schedule including evenings and Saturdays.\n \n• A valid Driver's license and access to a reliable vehicle is required. Ability to travel as needed to training.\n \n• Successful candidate must meet and comply with all requirements set forth in the SAFE Act, including, but not limited to successful completion of the required background checks, and obtaining a unique identifier by the NMLS.\n \n**Address:** 250 Oak Spring Center\n \n**Employment Status:** Full-time\n \n**FLSA:** Exempt\n \n**Schedule Information:** This branch is open Monday through Thursday 9:00 a.m. to 5:00 p.m., Friday 9:00 a.m. to 7:00 p.m. and Saturday 9:00 a.m. to 2 p.m.\n \n**Benefits Information:** Full-time employees are eligible for a comprehensive benefits package including medical, dental, vision, 401(k) with immediate vesting, tuition reimbursement, and gym membership reimbursement.\n \nPart-time employees qualify for 401(k) with immediate vesting, tuition reimbursement, and gym reimbursement.\n \n\n \nFor more information, please visit http://www.dollar.bank/company/careers/benefits .\n \n**EEO Statement:** Dollar Bank is an Equal Opportunity Employer.\n \n\n \nMinority/Female/Veteran/Disabled",
"date_new": "2018-06-29 04:06:00",
"url": "http://dollarbankcareers.jobs/570B7B0F1565442B9220B1048E2E9D6724",
"country": "United States",
"company": "Dollar Bank FSB",
"title": "Assistant Branch Manager",
"reqid": "2316BR",
"state": "Pennsylvania",
"state_short": "PA",
"location": "Washington, PA",
"guid": "570B7B0F1565442B9220B1048E2E9D67",
"uid": null
},
{
"country_short": "USA",
"city": "Pittsburgh",
"description": "TESTESTTEST",
"date_new": "2018-06-29 04:06:00",
"url": "http://dollarbankcareers.jobs/ZZZZZZZZZZZZZZZZZZ",
"country": "United States",
"company": "Dollar Bank FSB",
"title": "Master Programmer",
"reqid": "2316BR",
"state": "Pennsylvania",
"state_short": "PA",
"location": "Washington, PA",
"guid": "123ZXY",
"uid": null
}
]
@@ -52,7 +52,7 @@ public static JSONArray readJsonFromUrl(String url) throws IOException, ParseExc

public static JSONArray readJsonFromLocal(String path) throws IOException, ParseException{

File initJSON = new File("ntrack/testInput.json");
File initJSON = new File("./res/test-input.json");
InputStream is = new FileInputStream(initJSON);
try {
BufferedReader rd = new BufferedReader(new InputStreamReader(is, Charset.forName("UTF-8")));
@@ -67,7 +67,9 @@ public static JSONArray readJsonFromLocal(String path) throws IOException, Parse

public static void main(String[] args) {

Config cfg = new Config();
System.out.println("TEST RUNS PROD ???");

// Config cfg = new Config();
BufferedReader reader1 = null;

int prevFileNum = 0;
@@ -91,12 +93,16 @@ public static void main(String[] args) {
String runMode = p.getProperty("runMode");

JSONArray json = null;

System.out.println("++++++++" + p.getProperty("testFileP"));

switch (runMode) {
case "Offline": json = readJsonFromLocal(p.getProperty("testFileP"));
case "Offline":

json = readJsonFromLocal(p.getProperty("testFileP"));
break;

case "Online": json = readJsonFromLocal(p.getProperty("inputURL"));
case "Online": json = readJsonFromUrl(p.getProperty("inputURL"));
break;
}

@@ -129,23 +135,32 @@ public static void main(String[] args) {
System.out.println(fileNumber);

// Determine if this is first run
if (Integer.valueOf(fileNumber) == -1) {
if (Integer.valueOf(fileNumber) > -1) {
prevFileNum += Integer.parseInt(fileNumber);
currFileNum += prevFileNum + 1;
} else {
System.out.println("First run, using current as previous.");
firstRun = true;
prevFileNum = 0;
currFileNum = 0;
} else {
prevFileNum += Integer.parseInt(fileNumber);
currFileNum += prevFileNum + 1;
}

// *********************************************************************//
// //
// CREAT THE DBJOBS## CURRENT FILE //
// //
// *********************************************************************//

// Create current file
System.out.println ("firstRun=" + firstRun);
sb.append("./res/dbJobs.");
sb.append(String.format("%03d", currFileNum)).append(".json");

FileWriter f = new FileWriter(sb.toString());
f.write(json.toString());
f.close();
System.out.println ("curr file result" + sb.toString());


// Update counter
FileWriter cntWrite = new FileWriter(counterloc);
@@ -206,21 +221,22 @@ public static void main(String[] args) {
break;
case 1: jsonReader.loadIds(priIdList);
compList = priIdList;

break;
default: System.out.println("===========Error===========");
}

// for (String idNum : curIdList) {
// System.out.print(idNum + "\n");
// }
}

// Are the json job files the same?
// *********************************************************************//
// //
// ARE THE JSON FILES THE SAME ???? //
// //
// *********************************************************************//
if (compList.isEmpty()) {
System.out.println("comp is empty before check");
}
compList.removeAll(curIdList);
if (!firstRun) {
compList.removeAll(curIdList);
}
if (compList.isEmpty()) {
System.out.println("Same");
} else {
@@ -229,19 +245,39 @@ public static void main(String[] args) {
JsonNavigator jobReader = new JsonNavigator(jobFiles.get(0));
JsonNavigator jobReader1 = new JsonNavigator(jobFiles.get(1));

// *********************************************************************//
// //
// FILES ARE DIFFERENT, PRINT CONTENTS //
// //
// *********************************************************************//
System.out.println("CURRENT");
System.out.println(jobFiles.get(0));
System.out.println(jobReader.toString());
System.out.println("-------------------------------------------------");
System.out.println("PREVIOUS");
System.out.println(jobReader1.toString());
System.out.println(jobReader1.jFile.size());


// *********************************************************************//
// //
// READ FILE CONTAINING PAST JOB GUIDS //
// //
// *********************************************************************//
FileWriter fw = null;
File cp = null;
try {
fw = new FileWriter(new File(p.getProperty("pastFilePath")));
} catch (IOException e1) {
e1.printStackTrace();
}

// *********************************************************************//
// //
// FOR EACH GUID IN OUR COMPLIST (DIFFERENCE BETWEEN CURRENT //
// RUN FILE AND PREVIOUS RUN FILE) ADD THIS TO THE PAST JOBS FILE/LIST //
// //
// *********************************************************************//

for (String newGuid : compList) {
//TODO load a list of seen jobs here so we can use inspect instead of more for loops
@@ -261,17 +297,24 @@ public static void main(String[] args) {
} catch (IOException e) {
e.printStackTrace();
}

// *********************************************************************//
// //
// JOBREADER1 IS FULL OF JOB POSTS. NEED TO EXTRACT THE TECH JOBS //
// AND BUILD POSTS FOR THEM. //
// //
// *********************************************************************//

// Get info
boolean techJobMatch = false;

System.out.println("The size is " + jobReader1.jFile.size());
System.out.println("The size is " + jobReader.jFile.size());

for (int i = 0; i < jobReader1.jFile.size(); i++) {
for (int i = 0; i < jobReader.jFile.size(); i++) {

System.out.println(i + "-");

JSONObject jobObj = jobReader1.getObject(i);
JSONObject jobObj = jobReader.getObject(i);

if (techJobMatch) {
techJobMatch = false;
@@ -301,7 +344,10 @@ public static void main(String[] args) {
if (keywords.contains(s.toUpperCase())) {
System.out.println("word Match");
System.out.println(s);
System.out.println("JOB TITLE");
System.out.println(jobObj.get("title").toString());
System.out.println(jobObj.toString());

techJobMatch = true;

cpw.append("#\n");
@@ -311,19 +357,23 @@ public static void main(String[] args) {
cpw.append(jobObj.get("state").toString() + "\n");
cpw.append(jobObj.get("city").toString() + "\n");
cpw.close();
// *********************************************************************//
// //
// POST CREATION SHOULD BE MODULARIZED; GREETING/JOB/CLOSER //
// //
// *********************************************************************//
npw.append("#\n");
npw.append("Dollar Bank IT Employment Opportunity!!!\n");
npw.append(jobObj.get("title").toString() + "\n");
npw.append(jobObj.get("state").toString() + ", " +
jobObj.get("city").toString() + "\n");
npw.append(jobObj.get("url").toString() + "\n\n");
npw.append("This post was generated automatically by a db-flasher. The code is available in my github repository under the username tekksparrow.\n");
npw.close();

}
}

npw.append("#\n");
npw.append("Dollar Bank IT Employment Availability!!!\n");
npw.append(jobObj.get("title").toString() + "\n");
npw.append(jobObj.get("state").toString() + ", " +
jobObj.get("city").toString() + "\n");
npw.append(jobObj.get("url").toString() + "\n\n");
npw.append("This post was generated automatically by a db-flasher. The code is available on github. <link-github>");
npw.close();

} catch (IOException e) {
e.printStackTrace();
}
@@ -1,20 +1,36 @@
package dbf;

import java.net.HttpURLConnection;
import java.net.URL;
import java.net.MalformedURLException;
import java.io.IOException;
import java.io.*;

public class TryApi {
public class LinkedInApiReq {

String c =
String s =

public static void main(String[] args) {

try {

URL url = new URL("https://httpbin.org/get");
//LOGIN IN PAGE TEST VIEW DELETE FROM LAST RUN SO ITS FRESH FOR VIEWING ON CURRENT RUN
File htmlfile = new File("./authpage.html");
if (htmlfile.delete()) {
System.out.println("File deleted");
} else {
System.out.println("Failed to delete file.");
}

//URL url = new URL("https://api.linkedin.com/v1/people/~");
URL url = new URL("https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id=yeahrightasshole&redirect_uri=https://localhost");

HttpURLConnection con = (HttpURLConnection) url.openConnection();
con.setRequestMethod("GET");

con.setRequestProperty("Content-Type", "application/json");
con.setRequestProperty("x-li-format", "json");
String contentType = con.getHeaderField("Content-Type");

con.setConnectTimeout(5000);
@@ -25,15 +41,23 @@ public static void main(String[] args) {

BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));


File t1 = new File("./authpage.html");
FileWriter t11 = new FileWriter(t1, true);

String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
t11.append(inputLine);
}
in.close();
t11.close();

System.out.println(content);


con.disconnect();
}catch(MalformedURLException e) {