Skip to content

Commit

Permalink
Merge pull request #36
Browse files Browse the repository at this point in the history
merge refactor-7bf4ef45 with master
  • Loading branch information
sssomeshhh authored Nov 9, 2022
2 parents 7bf4ef4 + 7d3881e commit 17bf0d6
Show file tree
Hide file tree
Showing 8 changed files with 255 additions and 224 deletions.
4 changes: 3 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.git
.gitignore
.github
.gitignore
.gitmodules
.run
deploy
5 changes: 3 additions & 2 deletions .run/Dockerfile.run.xml → .run/BuildAndRun.run.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Dockerfile" type="docker-deploy" factoryName="dockerfile" server-name="Docker">
<configuration default="false" name="BuildAndRun" type="docker-deploy" factoryName="dockerfile" server-name="Docker">
<deployment type="dockerfile">
<settings>
<option name="imageTag" value="ghcr.io/ksssomesh12/tgmb-beta:app" />
<option name="imageTag" value="tgmb:app" />
<option name="buildKitEnabled" value="true" />
<option name="containerName" value="tgmb-app" />
<option name="sourceFilePath" value="Dockerfile" />
</settings>
Expand Down
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ RUN locale-gen en_US.UTF-8
RUN pip3 install --no-cache-dir /root/sdk/bindings/python/dist/megasdk-*.whl
WORKDIR /usr/src/app
RUN chmod 777 /usr/src/app
COPY requirements.txt .
RUN pip3 install --no-cache-dir -r requirements.txt
COPY Pipfile .
COPY grt.py .
RUN python3 grt.py && pip3 install --no-cache-dir -r requirements.txt
COPY tgmb tgmb
CMD ["python3", "-m", "tgmb"]
16 changes: 8 additions & 8 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ verify_ssl = true
name = "pypi"

[packages]
aria2p = "==0.10.4"
google-api-python-client = "==2.7.0"
aria2p = "==0.11.2"
google-api-python-client = "==2.65.0"
google-auth-httplib2 = "==0.1.0"
google-auth-oauthlib = "==0.4.4"
psutil = "==5.8.0"
python-magic = "==0.4.24"
python-telegram-bot = "==13.5"
qbittorrent-api = "==2021.8.23"
google-auth-oauthlib = "==0.7.1"
psutil = "==5.9.4"
python-magic = "==0.4.27"
python-telegram-bot = "==13.14"
qbittorrent-api = "==2022.10.39"
torrentool = "==1.1.1"
youtube_dl = "==2021.6.6"
youtube_dl = "==2021.12.17"

[dev-packages]
build = "*"
Expand Down
208 changes: 108 additions & 100 deletions Pipfile.lock

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions grt.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import re

if __name__ == '__main__':
fPipfile = 'Pipfile'
fRequirements = 'requirements.txt'
with open(fPipfile, 'rt') as fP:
pipfileContents = fP.read()
rSearch = r"\[packages\]\n[a-zA-Z0-9 =._\-\"\n]*"
sSearch: list[str] = re.findall(rSearch, pipfileContents)
requirementsContents = sSearch[0].replace(' = "', '').replace('"\n', '\n').replace('[packages]\n', '')
with open(fRequirements, 'wt') as fR:
fR.write(requirementsContents)
10 changes: 0 additions & 10 deletions requirements.txt

This file was deleted.

219 changes: 118 additions & 101 deletions tgmb/__init__.py

Large diffs are not rendered by default.

0 comments on commit 17bf0d6

Please sign in to comment.