Skip to content

Commit

Permalink
Move python project into a separate directory
Browse files Browse the repository at this point in the history
  • Loading branch information
SeoulSKY committed Mar 4, 2024
1 parent 2c6f847 commit 2634d86
Show file tree
Hide file tree
Showing 86 changed files with 19 additions and 21 deletions.
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/venv/
.idea
**.idea
/.env
**__pycache__
**.DS_Store
**.pytest_cache/
/logs/
/cache/
**.pytest_cache
**logs/
**cache/

service_account.json
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,20 @@ Create `.env` file, copy and paste all contents from `.env.example` file, and fi
| CAI_CHAR_ID | ID for the character in the Character AI. Follow the [guide](https://pycai.gitbook.io/welcome/api/values) to learn how to acquire it. |
| CAI_TGT | ID for the target in the Character AI. Its value starts with `internal_id:`. Run `scripts/cai_tgt.py` to get it. |


### Running with [Docker](https://www.docker.com) and [Docker Compose](https://docs.docker.com/compose/install/) (Recommended)

Run the following command:

```
docker-compose pull && docker-compose up
```bash
docker-compose pull && docker-compose up -d
```

Optionally, you can add `-d` flag to run the docker container in detached mode.


If you want to build the docker image by yourself and run it, use the following commands:

```
docker-compose -f docker-compose-dev.yml up --build
```bash
docker-compose -f docker-compose-dev.yml up --build -d
```

### Running without [Docker](https://www.docker.com)
Expand Down
10 changes: 5 additions & 5 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ version: "3"

services:
sorusora:
build: .
build: ./sorusora
container_name: sorusora
volumes:
- ./logs:/app/logs
- ./cache:/app/cache
- ./cache/algos_packages:${HOME}/.local/share/argos-translate/packages/
- ./cache/algos_cache:${HOME}/.local/cache/argos-translate/
- ./sorusora/logs:/app/logs
- ./sorusora/cache:/app/cache
- ./sorusora/cache/algos_packages:${HOME}/.local/share/argos-translate/packages/
- ./sorusora/cache/algos_cache:${HOME}/.local/cache/argos-translate/
env_file:
- .env

Expand Down
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ services:
image: ghcr.io/seoulsky/sorusora:latest
container_name: sorusora
volumes:
- ./logs:/app/logs
- ./cache:/app/cache
- ./cache/algos_packages:${HOME}/.local/share/argos-translate/packages/
- ./cache/algos_cache:${HOME}/.local/cache/argos-translate/
- ./sorusora/logs:/app/logs
- ./sorusora/cache:/app/cache
- ./sorusora/cache/algos_packages:${HOME}/.local/share/argos-translate/packages/
- ./sorusora/cache/algos_cache:${HOME}/.local/cache/argos-translate/
env_file:
- .env

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion commands/movie.py → sorusora/commands/movie.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
Path to the cache directory for desktop
"""

MOBILE_CACHE_PATH = constants.CACHE_DIR / "movie" /"mobile"
MOBILE_CACHE_PATH = constants.CACHE_DIR / "movie" / "mobile"
"""
Path to the cache directory for mobile
"""
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ async def setup_hook(self) -> None:


if __name__ == "__main__":
load_dotenv()
assert load_dotenv()

bot = TempBot(command_prefix="!", intents=discord.Intents.all())
bot.run(os.getenv("BOT_TOKEN"))
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 2634d86

Please sign in to comment.