예제 #1
0
from os import getenv, path, environ
from pbr.version import VersionInfo
import platform

PROJECT_NAME = 'youcomment'
MANUAL_VERSION = '0.6.6'

try:
    info = VersionInfo(PROJECT_NAME)
except Exception:
    environ['PBR_VERSION'] = MANUAL_VERSION
    info = VersionInfo(PROJECT_NAME)

VERSION = info.version_string()
VERSION_VCS = info.version_string_with_vcs()
PLATFORM = platform.system()

# Modifiable Settings
REDDIT_AUTHOR_USERNAME = '******'
DEFAULT_SUBREDDITS = ["you_comment_bot"]
DEFAULT_BOT_RUN_INTERVAL_MINS = 3
SIMILARITY_LIMIT = 0.75
YOUTUBE_COMMENTS_PER_PAGE = 100
YOUTUBE_COMMENTS_MAX_NUM = 500
YOUTUBE_LIKE_THRESHOLD = 3
YOUTUBE_NUM_TOP_COMMENTS = 50
REDDIT_MAX_POSTS = 50
REDDIT_COMMENTS_MAX_NUM = 25
REDDIT_NUM_RETRIES = 3
REDDIT_REPLY_INTERVAL = 60 * 10  # Default is usually 9 minutes, but 10 just in case.
DEV_MODE = 'DEV'
예제 #2
0
파일: __init__.py 프로젝트: vangroan/dosage
# -*- coding: utf-8 -*-
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
# Copyright (C) 2012-2014 Bastian Kleineidam
# Copyright (C) 2015-2016 Tobias Gruetzmacher
"""
Automated comic downloader. Dosage traverses comic websites in
order to download each strip of the comic. The intended use is for
mirroring the strips locally for ease of viewing; redistribution of the
downloaded strips may violate copyright, and is not advisable unless you
have communicated with all of the relevant copyright holders, described
your intentions, and received permission to distribute.

The primary interface is the 'dosage' commandline script.
Comic modules for each comic are located in L{dosagelib.plugins}.
"""

from pbr.version import VersionInfo
import pkg_resources

AppName = u'dosage'
version_info = VersionInfo(AppName)
try:
        __version__ = version_info.version_string()  # PEP 396
        AppVersion = version_info.version_string_with_vcs()
except pkg_resources.DistributionNotFound:
        __version__ = "2.15.0"
        AppVersion = __version__ + "-unknown"