Beispiel #1
0
#
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
#  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#  License for the specific language governing permissions and limitations
#  under the License.
###########################################################################
from task_dedupe_jobs import TaskDedupeJobPosting
from helpers import docopt_ext, COMMON_OPTIONS
from util_log import logmsg

cli_usage = """
Usage:
  cmd_mark_duplicates.py (-c <dbstring> | --dsn <dbstring> | --host <hostname> --port <portid> --database <dbstring> --user <userstring> --password <userpass>)
  cmd_mark_duplicates.py --version
  
Options:
  -o <file>, --output <file>    output JSON file with ID pairs of duplicate listings 
  -i <file>, --input <file>     input JSON data file with job postings
""" + COMMON_OPTIONS

if __name__ == '__main__':
    arguments = docopt_ext(cli_usage, version='0.1.1rc', filename=__file__)

    try:
        matcher = TaskDedupeJobPosting(**arguments)
        matcher.dedupe_jobs()
    except Exception as ex:
        logmsg(f'Unable to deduplicate job postings: {ex}')
        raise ex
Beispiel #2
0
#  License for the specific language governing permissions and limitations
#  under the License.
###########################################################################
from helpers import docopt_ext, COMMON_OPTIONS
from task_generate_broken_plugins_data import TaskGenerateBrokenPluginReportData

from util_log import logmsg
cli_usage = """
Usage:
  {} (-c <dbstring> | --dsn <dbstring> | --host <hostname> --port <portid> --database <dbstring> --user <userstring> --password <userpass>) -o <outputfile>
  {} --version

Options:
  -o <file>, --output <file> output file with job match results 
""" + COMMON_OPTIONS

if __name__ == '__main__':

    args = docopt_ext(cli_usage.format(__file__, __file__),
                      version='0.1.1rc',
                      filename=__file__)

    try:
        if "output" in args and args["output"]:
            reporter = TaskGenerateBrokenPluginReportData(**args)
        else:
            raise Exception("Missing output parameter.")
    except Exception as ex:
        logmsg(f'Unable to generate broken plugin report data:  {ex}')
        raise ex