From b25bac8cea70c53ee48e56f4801ef947cc7df840 Mon Sep 17 00:00:00 2001 From: Andrew Ferrazzutti Date: Fri, 26 Feb 2021 14:19:48 -0500 Subject: [PATCH] Rename --- Dockerfile | 12 ++++++------ README.md | 4 ++-- ROADMAP.md | 2 +- SETUP.md | 6 +++--- docker-run.sh | 8 ++++---- matrix_appservice_line/__init__.py | 2 ++ {mautrix_line => matrix_appservice_line}/__main__.py | 10 +++++----- .../commands/__init__.py | 0 .../commands/auth.py | 2 +- .../commands/conn.py | 2 +- .../commands/typehint.py | 0 {mautrix_line => matrix_appservice_line}/config.py | 4 ++-- .../db/__init__.py | 0 .../db/message.py | 2 +- .../db/portal.py | 2 +- .../db/puppet.py | 2 +- .../db/upgrade.py | 2 +- {mautrix_line => matrix_appservice_line}/db/user.py | 2 +- .../example-config.yaml | 6 +++--- .../get_version.py | 2 +- {mautrix_line => matrix_appservice_line}/matrix.py | 2 +- {mautrix_line => matrix_appservice_line}/portal.py | 2 +- {mautrix_line => matrix_appservice_line}/puppet.py | 2 +- .../rpc/__init__.py | 0 .../rpc/client.py | 3 +-- {mautrix_line => matrix_appservice_line}/rpc/rpc.py | 2 +- .../rpc/types.py | 2 +- {mautrix_line => matrix_appservice_line}/user.py | 2 +- .../util/__init__.py | 0 .../util/color_log.py | 2 +- {mautrix_line => matrix_appservice_line}/version.py | 0 .../web/__init__.py | 0 .../web/provisioning_api.py | 2 +- mautrix_line/__init__.py | 2 -- puppet/Dockerfile | 6 +++--- puppet/example-config.json | 2 +- puppet/package.json | 8 ++++---- puppet/src/api.js | 2 +- puppet/src/client.js | 2 +- puppet/src/contentscript.js | 2 +- puppet/src/main.js | 2 +- puppet/src/puppet.js | 2 +- puppet/src/taskqueue.js | 2 +- puppet/src/util.js | 2 +- setup.py | 12 ++++++------ 45 files changed, 66 insertions(+), 67 deletions(-) create mode 100644 matrix_appservice_line/__init__.py rename {mautrix_line => matrix_appservice_line}/__main__.py (93%) rename {mautrix_line => matrix_appservice_line}/commands/__init__.py (100%) rename {mautrix_line => matrix_appservice_line}/commands/auth.py (97%) rename {mautrix_line => matrix_appservice_line}/commands/conn.py (94%) rename {mautrix_line => matrix_appservice_line}/commands/typehint.py (100%) rename {mautrix_line => matrix_appservice_line}/config.py (93%) rename {mautrix_line => matrix_appservice_line}/db/__init__.py (100%) rename {mautrix_line => matrix_appservice_line}/db/message.py (95%) rename {mautrix_line => matrix_appservice_line}/db/portal.py (96%) rename {mautrix_line => matrix_appservice_line}/db/puppet.py (93%) rename {mautrix_line => matrix_appservice_line}/db/upgrade.py (93%) rename {mautrix_line => matrix_appservice_line}/db/user.py (93%) rename {mautrix_line => matrix_appservice_line}/example-config.yaml (97%) rename {mautrix_line => matrix_appservice_line}/get_version.py (90%) rename {mautrix_line => matrix_appservice_line}/matrix.py (95%) rename {mautrix_line => matrix_appservice_line}/portal.py (99%) rename {mautrix_line => matrix_appservice_line}/puppet.py (97%) rename {mautrix_line => matrix_appservice_line}/rpc/__init__.py (100%) rename {mautrix_line => matrix_appservice_line}/rpc/client.py (96%) rename {mautrix_line => matrix_appservice_line}/rpc/rpc.py (98%) rename {mautrix_line => matrix_appservice_line}/rpc/types.py (93%) rename {mautrix_line => matrix_appservice_line}/user.py (98%) rename {mautrix_line => matrix_appservice_line}/util/__init__.py (100%) rename {mautrix_line => matrix_appservice_line}/util/color_log.py (91%) rename {mautrix_line => matrix_appservice_line}/version.py (100%) rename {mautrix_line => matrix_appservice_line}/web/__init__.py (100%) rename {mautrix_line => matrix_appservice_line}/web/provisioning_api.py (97%) delete mode 100644 mautrix_line/__init__.py diff --git a/Dockerfile b/Dockerfile index 20b6f65..218fc96 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,19 +31,19 @@ RUN apk add --no-cache \ chmod +x yq && mv yq /usr/bin/yq -COPY requirements.txt /opt/mautrix-line/requirements.txt -COPY optional-requirements.txt /opt/mautrix-line/optional-requirements.txt -WORKDIR /opt/mautrix-line +COPY requirements.txt /opt/matrix-appservice-line/requirements.txt +COPY optional-requirements.txt /opt/matrix-appservice-line/optional-requirements.txt +WORKDIR /opt/matrix-appservice-line RUN apk add --virtual .build-deps python3-dev libffi-dev build-base \ && pip3 install -r requirements.txt -r optional-requirements.txt \ && apk del .build-deps -COPY . /opt/mautrix-line +COPY . /opt/matrix-appservice-line RUN apk add git && pip3 install .[e2be] && apk del git \ # This doesn't make the image smaller, but it's needed so that the `version` command works properly - && cp mautrix_line/example-config.yaml . && rm -rf mautrix_line + && cp matrix_appservice_line/example-config.yaml . && rm -rf matrix_appservice_line VOLUME /data ENV UID=1337 GID=1337 -CMD ["/opt/mautrix-line/docker-run.sh"] +CMD ["/opt/matrix-appservice-line/docker-run.sh"] diff --git a/README.md b/README.md index 29880e5..f44f184 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# mautrix-line +# matrix-appservice-line A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer. ## Features & roadmap @@ -8,4 +8,4 @@ A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Pupp [SETUP.md](SETUP.md) ## Discussion -Matrix room: [`#mautrix-line:miscworks.net`](https://matrix.to/#/#mautrix-line:miscworks.net) +Matrix room: [`#matrix-appservice-line:miscworks.net`](https://matrix.to/#/#matrix-appservice-line:miscworks.net) diff --git a/ROADMAP.md b/ROADMAP.md index 0ec3014..d383c1c 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -34,5 +34,5 @@ * Replies * Voice messages -### Missing from mautrix-line +### Missing from matrix-appservice-line * TODO diff --git a/SETUP.md b/SETUP.md index 62a5442..5dc2db5 100644 --- a/SETUP.md +++ b/SETUP.md @@ -7,7 +7,7 @@ 6. Launch the Puppeteer module with `yarn start` or `node src/main.js` 7. `cd` to the main directory and create a Python virtual environment with `virtualenv -p /usr/bin/python3 .venv`, and enter it with `source .venv/bin/activate` 8. Install Python requirements with `pip install -r requirements.txt` -9. Copy `mautrix_line/example-config.yaml` to `config.yaml`, and update it with the proper settings to connect to your homeserver -10. Run `python -m mautrix_line -g` to generate an appservice registration file, and update your homeserver configuration to accept it -11. Run the bridge with `python -m mautrix_line` +9. Copy `matrix_appservice_line/example-config.yaml` to `config.yaml`, and update it with the proper settings to connect to your homeserver +10. Run `python -m matrix_appservice_line -g` to generate an appservice registration file, and update your homeserver configuration to accept it +11. Run the bridge with `python -m matrix_appservice_line` 12. Start a chat with the bot and follow the instructions diff --git a/docker-run.sh b/docker-run.sh index 98f46fe..63aeaaa 100755 --- a/docker-run.sh +++ b/docker-run.sh @@ -2,10 +2,10 @@ # Define functions. function fixperms { - chown -R $UID:$GID /data /opt/mautrix-line + chown -R $UID:$GID /data /opt/matrix-appservice-line } -cd /opt/mautrix-line +cd /opt/matrix-appservice-line if [ ! -f /data/config.yaml ]; then cp example-config.yaml /data/config.yaml @@ -18,7 +18,7 @@ if [ ! -f /data/config.yaml ]; then fi if [ ! -f /data/registration.yaml ]; then - python3 -m mautrix_line -g -c /data/config.yaml -r /data/registration.yaml + python3 -m matrix_appservice_line -g -c /data/config.yaml -r /data/registration.yaml echo "Didn't find a registration file." echo "Generated one for you." echo "Copy that over to synapses app service directory." @@ -27,4 +27,4 @@ if [ ! -f /data/registration.yaml ]; then fi fixperms -exec su-exec $UID:$GID python3 -m mautrix_line -c /data/config.yaml +exec su-exec $UID:$GID python3 -m matrix_appservice_line -c /data/config.yaml diff --git a/matrix_appservice_line/__init__.py b/matrix_appservice_line/__init__.py new file mode 100644 index 0000000..4ee8476 --- /dev/null +++ b/matrix_appservice_line/__init__.py @@ -0,0 +1,2 @@ +__version__ = "0.1.0" +__author__ = "Andrew Ferrazzutti " diff --git a/mautrix_line/__main__.py b/matrix_appservice_line/__main__.py similarity index 93% rename from mautrix_line/__main__.py rename to matrix_appservice_line/__main__.py index 63058ad..f8e5fb0 100644 --- a/mautrix_line/__main__.py +++ b/matrix_appservice_line/__main__.py @@ -1,4 +1,4 @@ -# mautrix-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer +# matrix-appservice-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer # Copyright (C) 2020-2021 Tulir Asokan, Andrew Ferrazzutti # # This program is free software: you can redistribute it and/or modify @@ -30,12 +30,12 @@ from . import commands as _ class MessagesBridge(Bridge): - module = "mautrix_line" - name = "mautrix-line" - command = "python -m mautrix-line" + module = "matrix_appservice_line" + name = "matrix-appservice-line" + command = "python -m matrix_appservice_line" description = ("A very hacky Matrix-LINE bridge based on running " "LINE's Chrome extension in Puppeteer.") - repo_url = "git://miscworks.net/mautrix-line" + repo_url = "git://miscworks.net/matrix-appservice-line" real_user_content_key = "net.miscworks.line.puppet" version = version markdown_version = linkified_version diff --git a/mautrix_line/commands/__init__.py b/matrix_appservice_line/commands/__init__.py similarity index 100% rename from mautrix_line/commands/__init__.py rename to matrix_appservice_line/commands/__init__.py diff --git a/mautrix_line/commands/auth.py b/matrix_appservice_line/commands/auth.py similarity index 97% rename from mautrix_line/commands/auth.py rename to matrix_appservice_line/commands/auth.py index d669256..95f06c5 100644 --- a/mautrix_line/commands/auth.py +++ b/matrix_appservice_line/commands/auth.py @@ -1,4 +1,4 @@ -# mautrix-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer +# matrix-appservice-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer # Copyright (C) 2020-2021 Tulir Asokan, Andrew Ferrazzutti # # This program is free software: you can redistribute it and/or modify diff --git a/mautrix_line/commands/conn.py b/matrix_appservice_line/commands/conn.py similarity index 94% rename from mautrix_line/commands/conn.py rename to matrix_appservice_line/commands/conn.py index 5796c52..83ed8f8 100644 --- a/mautrix_line/commands/conn.py +++ b/matrix_appservice_line/commands/conn.py @@ -1,4 +1,4 @@ -# mautrix-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer +# matrix-appservice-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer # Copyright (C) 2020-2021 Tulir Asokan, Andrew Ferrazzutti # # This program is free software: you can redistribute it and/or modify diff --git a/mautrix_line/commands/typehint.py b/matrix_appservice_line/commands/typehint.py similarity index 100% rename from mautrix_line/commands/typehint.py rename to matrix_appservice_line/commands/typehint.py diff --git a/mautrix_line/config.py b/matrix_appservice_line/config.py similarity index 93% rename from mautrix_line/config.py rename to matrix_appservice_line/config.py index a3cc78f..f49cf75 100644 --- a/mautrix_line/config.py +++ b/matrix_appservice_line/config.py @@ -1,4 +1,4 @@ -# mautrix-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer +# matrix-appservice-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer # Copyright (C) 2020-2021 Tulir Asokan, Andrew Ferrazzutti # # This program is free software: you can redistribute it and/or modify @@ -25,7 +25,7 @@ Permissions = NamedTuple("Permissions", user=bool, admin=bool, level=str) class Config(BaseBridgeConfig): def __getitem__(self, key: str) -> Any: try: - return os.environ[f"MAUTRIX_LINE_{key.replace('.', '_').upper()}"] + return os.environ[f"MATRIX_APPSERVICE_LINE_{key.replace('.', '_').upper()}"] except KeyError: return super().__getitem__(key) diff --git a/mautrix_line/db/__init__.py b/matrix_appservice_line/db/__init__.py similarity index 100% rename from mautrix_line/db/__init__.py rename to matrix_appservice_line/db/__init__.py diff --git a/mautrix_line/db/message.py b/matrix_appservice_line/db/message.py similarity index 95% rename from mautrix_line/db/message.py rename to matrix_appservice_line/db/message.py index 4e93f48..7fbc0db 100644 --- a/mautrix_line/db/message.py +++ b/matrix_appservice_line/db/message.py @@ -1,4 +1,4 @@ -# mautrix-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer +# matrix-appservice-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer # Copyright (C) 2020-2021 Tulir Asokan, Andrew Ferrazzutti # # This program is free software: you can redistribute it and/or modify diff --git a/mautrix_line/db/portal.py b/matrix_appservice_line/db/portal.py similarity index 96% rename from mautrix_line/db/portal.py rename to matrix_appservice_line/db/portal.py index fc57761..1480fea 100644 --- a/mautrix_line/db/portal.py +++ b/matrix_appservice_line/db/portal.py @@ -1,4 +1,4 @@ -# mautrix-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer +# matrix-appservice-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer # Copyright (C) 2020-2021 Tulir Asokan, Andrew Ferrazzutti # # This program is free software: you can redistribute it and/or modify diff --git a/mautrix_line/db/puppet.py b/matrix_appservice_line/db/puppet.py similarity index 93% rename from mautrix_line/db/puppet.py rename to matrix_appservice_line/db/puppet.py index 4795e44..d44d34e 100644 --- a/mautrix_line/db/puppet.py +++ b/matrix_appservice_line/db/puppet.py @@ -1,4 +1,4 @@ -# mautrix-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer +# matrix-appservice-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer # Copyright (C) 2020-2021 Tulir Asokan, Andrew Ferrazzutti # # This program is free software: you can redistribute it and/or modify diff --git a/mautrix_line/db/upgrade.py b/matrix_appservice_line/db/upgrade.py similarity index 93% rename from mautrix_line/db/upgrade.py rename to matrix_appservice_line/db/upgrade.py index 33694ca..0596239 100644 --- a/mautrix_line/db/upgrade.py +++ b/matrix_appservice_line/db/upgrade.py @@ -1,4 +1,4 @@ -# mautrix-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer +# matrix-appservice-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer # Copyright (C) 2020-2021 Tulir Asokan, Andrew Ferrazzutti # # This program is free software: you can redistribute it and/or modify diff --git a/mautrix_line/db/user.py b/matrix_appservice_line/db/user.py similarity index 93% rename from mautrix_line/db/user.py rename to matrix_appservice_line/db/user.py index 4015841..f3b2fe9 100644 --- a/mautrix_line/db/user.py +++ b/matrix_appservice_line/db/user.py @@ -1,4 +1,4 @@ -# mautrix-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer +# matrix-appservice-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer # Copyright (C) 2020-2021 Tulir Asokan, Andrew Ferrazzutti # # This program is free software: you can redistribute it and/or modify diff --git a/mautrix_line/example-config.yaml b/matrix_appservice_line/example-config.yaml similarity index 97% rename from mautrix_line/example-config.yaml rename to matrix_appservice_line/example-config.yaml index 2eeaa93..1d6ce16 100644 --- a/mautrix_line/example-config.yaml +++ b/matrix_appservice_line/example-config.yaml @@ -139,7 +139,7 @@ puppeteer: # Either unix or tcp type: unix # Only for type: unix - path: /var/run/mautrix-line/puppet.sock + path: /var/run/matrix-appservice-line/puppet.sock # Only for type: tcp host: localhost port: 29395 @@ -152,7 +152,7 @@ logging: version: 1 formatters: colored: - (): mautrix_line.util.ColorFormatter + (): matrix_appservice_line.util.ColorFormatter format: "[%(asctime)s] [%(levelname)s@%(name)s] %(message)s" normal: format: "[%(asctime)s] [%(levelname)s@%(name)s] %(message)s" @@ -160,7 +160,7 @@ logging: file: class: logging.handlers.RotatingFileHandler formatter: normal - filename: ./mautrix-line.log + filename: ./matrix-appservice-line.log maxBytes: 10485760 backupCount: 10 console: diff --git a/mautrix_line/get_version.py b/matrix_appservice_line/get_version.py similarity index 90% rename from mautrix_line/get_version.py rename to matrix_appservice_line/get_version.py index b8d0524..8593d4e 100644 --- a/mautrix_line/get_version.py +++ b/matrix_appservice_line/get_version.py @@ -19,7 +19,7 @@ def run(cmd): if os.path.exists(".git") and shutil.which("git"): try: git_revision = run(["git", "rev-parse", "HEAD"]).strip().decode("ascii") - git_revision_url = f"git://miscworks.net/mautrix-line/commit/{git_revision}" + git_revision_url = f"git://miscworks.net/matrix-appservice-line/commit/{git_revision}" git_revision = git_revision[:8] except (subprocess.SubprocessError, OSError): git_revision = "unknown" diff --git a/mautrix_line/matrix.py b/matrix_appservice_line/matrix.py similarity index 95% rename from mautrix_line/matrix.py rename to matrix_appservice_line/matrix.py index eeb5bd3..919e468 100644 --- a/mautrix_line/matrix.py +++ b/matrix_appservice_line/matrix.py @@ -1,4 +1,4 @@ -# mautrix-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer +# matrix-appservice-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer # Copyright (C) 2020-2021 Tulir Asokan, Andrew Ferrazzutti # # This program is free software: you can redistribute it and/or modify diff --git a/mautrix_line/portal.py b/matrix_appservice_line/portal.py similarity index 99% rename from mautrix_line/portal.py rename to matrix_appservice_line/portal.py index 9e6519f..34a325e 100644 --- a/mautrix_line/portal.py +++ b/matrix_appservice_line/portal.py @@ -1,4 +1,4 @@ -# mautrix-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer +# matrix-appservice-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer # Copyright (C) 2020-2021 Tulir Asokan, Andrew Ferrazzutti # # This program is free software: you can redistribute it and/or modify diff --git a/mautrix_line/puppet.py b/matrix_appservice_line/puppet.py similarity index 97% rename from mautrix_line/puppet.py rename to matrix_appservice_line/puppet.py index fc2162d..f2f4116 100644 --- a/mautrix_line/puppet.py +++ b/matrix_appservice_line/puppet.py @@ -1,4 +1,4 @@ -# mautrix-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer +# matrix-appservice-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer # Copyright (C) 2020-2021 Tulir Asokan, Andrew Ferrazzutti # # This program is free software: you can redistribute it and/or modify diff --git a/mautrix_line/rpc/__init__.py b/matrix_appservice_line/rpc/__init__.py similarity index 100% rename from mautrix_line/rpc/__init__.py rename to matrix_appservice_line/rpc/__init__.py diff --git a/mautrix_line/rpc/client.py b/matrix_appservice_line/rpc/client.py similarity index 96% rename from mautrix_line/rpc/client.py rename to matrix_appservice_line/rpc/client.py index a91864a..02dfb7f 100644 --- a/mautrix_line/rpc/client.py +++ b/matrix_appservice_line/rpc/client.py @@ -1,4 +1,4 @@ -# mautrix-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer +# matrix-appservice-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer # Copyright (C) 2020-2021 Tulir Asokan, Andrew Ferrazzutti # # This program is free software: you can redistribute it and/or modify @@ -19,7 +19,6 @@ import asyncio from .rpc import RPCClient from .types import ChatListInfo, ChatInfo, Message, StartStatus -from mautrix_line.rpc.types import RPCError class LoginCommand(TypedDict): diff --git a/mautrix_line/rpc/rpc.py b/matrix_appservice_line/rpc/rpc.py similarity index 98% rename from mautrix_line/rpc/rpc.py rename to matrix_appservice_line/rpc/rpc.py index 8dc79dc..86be3e3 100644 --- a/mautrix_line/rpc/rpc.py +++ b/matrix_appservice_line/rpc/rpc.py @@ -1,4 +1,4 @@ -# mautrix-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer +# matrix-appservice-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer # Copyright (C) 2020-2021 Tulir Asokan, Andrew Ferrazzutti # # This program is free software: you can redistribute it and/or modify diff --git a/mautrix_line/rpc/types.py b/matrix_appservice_line/rpc/types.py similarity index 93% rename from mautrix_line/rpc/types.py rename to matrix_appservice_line/rpc/types.py index 918add4..7848b5a 100644 --- a/mautrix_line/rpc/types.py +++ b/matrix_appservice_line/rpc/types.py @@ -1,4 +1,4 @@ -# mautrix-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer +# matrix-appservice-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer # Copyright (C) 2020-2021 Tulir Asokan, Andrew Ferrazzutti # # This program is free software: you can redistribute it and/or modify diff --git a/mautrix_line/user.py b/matrix_appservice_line/user.py similarity index 98% rename from mautrix_line/user.py rename to matrix_appservice_line/user.py index 45ea391..cd8e200 100644 --- a/mautrix_line/user.py +++ b/matrix_appservice_line/user.py @@ -1,4 +1,4 @@ -# mautrix-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer +# matrix-appservice-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer # Copyright (C) 2020-2021 Tulir Asokan, Andrew Ferrazzutti # # This program is free software: you can redistribute it and/or modify diff --git a/mautrix_line/util/__init__.py b/matrix_appservice_line/util/__init__.py similarity index 100% rename from mautrix_line/util/__init__.py rename to matrix_appservice_line/util/__init__.py diff --git a/mautrix_line/util/color_log.py b/matrix_appservice_line/util/color_log.py similarity index 91% rename from mautrix_line/util/color_log.py rename to matrix_appservice_line/util/color_log.py index 6255d8b..1084efa 100644 --- a/mautrix_line/util/color_log.py +++ b/matrix_appservice_line/util/color_log.py @@ -1,4 +1,4 @@ -# mautrix-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer +# matrix-appservice-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer # Copyright (C) 2020-2021 Tulir Asokan, Andrew Ferrazzutti # # This program is free software: you can redistribute it and/or modify diff --git a/mautrix_line/version.py b/matrix_appservice_line/version.py similarity index 100% rename from mautrix_line/version.py rename to matrix_appservice_line/version.py diff --git a/mautrix_line/web/__init__.py b/matrix_appservice_line/web/__init__.py similarity index 100% rename from mautrix_line/web/__init__.py rename to matrix_appservice_line/web/__init__.py diff --git a/mautrix_line/web/provisioning_api.py b/matrix_appservice_line/web/provisioning_api.py similarity index 97% rename from mautrix_line/web/provisioning_api.py rename to matrix_appservice_line/web/provisioning_api.py index 5eb990a..d4a3875 100644 --- a/mautrix_line/web/provisioning_api.py +++ b/matrix_appservice_line/web/provisioning_api.py @@ -1,4 +1,4 @@ -# mautrix-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer +# matrix-appservice-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer # Copyright (C) 2020-2021 Tulir Asokan, Andrew Ferrazzutti # # This program is free software: you can redistribute it and/or modify diff --git a/mautrix_line/__init__.py b/mautrix_line/__init__.py deleted file mode 100644 index c732749..0000000 --- a/mautrix_line/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -__version__ = "0.1.0" -__author__ = "Tulir Asokan " diff --git a/puppet/Dockerfile b/puppet/Dockerfile index e00d63b..cd717f9 100644 --- a/puppet/Dockerfile +++ b/puppet/Dockerfile @@ -7,11 +7,11 @@ RUN echo $'\ RUN apk add --no-cache chromium@edge -WORKDIR /opt/mautrix-line/puppet -RUN chown node:node /opt/mautrix-line/puppet +WORKDIR /opt/matrix-appservice-line/puppet +RUN chown node:node /opt/matrix-appservice-line/puppet USER node COPY package.json yarn.lock ./ RUN yarn --production && rm -rf node_modules/puppeteer/.local-chromium -COPY . /opt/mautrix-line/puppet +COPY . /opt/matrix-appservice-line/puppet CMD ["yarn", "start", "--config", "/data/config.json", "--browser", "/usr/lib/chromium/chrome", "--no-sandbox"] diff --git a/puppet/example-config.json b/puppet/example-config.json index baf3c19..2d6a9cd 100644 --- a/puppet/example-config.json +++ b/puppet/example-config.json @@ -1,7 +1,7 @@ { "listen": { "type": "unix", - "path": "/var/run/mautrix-line/puppet.sock" + "path": "/var/run/matrix-appservice-line/puppet.sock" }, "profile_dir": "./profiles", "url": "chrome-extension:///index.html", diff --git a/puppet/package.json b/puppet/package.json index 6f02a35..1090808 100644 --- a/puppet/package.json +++ b/puppet/package.json @@ -1,16 +1,16 @@ { - "name": "mautrix-line-puppeteer", + "name": "matrix-appservice-line-puppeteer", "version": "0.1.0", - "description": "Puppeteer module for mautrix-line", + "description": "Puppeteer module for matrix-appservice-line", "repository": { "type": "git", - "url": "git://miscworks.net/mautrix-line.git" + "url": "git://miscworks.net/matrix-appservice-line.git" }, "type": "module", "main": "src/main.js", "author": "Andrew Ferrazzutti ", "license": "AGPL-3.0-or-later", - "homepage": "https://miscworks.net/dir/mautrix-line", + "homepage": "https://miscworks.net/dir/matrix-appservice-line", "scripts": { "start": "node ./src/main.js" }, diff --git a/puppet/src/api.js b/puppet/src/api.js index 33e8f3a..9938082 100644 --- a/puppet/src/api.js +++ b/puppet/src/api.js @@ -1,4 +1,4 @@ -// mautrix-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer +// matrix-appservice-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer // Copyright (C) 2020-2021 Tulir Asokan, Andrew Ferrazzutti // // This program is free software: you can redistribute it and/or modify diff --git a/puppet/src/client.js b/puppet/src/client.js index 1b99851..b10220d 100644 --- a/puppet/src/client.js +++ b/puppet/src/client.js @@ -1,4 +1,4 @@ -// mautrix-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer +// matrix-appservice-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer // Copyright (C) 2020-2021 Tulir Asokan, Andrew Ferrazzutti // // This program is free software: you can redistribute it and/or modify diff --git a/puppet/src/contentscript.js b/puppet/src/contentscript.js index 34fd2af..84d77ef 100644 --- a/puppet/src/contentscript.js +++ b/puppet/src/contentscript.js @@ -1,4 +1,4 @@ -// mautrix-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer +// matrix-appservice-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer // Copyright (C) 2020-2021 Tulir Asokan, Andrew Ferrazzutti // // This program is free software: you can redistribute it and/or modify diff --git a/puppet/src/main.js b/puppet/src/main.js index d1b2a21..898443e 100644 --- a/puppet/src/main.js +++ b/puppet/src/main.js @@ -1,4 +1,4 @@ -// mautrix-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer +// matrix-appservice-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer // Copyright (C) 2020-2021 Tulir Asokan, Andrew Ferrazzutti // // This program is free software: you can redistribute it and/or modify diff --git a/puppet/src/puppet.js b/puppet/src/puppet.js index b7c87a1..2640eac 100644 --- a/puppet/src/puppet.js +++ b/puppet/src/puppet.js @@ -1,4 +1,4 @@ -// mautrix-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer +// matrix-appservice-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer // Copyright (C) 2020-2021 Tulir Asokan, Andrew Ferrazzutti // // This program is free software: you can redistribute it and/or modify diff --git a/puppet/src/taskqueue.js b/puppet/src/taskqueue.js index af9413e..b4859f3 100644 --- a/puppet/src/taskqueue.js +++ b/puppet/src/taskqueue.js @@ -1,4 +1,4 @@ -// mautrix-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer +// matrix-appservice-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer // Copyright (C) 2020-2021 Tulir Asokan, Andrew Ferrazzutti // // This program is free software: you can redistribute it and/or modify diff --git a/puppet/src/util.js b/puppet/src/util.js index a8bb04d..1baaea3 100644 --- a/puppet/src/util.js +++ b/puppet/src/util.js @@ -1,4 +1,4 @@ -// mautrix-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer +// matrix-appservice-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer // Copyright (C) 2020-2021 Tulir Asokan, Andrew Ferrazzutti // // This program is free software: you can redistribute it and/or modify diff --git a/setup.py b/setup.py index 6d5d65d..cb35de6 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ import setuptools -from mautrix_line.get_version import git_tag, git_revision, version, linkified_version +from matrix_appservice_line.get_version import git_tag, git_revision, version, linkified_version with open("requirements.txt") as reqs: install_requires = reqs.read().splitlines() @@ -23,7 +23,7 @@ try: except IOError: long_desc = "Failed to read README.md" -with open("mautrix_line/version.py", "w") as version_file: +with open("matrix_appservice_line/version.py", "w") as version_file: version_file.write(f"""# Generated in setup.py git_tag = {git_tag!r} @@ -33,9 +33,9 @@ linkified_version = {linkified_version!r} """) setuptools.setup( - name="mautrix-line", + name="matrix-appservice-line", version=version, - url="git://miscworks.net/mautrix-line", + url="git://miscworks.net/matrix-appservice-line", author="Tulir Asokan", author_email="tulir@maunium.net", @@ -60,10 +60,10 @@ setuptools.setup( "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", ], - package_data={"mautrix_line": [ + package_data={"matrix_appservice_line": [ "example-config.yaml", ]}, data_files=[ - (".", ["mautrix_line/example-config.yaml"]), + (".", ["matrix_appservice_line/example-config.yaml"]), ], )