Skip to content

Instantly share code, notes, and snippets.

@reliq
Last active January 26, 2019 16:44
Show Gist options
  • Save reliq/dd688149ef165c34f6543328e6e862ef to your computer and use it in GitHub Desktop.
Save reliq/dd688149ef165c34f6543328e6e862ef to your computer and use it in GitHub Desktop.
<?php
return [
// debug mode?
'debug' => false,
// whther log file should be written
'log' => true,
// How much detail is expected in output, 1 being the lowest, 3 being highest.
'verbosity' => 3,
// Set the database config
'database' => [
// Scraps table
'scraps_table' => env('SCAVENGER_SCRAPS_TABLE', 'scavenger_scraps'),
],
// Daemon config - used to build daemon user
'daemon' => [
// Model to use for Daemon identification and login
'model' => 'App\\User',
// Model property to check for daemon ID
'id_prop' => 'email',
// Daemon ID
'id' => 'daemon@scavenger.reliqarts.com',
// Any additional information required to create a user:
// NB. this is only used when creating a daemon user, there is no "safe" way
// to change the daemon's password once he has been created.
'info' => [
'name' => 'Scavenger Daemon',
'password' => 'pass'
]
],
// Hashing algorithm to use
'hash_algorithm' => 'sha512',
// storage
'storage' => [
// This directory will live inside your application's log directory.
'log_dir' => env('SCAVENGER_LOG_DIR', 'scavenger'),
],
// different model entities and mapping information
'targets' => [
'apartments' => [
'example' => false,
'model' => 'App\\Item',
'source' => 'https://www.khmer24.com/en/homes/apartment-for-sale.html',
'search' => null,
'pager' => [
'selector' => '.pagination a[rel="next"]',
'text' => 'Next',
],
'markup' => [
'title' => '.item-detail .item-title',
'__wrapper' => 'li.item article',
],
'pages' => 5,
],
],
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment