CV Updater for HH.ru is a small web application written in Perl and Mojolicious.
Just Perl. At least version 5.14.2
- Clone this repo anywhere where you want
cd hhru-cvupdater-perl
- Run install script as root:
sudo install/setup.sh
- Edit lib/CVUpdater.pm file: change application secret to any random string you want. You may also change default port application will listen on.
$self->config(hypnotoad => {listen => ['http://*:8883'], heartbeat_timeout => 60});
$self->secrets(['8e3dc0d726a2d837c2a11f7752dcc78350318b735b30ef7cc8fdd5eb7676f538']);
- Go to https://dev.hh.ru and register your application
- Edit c_v_updater.conf file with your Client ID and Client Secret. You also may want to change default UserAgent (
UA
section). Redirect URI for your application must be like this:http(s)://domain.tld/hhcb
- First, you have to create new sqlite database for application. App can do it for you:
cd script && ./cvupdater deploy
- To start/stop application you can use ctl script to control hypnotoad - a built-in web server:
insane@dev ~/hhru-cvupdater-perl/script $ ./ctl
Usage: ctl.sh {start|stop|restart|status}
To update all CVs known to applicaiton, you can add a new cron job, like this:
3 0,12 * * * /home/insane/www/hhru-cvupdater-perl/script/cvupdater update