Browse Source

Rename again

master
Andrew Ferrazzutti 3 months ago
parent
commit
456ac7ff50
44 changed files with 64 additions and 64 deletions
  1. +6
    -6
      Dockerfile
  2. +2
    -2
      README.md
  3. +1
    -1
      ROADMAP.md
  4. +3
    -3
      SETUP.md
  5. +4
    -4
      docker-run.sh
  6. +0
    -0
      matrix_puppeteer_line/__init__.py
  7. +5
    -5
      matrix_puppeteer_line/__main__.py
  8. +0
    -0
      matrix_puppeteer_line/commands/__init__.py
  9. +1
    -1
      matrix_puppeteer_line/commands/auth.py
  10. +1
    -1
      matrix_puppeteer_line/commands/conn.py
  11. +0
    -0
      matrix_puppeteer_line/commands/typehint.py
  12. +2
    -2
      matrix_puppeteer_line/config.py
  13. +0
    -0
      matrix_puppeteer_line/db/__init__.py
  14. +1
    -1
      matrix_puppeteer_line/db/message.py
  15. +1
    -1
      matrix_puppeteer_line/db/portal.py
  16. +1
    -1
      matrix_puppeteer_line/db/puppet.py
  17. +1
    -1
      matrix_puppeteer_line/db/upgrade.py
  18. +1
    -1
      matrix_puppeteer_line/db/user.py
  19. +3
    -3
      matrix_puppeteer_line/example-config.yaml
  20. +1
    -1
      matrix_puppeteer_line/get_version.py
  21. +1
    -1
      matrix_puppeteer_line/matrix.py
  22. +1
    -1
      matrix_puppeteer_line/portal.py
  23. +1
    -1
      matrix_puppeteer_line/puppet.py
  24. +0
    -0
      matrix_puppeteer_line/rpc/__init__.py
  25. +1
    -1
      matrix_puppeteer_line/rpc/client.py
  26. +1
    -1
      matrix_puppeteer_line/rpc/rpc.py
  27. +1
    -1
      matrix_puppeteer_line/rpc/types.py
  28. +1
    -1
      matrix_puppeteer_line/user.py
  29. +0
    -0
      matrix_puppeteer_line/util/__init__.py
  30. +1
    -1
      matrix_puppeteer_line/util/color_log.py
  31. +0
    -0
      matrix_puppeteer_line/version.py
  32. +0
    -0
      matrix_puppeteer_line/web/__init__.py
  33. +1
    -1
      matrix_puppeteer_line/web/provisioning_api.py
  34. +3
    -3
      puppet/Dockerfile
  35. +1
    -1
      puppet/example-config.json
  36. +4
    -4
      puppet/package.json
  37. +1
    -1
      puppet/src/api.js
  38. +1
    -1
      puppet/src/client.js
  39. +1
    -1
      puppet/src/contentscript.js
  40. +1
    -1
      puppet/src/main.js
  41. +1
    -1
      puppet/src/puppet.js
  42. +1
    -1
      puppet/src/taskqueue.js
  43. +1
    -1
      puppet/src/util.js
  44. +6
    -6
      setup.py

+ 6
- 6
Dockerfile View File

@ -31,19 +31,19 @@ RUN apk add --no-cache \
chmod +x yq && mv yq /usr/bin/yq
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
COPY requirements.txt /opt/matrix-puppeteer-line/requirements.txt
COPY optional-requirements.txt /opt/matrix-puppeteer-line/optional-requirements.txt
WORKDIR /opt/matrix-puppeteer-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/matrix-appservice-line
COPY . /opt/matrix-puppeteer-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 matrix_appservice_line/example-config.yaml . && rm -rf matrix_appservice_line
&& cp matrix_puppeteer_line/example-config.yaml . && rm -rf matrix_puppeteer_line
VOLUME /data
ENV UID=1337 GID=1337
CMD ["/opt/matrix-appservice-line/docker-run.sh"]
CMD ["/opt/matrix-puppeteer-line/docker-run.sh"]

+ 2
- 2
README.md View File

@ -1,4 +1,4 @@
# matrix-appservice-line
# matrix-puppeteer-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: [`#matrix-appservice-line:miscworks.net`](https://matrix.to/#/#matrix-appservice-line:miscworks.net)
Matrix room: [`#matrix-puppeteer-line:miscworks.net`](https://matrix.to/#/#matrix-puppeteer-line:miscworks.net)

+ 1
- 1
ROADMAP.md View File

@ -34,5 +34,5 @@
* Replies
* Voice messages
### Missing from matrix-appservice-line
### Missing from matrix-puppeteer-line
* TODO

+ 3
- 3
SETUP.md View File

@ -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 `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`
9. Copy `matrix_puppeteer_line/example-config.yaml` to `config.yaml`, and update it with the proper settings to connect to your homeserver
10. Run `python -m matrix_puppeteer_line -g` to generate an appservice registration file, and update your homeserver configuration to accept it
11. Run the bridge with `python -m matrix_puppeteer_line`
12. Start a chat with the bot and follow the instructions

+ 4
- 4
docker-run.sh View File

@ -2,10 +2,10 @@
# Define functions.
function fixperms {
chown -R $UID:$GID /data /opt/matrix-appservice-line
chown -R $UID:$GID /data /opt/matrix-puppeteer-line
}
cd /opt/matrix-appservice-line
cd /opt/matrix-puppeteer-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 matrix_appservice_line -g -c /data/config.yaml -r /data/registration.yaml
python3 -m matrix_puppeteer_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 matrix_appservice_line -c /data/config.yaml
exec su-exec $UID:$GID python3 -m matrix_puppeteer_line -c /data/config.yaml

matrix_appservice_line/__init__.py → matrix_puppeteer_line/__init__.py View File


matrix_appservice_line/__main__.py → matrix_puppeteer_line/__main__.py View File


matrix_appservice_line/commands/__init__.py → matrix_puppeteer_line/commands/__init__.py View File


matrix_appservice_line/commands/auth.py → matrix_puppeteer_line/commands/auth.py View File


matrix_appservice_line/commands/conn.py → matrix_puppeteer_line/commands/conn.py View File


matrix_appservice_line/commands/typehint.py → matrix_puppeteer_line/commands/typehint.py View File


matrix_appservice_line/config.py → matrix_puppeteer_line/config.py View File


matrix_appservice_line/db/__init__.py → matrix_puppeteer_line/db/__init__.py View File


matrix_appservice_line/db/message.py → matrix_puppeteer_line/db/message.py View File


matrix_appservice_line/db/portal.py → matrix_puppeteer_line/db/portal.py View File


matrix_appservice_line/db/puppet.py → matrix_puppeteer_line/db/puppet.py View File


matrix_appservice_line/db/upgrade.py → matrix_puppeteer_line/db/upgrade.py View File


matrix_appservice_line/db/user.py → matrix_puppeteer_line/db/user.py View File


matrix_appservice_line/example-config.yaml → matrix_puppeteer_line/example-config.yaml View File


matrix_appservice_line/get_version.py → matrix_puppeteer_line/get_version.py View File


matrix_appservice_line/matrix.py → matrix_puppeteer_line/matrix.py View File


matrix_appservice_line/portal.py → matrix_puppeteer_line/portal.py View File


matrix_appservice_line/puppet.py → matrix_puppeteer_line/puppet.py View File


matrix_appservice_line/rpc/__init__.py → matrix_puppeteer_line/rpc/__init__.py View File


matrix_appservice_line/rpc/client.py → matrix_puppeteer_line/rpc/client.py View File


matrix_appservice_line/rpc/rpc.py → matrix_puppeteer_line/rpc/rpc.py View File


matrix_appservice_line/rpc/types.py → matrix_puppeteer_line/rpc/types.py View File


matrix_appservice_line/user.py → matrix_puppeteer_line/user.py View File


matrix_appservice_line/util/__init__.py → matrix_puppeteer_line/util/__init__.py View File


matrix_appservice_line/util/color_log.py → matrix_puppeteer_line/util/color_log.py View File


matrix_appservice_line/version.py → matrix_puppeteer_line/version.py View File


matrix_appservice_line/web/__init__.py → matrix_puppeteer_line/web/__init__.py View File


matrix_appservice_line/web/provisioning_api.py → matrix_puppeteer_line/web/provisioning_api.py View File


+ 3
- 3
puppet/Dockerfile View File

@ -7,11 +7,11 @@ RUN echo $'\
RUN apk add --no-cache chromium@edge
WORKDIR /opt/matrix-appservice-line/puppet
RUN chown node:node /opt/matrix-appservice-line/puppet
WORKDIR /opt/matrix-puppeteer-line/puppet
RUN chown node:node /opt/matrix-puppeteer-line/puppet
USER node
COPY package.json yarn.lock ./
RUN yarn --production && rm -rf node_modules/puppeteer/.local-chromium
COPY . /opt/matrix-appservice-line/puppet
COPY . /opt/matrix-puppeteer-line/puppet
CMD ["yarn", "start", "--config", "/data/config.json", "--browser", "/usr/lib/chromium/chrome", "--no-sandbox"]

+ 1
- 1
puppet/example-config.json View File

@ -1,7 +1,7 @@
{
"listen": {
"type": "unix",
"path": "/var/run/matrix-appservice-line/puppet.sock"
"path": "/var/run/matrix-puppeteer-line/puppet.sock"
},
"profile_dir": "./profiles",
"url": "chrome-extension://<extension-uuid>/index.html",


+ 4
- 4
puppet/package.json View File

@ -1,16 +1,16 @@
{
"name": "matrix-appservice-line-puppeteer",
"name": "matrix-puppeteer-line-puppeteer",
"version": "0.1.0",
"description": "Puppeteer module for matrix-appservice-line",
"description": "Puppeteer module for matrix-puppeteer-line",
"repository": {
"type": "git",
"url": "git://miscworks.net/matrix-appservice-line.git"
"url": "git://miscworks.net/matrix-puppeteer-line.git"
},
"type": "module",
"main": "src/main.js",
"author": "Andrew Ferrazzutti <fair@miscworks.net>",
"license": "AGPL-3.0-or-later",
"homepage": "https://miscworks.net/dir/matrix-appservice-line",
"homepage": "https://miscworks.net/dir/matrix-puppeteer-line",
"scripts": {
"start": "node ./src/main.js"
},


+ 1
- 1
puppet/src/api.js View File

@ -1,4 +1,4 @@
// matrix-appservice-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer
// matrix-puppeteer-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


+ 1
- 1
puppet/src/client.js View File

@ -1,4 +1,4 @@
// matrix-appservice-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer
// matrix-puppeteer-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


+ 1
- 1
puppet/src/contentscript.js View File

@ -1,4 +1,4 @@
// matrix-appservice-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer
// matrix-puppeteer-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


+ 1
- 1
puppet/src/main.js View File

@ -1,4 +1,4 @@
// matrix-appservice-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer
// matrix-puppeteer-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


+ 1
- 1
puppet/src/puppet.js View File

@ -1,4 +1,4 @@
// matrix-appservice-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer
// matrix-puppeteer-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


+ 1
- 1
puppet/src/taskqueue.js View File

@ -1,4 +1,4 @@
// matrix-appservice-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer
// matrix-puppeteer-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


+ 1
- 1
puppet/src/util.js View File

@ -1,4 +1,4 @@
// matrix-appservice-line - A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer
// matrix-puppeteer-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


+ 6
- 6
setup.py View File

@ -1,6 +1,6 @@
import setuptools
from matrix_appservice_line.get_version import git_tag, git_revision, version, linkified_version
from matrix_puppeteer_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("matrix_appservice_line/version.py", "w") as version_file:
with open("matrix_puppeteer_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="matrix-appservice-line",
name="matrix-puppeteer-line",
version=version,
url="git://miscworks.net/matrix-appservice-line",
url="git://miscworks.net/matrix-puppeteer-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={"matrix_appservice_line": [
package_data={"matrix_puppeteer_line": [
"example-config.yaml",
]},
data_files=[
(".", ["matrix_appservice_line/example-config.yaml"]),
(".", ["matrix_puppeteer_line/example-config.yaml"]),
],
)

Loading…
Cancel
Save