{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "9f0e1e4b-e36a-4dfe-adfd-6f99fb1d39f6", "metadata": {}, "outputs": [], "source": [ "import os\n", "from app import animate_images, AudioInput, SpotifyApi" ] }, { "cell_type": "code", "execution_count": 2, "id": "778fa4aa-cc12-4c33-a866-47ddcedcaf5f", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "WARNING:spodcast.podcast:Downloaded Hello Internet: Nine Ladies Dancing\n" ] } ], "source": [ "def test_spotify_downloads():\n", " url = \"https://open.spotify.com/episode/3Ev4jlIjT8IVih1Oxidhqf?si=54a95e8fb07640c5\"\n", " api = SpotifyApi(url=url)\n", " api.download_episode()\n", " api.download_image()\n", " api.get_title()\n", "\n", "test_spotify_downloads()" ] }, { "cell_type": "code", "execution_count": 4, "id": "237e3903", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from moviepy.editor import ImageClip\n", "\n", "ImageClip(img=\"/notebooks/stablepod/temp/1ae3a379.jpg\")" ] }, { "cell_type": "code", "execution_count": 1, "id": "de461d9b-bfbb-4d2d-b35e-fc3889494991", "metadata": {}, "outputs": [], "source": [ "def get_test_image_paths():\n", " gallery_dir = \"temp/images\"\n", " return [os.path.join(gallery_dir, img) for img in os.listdir(gallery_dir)][:2]\n", "\n", "get_test_image_paths()" ] }, { "cell_type": "code", "execution_count": 2, "id": "99df13fd-bd5d-4964-9300-016fcf7625e6", "metadata": {}, "outputs": [], "source": [ "def get_test_audio_paths():\n", " audio_path = \"temp/audio.mp3\"\n", " audio_input = AudioInput(audio_path, 10, 10)\n", " return audio_input\n", "\n", "get_test_audio_paths()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3.9.6 64-bit", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.13" }, "vscode": { "interpreter": { "hash": "31f2aee4e71d21fbe5cf8b01ff0e069b9275f58929596ceb00d14d90e3e16cd6" } } }, "nbformat": 4, "nbformat_minor": 5 }