Skip to content

Commit

Permalink
Merge pull request #29 from NathanWorkman/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
NathanWorkman authored Mar 25, 2019
2 parents 64d2a79 + 80dc97f commit 3490f97
Show file tree
Hide file tree
Showing 460 changed files with 8,341 additions and 6,047 deletions.
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,15 @@ __pycache__
/node_modules

# project dist static files
seeker/static
seeker/media
/static/
/media/

# project secrets
.env

# due to ansible logs
*.log
*.retry

# local db backups
backups/
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
seeker
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ install:
- pip install -r requirements.txt

script:
- tox
# - tox
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"python.pythonPath": "/Users/nathan/.pyenv/versions/seeker/bin/python"
}
75 changes: 22 additions & 53 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@ PROJECT_NAME = seeker
SHELL := /bin/sh
help:
@echo "Please use 'make <target>' where <target> is one of"
@echo "virtualenv Create virtual enviroment"
@echo "requirements Install requirements.txt"
@echo "migrate Run Django migrations"
@echo "user Create user account"
@echo "test Run tests"
@echo "clean Remove all *.pyc, .DS_Store and temp files from the project"
@echo "shell Open Django shell"
@echo "migrations Create database migrations"
@echo "collectstatic Collect static assets"
@echo "run Run Django Server"
@echo "crawl <spidername> Run Scrapy Spider"
@echo " reset Complete reset of database and migrations (Be Careful)"
@echo " migrate Run Django migrations"
@echo " migrations Create Django migrations"
@echo " user Create user account"
@echo " clean Remove all *.pyc, .DS_Store and temp files from the project"
@echo " collectstatic Collect static assets"
@echo " run Run Django Server"
@echo " crawl_spider <spidername> Run Scrapy Spider"
@echo " crawl Run ALL Scrapy Spiders"
@echo " dump Create database dump/backup"

.PHONY: requirements

Expand All @@ -22,51 +21,34 @@ MANAGE_CMD = python manage.py
PIP_INSTALL_CMD = pip install
PLAYBOOK = ansible-playbook
VIRTUALENV_NAME = venv

APP_NAME = seeker
# Helper functions to display messagse
ECHO_BLUE = @echo "\033[33;34m $1\033[0m"
ECHO_RED = @echo "\033[33;31m $1\033[0m"
ECHO_GREEN = @echo "\033[33;32m $1\033[0m"

DATE= `date +'%m_%d_%y'`
# The default server host local development
HOST ?= localhost:8000

reset: delete_sqlite migrate user run
setup: virtualenv requirements migrate user yarn build collectstatic

virtualenv:
# Create virtualenv
$(call ECHO_GREEN, Creating virtualenv... )
virtualenv -p python3 $(VIRTUALENV_NAME)

requirements:
# Install project requirements
$(call ECHO_GREEN, Installing requirements... )
( \
source venv/bin/activate;\
$(PIP_INSTALL_CMD) -r requirements.txt; \
)
reset: dropdb createdb migrations migrate user run

migrate:
# Run django migrations
$(call ECHO_GREEN, Running migrations... )
( \
cd seeker; \
$(MANAGE_CMD) migrate; \
)

user:
# Create user account
$(call ECHO_GREEN, Creating super user... )
( \
cd seeker; \
echo "from django.contrib.auth.models import User; User.objects.create_superuser('admin', 'admin@email.com', 'pass')" | ./manage.py shell; \
)

test:
# Run the test cases
( \
cd seeker; \
$(MANAGE_CMD) test; \
)

Expand All @@ -84,68 +66,55 @@ clean:
shell:
# Run a local shell for debugging
( \
cd seeker; \
$(MANAGE_CMD) shell; \
$(MANAGE_CMD) shell_plus; \
)

migrations:
# Create database migrations
( \
cd seeker; \
$(MANAGE_CMD) makemigrations; \
)

collectstatic:
# Collect static assets
$(call ECHO_GREEN, Collecting static assets...)
( \
cd seeker; \
$(MANAGE_CMD) collectstatic; \
)

run:
# run django server
$(call ECHO_GREEN, Starting Django Server...)
( \
cd seeker; \
gulp; \
$(MANAGE_CMD) runserver 0.0.0.0:8300 ; \
)


crawl:
# Run ALL scrapy spiders
$(call ECHO_GREEN, Running spiders... )
(\
cd seeker; \
python crawl.py; \
python seeker/crawl.py; \
)

crawl_spider:
# Run scrapy spider
$(call ECHO_GREEN, Running $(spider) spider... )
(\
cd seeker; \
scrapy crawl $(spider); \
)

delete_sqlite:
# delete project db
createdb:
( \
cd seeker; \
rm -rf db.sqlite3;\
createdb -p 5433 $(APP_NAME); \
)

yarn:
# install npm modules
$(call ECHO_GREEN, Installing npm modules... )
dropdb:
( \
yarn; \
dropdb -p 5433 $(APP_NAME);\
)

build:
# build static assets
$(call ECHO_GREEN, Compiling static assets... )
dump:
( \
cd seeker; \
gulp build; \
pg_dump -Fc seeker -p 5433 > backups/data_dump_$(DATE).dump; \
)
56 changes: 44 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# :sunglasses: Seeker [WIP]
<div style="text-align:center;">
<img src="snitch.png" width="150" height="150"/>
<h1>Seeker</h1>
</div>

[![Build Status](https://travis-ci.org/NathanWorkman/seeker.svg?branch=master)](https://travis-ci.org/NathanWorkman/seeker)

## What is Seeker?
Seeker is just another job board aggregator. Let Seeker do the leg work for you. Check multiple job boards for positions you might be interested in and organize them all in one convenient location.

Currently, the search terms are hard coded to remote django and remote python positions - you'll need to manually update these for now.

To change the search terms edit the query inside each spider.
Seeker is just another job board aggregator. Check multiple job boards for positions you might be interested in and organize them all in one convenient location.

## Setup

Expand Down Expand Up @@ -71,9 +70,42 @@ python crawl.py

Navigate to the django admin to view your results.


**This project is for educational purposes only, I'm not responsible for what you do with the code.**




## TODO

### Boards
- [x] DjangoGigs
- [ ] Indeed
- [ ] PythonOrg
- [ ] RemotePython
- [ ] Stack Overflow
- [ ] Workable
- [ ] Lever
- [ ] Recruiter Box
- [ ] Greenhouse
- [ ] TBD
- [ ] https://hireremote.io
- [ ] https://weworkremotely.com
- [ ] https://remoteok.io/
- [ ] https://jobspresso.co/
- [ ] https://remotive.io/find-a-remote-job/#s=1
- [ ] https://www.workingnomads.co/jobs
- [ ] https://www.mikesremotelist.com/
- [ ] https://stackoverflow.com/jobs
- [ ] https://bestremotejob.com/
- [ ] https://justremote.co/
- [ ] https://whoishiring.io/
- [ ] https://www.techjobsforgood.com/?search=remote
- [ ] https://rmtwrk.com/
- [ ] https://remotepath.io/
- [ ] https://www.hiringremote.ly/
- [ ] https://www.honestlance.com/



## Made Possible By
- [Django](https://www.djangoproject.com/)
- [Scrapy](https://scrapy.org/)
- [jQuery](https://jquery.com/)
- Icons - [Devicon](http://konpa.github.io/devicon/)
- Admin Theme - [Django Suit](https://github.com/darklow/django-suit)
- NLP - [SpaCy](https://spacy.io/)
17 changes: 4 additions & 13 deletions docker/web/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,15 @@
FROM python:3.7
FROM python:3.6
MAINTAINER Nathan Workman <nathancworkman@gmail.com>

ENV PYTHONUNBUFFERED 1

RUN mkdir /code
WORKDIR /code

RUN apt-get update && apt-get install -y curl && apt-get -y install sudo
RUN curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
RUN echo "deb http://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list

RUN apt-get update && apt-get install -y nodejs yarn
RUN sudo npm install -g gulp

COPY ./package.json /code/package.json
RUN apt-get update && apt-get -y upgrade && apt-get install -y sudo
ADD requirements.in /code/

RUN pip install pip==18.1.0
RUN pip install pip==9.0.3
RUN pip install -r requirements.in
RUN yarn

ADD . /code/
ADD . /code/
3 changes: 1 addition & 2 deletions docker/web/web-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash

cd seeker
gulp build
python manage.py migrate
python manage.py collectstatic --no-input
gulp
python manage.py runserver
File renamed without changes.
33 changes: 0 additions & 33 deletions package.json

This file was deleted.

Loading

0 comments on commit 3490f97

Please sign in to comment.