MCPcopy Create free account

hub / github.com/FujiwaraChoki/MoneyPrinter / functions

Functions117 in github.com/FujiwaraChoki/MoneyPrinter

↓ 34 callersFunctionlog
Drop-in replacement for ``print(colored(msg, color))``. Prints to the terminal **and** pushes an ANSI-stripped copy to the SSE queue.
Backend/logstream.py:90
↓ 24 callersFunctionemit
(message: str, level: str = "info")
Backend/pipeline.py:41
↓ 17 callersFunctioncreate_job
(session: Session, payload: dict, max_attempts: int = 1)
Backend/repository.py:15
↓ 16 callersFunctionsession_factory
(tmp_path: Path)
tests/conftest.py:22
↓ 15 callersFunctionget_job
(session: Session, job_id: str)
Backend/repository.py:51
↓ 14 callersFunctionshowToast
(message, type = "info")
Frontend/app.js:110
↓ 11 callersFunctionlist_job_events
( session: Session, job_id: str, after_id: int = 0, limit: int = 200 )
Backend/repository.py:55
↓ 10 callersFunctionappend_event
( session: Session, job_id: str, event_type: str, level: str, message: str, payload: O
Backend/repository.py:31
↓ 10 callersFunctionutcnow
()
Backend/repository.py:11
↓ 8 callersFunctionsetGeneratingState
(active)
Frontend/app.js:241
↓ 6 callersFunctionapiRequest
(path, options = {})
Frontend/app.js:30
↓ 6 callersFunctionguard_cancelled
()
Backend/pipeline.py:46
↓ 5 callersFunctionstopJobPolling
()
Frontend/app.js:233
↓ 4 callersFunction_disable_cleanup
(monkeypatch)
tests/test_worker.py:5
↓ 4 callersFunctiongenerate_response
Generate a script for a video, depending on the subject of the video. Args: video_subject (str): The subject of the video. a
Backend/gpt.py:67
↓ 4 callersFunctionrequest_cancel
(session: Session, job_id: str)
Backend/repository.py:72
↓ 3 callersFunctionclaim_next_queued_job
(session: Session)
Backend/repository.py:97
↓ 3 callersFunctionclean_dir
Removes every file in a directory. Args: path (str): Path to directory. Returns: None
Backend/utils.py:25
↓ 3 callersFunctionsetModelOptions
(models, preferredModel)
Frontend/app.js:52
↓ 2 callersFunction_ollama_client
()
Backend/gpt.py:20
↓ 2 callersFunctioncheck_env_vars
Checks if the necessary environment variables are set. Returns: None Raises: SystemExit: If any required environment va
Backend/utils.py:113
↓ 2 callersFunctionconvert_to_srt_time_format
(total_seconds: float)
Backend/video.py:94
↓ 2 callersFunctiondismissToast
(toast)
Frontend/app.js:131
↓ 2 callersFunctiongenerate_audio
(text: str, voice: str)
Backend/tiktokvoice.py:112
↓ 2 callersFunctionget_api_response
()
Backend/tiktokvoice.py:98
↓ 2 callersFunctionget_authenticated_service
This method retrieves the YouTube service. Returns: any: The authenticated YouTube service.
Backend/youtube.py:67
↓ 2 callersFunctionget_search_terms
Generate a JSON-Array of search terms for stock videos, depending on the subject of a video. Args: video_subject (str): The subj
Backend/gpt.py:237
↓ 2 callersFunctioninit_db
()
Backend/db.py:39
↓ 2 callersFunctioninitialize_upload
This method uploads a video to YouTube. Args: youtube (any): The authenticated YouTube service. options (dict): The options
Backend/youtube.py:93
↓ 2 callersFunctionlist_ollama_models
Returns available Ollama model names and configured default model. Returns: Tuple[List[str], str]: (available model names, default m
Backend/gpt.py:34
↓ 2 callersFunctionmark_cancelled
( session: Session, job_id: str, reason: str = "Job cancelled." )
Backend/repository.py:163
↓ 2 callersFunctionmark_completed
(session: Session, job_id: str, result_path: str)
Backend/repository.py:143
↓ 2 callersFunctionmark_failed
(session: Session, job_id: str, error_message: str)
Backend/repository.py:176
↓ 2 callersFunctionrequest
(baseUrl)
Frontend/app.js:33
↓ 2 callersFunctionupdateColorDot
()
Frontend/app.js:137
↓ 1 callersFunction__generate_subtitles_assemblyai
Generates subtitles from a given audio file and returns the path to the subtitles. Args: audio_path (str): The path to the audio fil
Backend/video.py:49
↓ 1 callersFunction__generate_subtitles_locally
Generates subtitles from a given audio file and returns the path to the subtitles. Args: sentences (List[str]): all the sentences sa
Backend/video.py:81
↓ 1 callersFunction_database_url
()
Backend/db.py:17
↓ 1 callersFunction_extract_model_name
(model_obj)
Backend/gpt.py:24
↓ 1 callersFunction_job_cancelled
(job_id: str)
Backend/worker.py:21
↓ 1 callersFunction_log_event
(job_id: str, message: str, level: str)
Backend/worker.py:29
↓ 1 callersFunctionappendLogEntry
(entry)
Frontend/app.js:157
↓ 1 callersFunctionchoose_random_song
Chooses a random MP3 from the Songs/ directory. Returns: str: The path to the chosen song, or None if no MP3 files found.
Backend/utils.py:53
↓ 1 callersFunctioncombine_videos
Combines a list of videos into one video and returns the path to the combined video. Args: video_paths (List): A list of paths to th
Backend/video.py:162
↓ 1 callersFunctionequalize_subtitles
(srt_path: str, max_chars: int = 10)
Backend/video.py:133
↓ 1 callersFunctionformatTimestamp
(ts)
Frontend/app.js:152
↓ 1 callersFunctiongenerateVideo
()
Frontend/app.js:296
↓ 1 callersFunctiongenerate_metadata
Generate metadata for a YouTube video, including the title, description, and keywords. Args: video_subject (str): The subject of the
Backend/gpt.py:315
↓ 1 callersFunctiongenerate_script
Generate a script for a video, depending on the subject of the video, the number of paragraphs, and the AI model. Args: video_sub
Backend/gpt.py:142
↓ 1 callersFunctiongenerate_subtitles
Generates subtitles from a given audio file and returns the path to the subtitles. Args: audio_path (str): The path to the audio fil
Backend/video.py:118
↓ 1 callersFunctiongenerate_video
This function creates the final video, with subtitles and audio. Args: combined_video_path (str): The path to the combined video.
Backend/video.py:268
↓ 1 callersFunctionloadOllamaModels
(reuseEnabled)
Frontend/app.js:69
↓ 1 callersFunctionmain
()
Backend/worker.py:65
↓ 1 callersFunctionpollJob
()
Frontend/app.js:177
↓ 1 callersFunctionprocess_next_job
()
Backend/worker.py:35
↓ 1 callersMethodpush
Add a log entry. Drops the oldest entry if the queue is full.
Backend/logstream.py:21
↓ 1 callersFunctionresolve_imagemagick_binary
Resolves an ImageMagick executable path across Linux, macOS, and Windows. Returns: Optional[str]: Absolute executable path if found.
Backend/utils.py:82
↓ 1 callersFunctionresumable_upload
This method implements an exponential backoff strategy to resume a failed upload. Args: insert_request (MediaFileUpload): The re
Backend/youtube.py:133
↓ 1 callersFunctionrun_generation_pipeline
( data: dict, is_cancelled, on_log, amount_of_stock_videos: int = 5, )
Backend/pipeline.py:35
↓ 1 callersFunctionsave_audio_file
(base64_data: str, filename: str = "output.mp3")
Backend/tiktokvoice.py:105
↓ 1 callersFunctionsave_video
Saves a video from a given URL and returns the path to the video. Args: video_url (str): The URL of the video to save. direc
Backend/video.py:28
↓ 1 callersFunctionsearch_for_stock_videos
Searches for stock videos based on a query. Args: query (str): The query to search for. api_key (str): The API key to use.
Backend/search.py:6
↓ 1 callersFunctionsplit_string
(string: str, chunk_size: int)
Backend/tiktokvoice.py:79
↓ 1 callersFunctionstartJobPolling
(jobId)
Frontend/app.js:224
↓ 1 callersFunctiontts
( text: str, voice: str = "none", filename: str = "output.mp3", play_sound: bool = False, )
Backend/tiktokvoice.py:121
↓ 1 callersFunctionuploadSongs
()
Frontend/app.js:271
↓ 1 callersFunctionupload_video
(video_path, title, description, category, keywords, privacy_status)
Backend/youtube.py:174
Method__init__
(self, maxsize: int = 500)
Backend/logstream.py:10
FunctioncancelGeneration
()
Frontend/app.js:257
Functioncancel_job
(job_id: str)
Backend/main.py:124
Functioncancel_latest_running_job
()
Backend/main.py:159
Methodclear
Drain all pending items from the queue.
Backend/logstream.py:13
Functionclient
(monkeypatch, session_factory)
tests/test_api_jobs.py:17
Functionclient
()
tests/test_api_misc.py:16
Functionfake_clean_dir
(path: str)
tests/test_api_misc.py:93
Functionfake_list_models
()
tests/test_api_misc.py:21
Functionfake_pipeline
(data, is_cancelled, on_log)
tests/test_worker.py:27
Functionfake_which
(candidate: str)
tests/test_utils.py:61
Functiongenerate
()
Backend/main.py:50
Functiongenerate_audio_thread
(text_part, index)
Backend/tiktokvoice.py:172
Functionget_events
(job_id: str)
Backend/main.py:94
Functionget_job_status
(job_id: str)
Backend/main.py:68
Functionmodels
()
Backend/main.py:27
Methodpush_event
Send a control event (complete, error, cancelled).
Backend/logstream.py:41
Functionsession
(session_factory)
tests/conftest.py:43
Methodstream
Generator yielding SSE-formatted lines. Terminates on control events.
Backend/logstream.py:60
Functiontest_cancel_job_endpoint_cancels_existing_job
(client, session_factory)
tests/test_api_jobs.py:74
Functiontest_cancel_job_endpoint_returns_404_for_unknown_job
(client)
tests/test_api_jobs.py:92
Functiontest_cancel_latest_running_job_cancels_active_job
(client, session_factory)
tests/test_api_jobs.py:110
Functiontest_cancel_latest_running_job_returns_404_when_no_active_job
(client)
tests/test_api_jobs.py:101
Functiontest_choose_random_song_returns_none_if_songs_dir_missing
( monkeypatch, tmp_path: Path )
tests/test_utils.py:19
Functiontest_choose_random_song_returns_selected_mp3
(monkeypatch, tmp_path: Path)
tests/test_utils.py:28
Functiontest_claim_next_queued_job_marks_running_and_skips_cancelled
(session)
tests/test_repository.py:40
Functiontest_clean_dir_removes_existing_files_and_directories
(tmp_path: Path)
tests/test_utils.py:6
Functiontest_create_job_persists_payload_and_queued_event
(session)
tests/test_repository.py:12
Functiontest_generate_creates_job_and_job_status_is_fetchable
(client)
tests/test_api_jobs.py:31
Functiontest_generate_requires_video_subject
(client)
tests/test_api_jobs.py:22
Functiontest_get_events_respects_after_query_parameter
(client, session_factory)
tests/test_api_jobs.py:56
Functiontest_job_cancelled_helper_reflects_cancel_flag
(monkeypatch, session_factory)
tests/test_worker.py:108
Functiontest_job_cancelled_helper_returns_true_for_missing_job
( monkeypatch, session_factory )
tests/test_worker.py:100
next →1–100 of 117, ranked by callers