summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md18
-rw-r--r--spec/flowchart.gv24
-rw-r--r--spec/flowchart.pngbin0 -> 134627 bytes
-rwxr-xr-xsrc/indeedwatcherbin0 -> 797072 bytes
-rw-r--r--src/indeedwatcher.nim22
5 files changed, 64 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..7dbbbb7
--- /dev/null
+++ b/README.md
@@ -0,0 +1,18 @@
+
+
+
+reads configutation from a toml file
+intakes a link to an indeed page
+parses page, looks for info like offered pay, job description, vax status, etc to make a score
+if the job doesn't meet the configured minimum score, the job is discarded
+if it's not, it should return the article in the following format so the user can put it in whatever folder desired
+
+https://URL.example
+Example Job Title
+
+Pay - Company - Part-time/contract/salary
+
+Description:
+
+Requirements:
+
diff --git a/spec/flowchart.gv b/spec/flowchart.gv
new file mode 100644
index 0000000..17fe46e
--- /dev/null
+++ b/spec/flowchart.gv
@@ -0,0 +1,24 @@
+digraph G {
+"Indeed.com" [shape=diamond]
+
+config -> "feednim formatter" [label="Read Queries"]
+"feednim formatter" -> "feednim" [label="RSS URLs"]
+"feednim" -> "Indeed.com" [label="HTML request"]
+"Indeed.com" -> "feednim" [label="RSS job listings"]
+"feednim" -> "webdriver" [label="full job posting's URL"]
+"webdriver" -> "Indeed.com" [label="HTML request"]
+"Indeed.com" -> "webdriver" [label="HTML of jobpage"]
+"webdriver" -> "HTML parser" [label="raw HTML page data"]
+"HTML parser" -> "Job Value Scorer" [label="Raw job description data"]
+
+
+config -> "Job Value Scorer" [label="Priorities"]
+config -> "Cache System" [label="Cache location"]
+"Job Value Scorer" -> "Cache System" [label="URL of currently parsing job post"]
+"Cache System" -> "Job Value Scorer" [label="True or False to if URL is in database"]
+"Job Value Scorer" -> "nimPDF" [label="Formatted job data"]
+"nimPDF" -> "Saver" [label="PDF file"]
+config -> "Saver" [label="save location"]
+"Saver" -> "Filesystem" [label="PDF file"]
+
+}
diff --git a/spec/flowchart.png b/spec/flowchart.png
new file mode 100644
index 0000000..8c6bc0d
--- /dev/null
+++ b/spec/flowchart.png
Binary files differ
diff --git a/src/indeedwatcher b/src/indeedwatcher
new file mode 100755
index 0000000..6c19c76
--- /dev/null
+++ b/src/indeedwatcher
Binary files differ
diff --git a/src/indeedwatcher.nim b/src/indeedwatcher.nim
new file mode 100644
index 0000000..0c7e8a4
--- /dev/null
+++ b/src/indeedwatcher.nim
@@ -0,0 +1,22 @@
+import rss
+import webdriver
+import osproc
+import threadpool
+import options
+
+var test = getRSS("https://rss.indeed.com/rss?q=Linux&l=Arkansas&explvl=mid_level")
+echo test.items[0].link
+
+#TODO put location of chromedriver into config
+let chromedriver = startProcess("/usr/bin/chromedriver")
+let driver = newWebDriver("http://localhost:9515")
+let session = driver.createSession()
+
+session.navigate(test.items[0].link)
+echo session.findElement(".jobsearch-DesktopStickyContainer").get().getText()
+echo session.findElement(".jobsearch-JobDescriptionSection-sectionItem").get().getText()
+echo session.findElement("#salaryGuide").get().getText()
+echo session.findElement("#jobDescriptionText").get().getText()
+echo session.findElement("#jobDescriptionText").get().getText()
+terminate(chromedriver)
+