Ejemplo n.º 1
0
#!/usr/bin/env python3
import satellipy.utils.cli as cli
import satellipy.configuration.spotify as SpotifyConf
import satellipy.configuration.mongo as MongoConf
import satellipy.spotify.audio as Audio

if __name__ == '__main__':

    username = cli.parse_username_from_args()
    sp = SpotifyConf.get_client(SpotifyConf.parse_env())
    mongo = MongoConf.get_client(MongoConf.parse_env())
    songs_collection = mongo['collections']['songs']
    audio_features_collection = mongo['collections']['audio_features']

    Audio.fetch_audio_features(sp, username, songs_collection,
                               audio_features_collection)
Ejemplo n.º 2
0
#!/usr/bin/env python3
import satellipy.utils.cli as CliUtils
import satellipy.configuration.mongo as MongoConf
import satellipy.emotions.musics as Emotions

if __name__ == '__main__':
    username = CliUtils.parse_username_from_args()
    mongo_client = MongoConf.get_client(MongoConf.parse_env())
    songs_collection = mongo_client['collections']['songs']
    emotions_collection = mongo_client['collections']['emotions']
    lyrics_collection = mongo_client['collections']['lyrics']

    Emotions.fetch_emotions_for_user(username, songs_collection,
                                     lyrics_collection, emotions_collection)