diff --git a/.gitignore b/.gitignore index 26bcc64..49ab563 100755 --- a/.gitignore +++ b/.gitignore @@ -352,5 +352,5 @@ $RECYCLE.BIN/ # Specific for the MacOS .DS_Store -# Specific for the autostream +# Specific for the looplive videos/* \ No newline at end of file diff --git a/README-en.md b/README-en.md index 8c818b4..60396c3 100644 --- a/README-en.md +++ b/README-en.md @@ -1,12 +1,12 @@ -# autostream +# looplive [简体中文](./README.md) | English -> Welcome to `autostream`! We appreciate your feedback and contributions through PRs. Please do not use this project for purposes that violate community guidelines. +> Welcome to `looplive`! We appreciate your feedback and contributions through PRs. Please do not use this project for purposes that violate community guidelines. -`autostream` is a fully automated 24/7 live streaming tool, with plans to support more platforms in the future. +`looplive` is a fully automated 24/7 live streaming tool, with plans to support more platforms in the future. -The Python toolkit package and CLI designed for auto streaming. +The Python toolkit package and cli designed for auto loop live. ## Prerequisites @@ -41,18 +41,18 @@ brew install ffmpeg > To avoid command parameters being incorrectly separated, please wrap each parameter in English double quotes `"`. The parameter `-f` is the folder where the video files are stored. ```bash -autostream add -s "rtmp://xxxxxxxx" -k "?streamname=xxxxxxxx" -f "your/folder/path" -autostream bili +looplive add -s "rtmp://xxxxxxxx" -k "?streamname=xxxxxxxx" -f "your/folder/path" +looplive bili ``` ### More Usage ```bash -$ autostream -h +$ looplive -h -autostream [-h] [-V] {check,add,reset,bili} ... +looplive [-h] [-V] {check,add,reset,bili} ... -The Python toolkit package and CLI designed for auto streaming +The Python toolkit package and cli designed for auto loop live. positional arguments: {check,add,reset,bili} diff --git a/README.md b/README.md index cab38b2..cca1f61 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ -# autostream +# looplive 简体中文 | [English](./README-en.md) > 欢迎使用,欢迎提供更多反馈,欢迎 PR 贡献此项目,请勿用于违反社区规定的用途。 -`autostream` 是一个 7 x 24 小时全自动循环推流直播工具,预计支持更多的平台。 +`looplive` 是一个 7 x 24 小时全自动循环推流直播工具,预计支持更多的平台。 -The Python toolkit package and cli designed for auto streaming. +The Python toolkit package and cli designed for auto loop live. ## 提前准备 @@ -41,19 +41,19 @@ brew install ffmpeg > 为了避免命令参数被错误分隔,请使用英文双引号 `"` 包裹每一项参数。参数 `-f` 是视频文件的存放文件夹。 ```bash -autostream add -s "rtmp://xxxxxxxx" -k "?streamname=xxxxxxxx" -f "your/folder/path" -autostream bili +looplive add -s "rtmp://xxxxxxxx" -k "?streamname=xxxxxxxx" -f "your/folder/path" +looplive bili ``` ### 更多用法 ```bash -$ autostream -h +$ looplive -h -autostream [-h] [-V] {check,add,reset,bili} ... +looplive [-h] [-V] {check,add,reset,bili} ... -The Python toolkit package and cli designed for auto streaming +The Python toolkit package and cli designed for auto loop live. positional arguments: {check,add,reset,bili} diff --git a/autostream/__init__.py b/looplive/__init__.py similarity index 100% rename from autostream/__init__.py rename to looplive/__init__.py diff --git a/autostream/cli.py b/looplive/cli.py similarity index 87% rename from autostream/cli.py rename to looplive/cli.py index cf1850f..55051f8 100644 --- a/autostream/cli.py +++ b/looplive/cli.py @@ -1,16 +1,16 @@ -# Copyright (c) 2025 autostream +# Copyright (c) 2025 looplive import argparse import sys import os import logging -from autostream.controller.bili_controller import BiliController -from autostream.controller.config_controller import ConfigController +from looplive.controller.bili_controller import BiliController +from looplive.controller.config_controller import ConfigController def cli(): - parser = argparse.ArgumentParser(description='The Python toolkit package and cli designed for auto streaming') - parser.add_argument('-V', '--version', action='version', version='autostream 0.0.1', help='Print version information') + parser = argparse.ArgumentParser(description='The Python toolkit package and cli designed for auto loop live.') + parser.add_argument('-V', '--version', action='version', version='looplive 0.0.1', help='Print version information') subparsers = parser.add_subparsers(dest='subcommand', help='Subcommands') diff --git a/autostream/controller/__init__.py b/looplive/controller/__init__.py similarity index 100% rename from autostream/controller/__init__.py rename to looplive/controller/__init__.py diff --git a/autostream/controller/bili_controller.py b/looplive/controller/bili_controller.py similarity index 76% rename from autostream/controller/bili_controller.py rename to looplive/controller/bili_controller.py index 89b92e0..6c1550c 100644 --- a/autostream/controller/bili_controller.py +++ b/looplive/controller/bili_controller.py @@ -1,8 +1,8 @@ -# Copyright (c) 2025 autostream +# Copyright (c) 2025 looplive import subprocess -from autostream.execute.scan_and_execute import scan_folder_and_execute -from autostream.model.model import Model +from looplive.execute.scan_and_execute import scan_folder_and_execute +from looplive.model.model import Model class BiliController: def __init__(self): diff --git a/autostream/controller/config_controller.py b/looplive/controller/config_controller.py similarity index 91% rename from autostream/controller/config_controller.py rename to looplive/controller/config_controller.py index 1269a5f..90de92e 100644 --- a/autostream/controller/config_controller.py +++ b/looplive/controller/config_controller.py @@ -1,6 +1,6 @@ -# Copyright (c) 2025 autostream +# Copyright (c) 2025 looplive -from autostream.model.model import Model +from looplive.model.model import Model class ConfigController: def __init__(self): diff --git a/autostream/execute/__init__.py b/looplive/execute/__init__.py similarity index 100% rename from autostream/execute/__init__.py rename to looplive/execute/__init__.py diff --git a/autostream/execute/scan_and_execute.py b/looplive/execute/scan_and_execute.py similarity index 92% rename from autostream/execute/scan_and_execute.py rename to looplive/execute/scan_and_execute.py index cb1d6d6..545e220 100644 --- a/autostream/execute/scan_and_execute.py +++ b/looplive/execute/scan_and_execute.py @@ -1,4 +1,4 @@ -# Copyright (c) 2025 autostream +# Copyright (c) 2025 looplive import os import subprocess diff --git a/autostream/model/__init__.py b/looplive/model/__init__.py similarity index 100% rename from autostream/model/__init__.py rename to looplive/model/__init__.py diff --git a/autostream/model/config.json b/looplive/model/config.json similarity index 100% rename from autostream/model/config.json rename to looplive/model/config.json diff --git a/autostream/model/model.py b/looplive/model/model.py similarity index 97% rename from autostream/model/model.py rename to looplive/model/model.py index 88a9325..8d6260e 100644 --- a/autostream/model/model.py +++ b/looplive/model/model.py @@ -1,4 +1,4 @@ -# Copyright (c) 2025 autostream +# Copyright (c) 2025 looplive import json import os diff --git a/autostream/tests/__init__.py b/looplive/tests/__init__.py similarity index 100% rename from autostream/tests/__init__.py rename to looplive/tests/__init__.py diff --git a/autostream/tests/test_execute.py b/looplive/tests/test_execute.py similarity index 64% rename from autostream/tests/test_execute.py rename to looplive/tests/test_execute.py index 9eea66b..478bd96 100644 --- a/autostream/tests/test_execute.py +++ b/looplive/tests/test_execute.py @@ -1,12 +1,12 @@ -# Copyright (c) 2025 autostream +# Copyright (c) 2025 looplive import unittest from unittest.mock import patch, MagicMock -from autostream.execute.scan_and_execute import scan_folder_and_execute +from looplive.execute.scan_and_execute import scan_folder_and_execute class TestScanAndExecute(unittest.TestCase): def test_scan_folder_and_execute(self): - folder_to_scan = "/home/jh/Downloads/autostream/videos" + folder_to_scan = "/home/Downloads/looplive/videos" command_to_execute = "ffmpeg -re -i {file_path} -c copy -f flv {stream_url}" scan_folder_and_execute(folder_to_scan, command_to_execute) \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 2e434ce..9f292f4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,12 +3,12 @@ requires = ["hatchling"] build-backend = "hatchling.build" [project] -name = "autostream" +name = "looplive" version = "0.0.1" authors = [ { name="timerring"}, ] -description = "The Python toolkit package and cli designed for auto streaming" +description = "The Python toolkit package and cli designed for auto loop live." readme = "README.md" license = { file="LICENSE" } requires-python = ">=3.8" @@ -20,7 +20,7 @@ classifiers = [ dependencies = [] [project.scripts] -autostream = "autostream.cli:cli" +looplive = "looplive.cli:cli" [project.urls] -"Homepage" = "https://github.com/timerring/autostream" +"Homepage" = "https://github.com/timerring/looplive"