Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(2)  |  Derive(0)  |  Import(1)

        def is_dry_run():
    return "-n" in sys.argv
        


src/a/r/ardj-1.2.1/src/ardj/tracks.py   ardj(Download)
import ardj.util
 
from ardj import is_dry_run, is_verbose
from ardj.database import Track as Track2
from ardj.users import resolve_alias
                artist_names.append(track['artist'])
            filename = ardj.util.fetch(str(track['url']), suffix=track.get('suffix'))
            if not is_dry_run():
                add_file(str(filename), add_labels=track.get('tags', ['tagme', 'music']),
                    artist=track["artist"], title=track["title"], dlink=track['url'])
    if added:
        logging.info('Total catch: %u tracks.' % added)
        if not is_dry_run():
            ardj.jabber.chat_say('Downloaded %u new tracks by %s.' % (added, ardj.util.shortlist(sorted(artist_names))))