Compare commits

...

11 commits

7 changed files with 19 additions and 9 deletions

View file

@ -3,7 +3,7 @@ WORKDIR /app
RUN apt-get update && apt-get install -y wget
ARG GECKODRIVER_VERSION="v0.30.0"
ARG GECKODRIVER_FILENAME="geckodriver-$GECKODRIVER_VERSION-linux64"
RUN wget -q https://github.com/mozilla/geckodriver/releases/download/v0.30.0/$GECKODRIVER_FILENAME.tar.gz && tar xvf $GECKODRIVER_FILENAME.tar.gz && rm $GECKODRIVER_FILENAME.tar.gz
RUN wget -q https://github.com/mozilla/geckodriver/releases/download/$GECKODRIVER_VERSION/$GECKODRIVER_FILENAME.tar.gz && tar xvf $GECKODRIVER_FILENAME.tar.gz && rm $GECKODRIVER_FILENAME.tar.gz
FROM python:3.10-slim-bullseye as final
RUN apt-get update && apt-get install -y firefox-esr

View file

@ -53,3 +53,6 @@ git commit
inv tag <version>
inv publish publish-docker
```
# Reuse
If you do reuse my work, please consider linking back to this repository 🙂

View file

@ -31,7 +31,7 @@ class LclDownloader:
"browser.helperApps.neverAsk.saveToDisk", "application/x-ofx"
)
self.selenium = webdriver.Firefox(options=options)
self.selenium.implicitly_wait(10)
self.selenium.implicitly_wait(30)
def download(self) -> str:
selenium = self.selenium

View file

@ -80,7 +80,7 @@ class LclProcessor(OfxBaseProcessor):
return ofx
def main(filename, keep, download, send_method):
def main(filename, keep, download, send_method, push_to_ynab):
"""Import LCL bank statement (OFX file)."""
if download:
if filename:
@ -93,4 +93,5 @@ def main(filename, keep, download, send_method):
processor = LclProcessor(filename)
if send_method:
processor.send_reconciled_amount(send_method)
processor.push_to_ynab(keep)
if push_to_ynab:
processor.push_to_ynab(keep)

View file

@ -38,6 +38,13 @@ ARG_TO_OPTION = {
default="",
show_default=True,
),
"push_to_ynab": click.option(
"push_to_ynab",
"--push/--no-push",
help="Push the data to YNAB.",
default=True,
show_default=True,
),
}

View file

@ -1,9 +1,8 @@
[tool.poetry]
name = "ofx-processor"
version = "4.0.0"
version = "4.1.0"
description = "Personal ofx processor"
readme = "README.md"
license = "Unlicense"
authors = ["Gabriel Augendre <gabriel@augendre.info>"]
homepage = "https://git.augendre.info/gaugendre/ofx-processor"
repository = "https://git.augendre.info/gaugendre/ofx-processor"
@ -16,7 +15,7 @@ classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"License :: OSI Approved :: The Unlicense (Unlicense)",
"Natural Language :: English",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",

View file

@ -42,9 +42,9 @@ def publish(ctx):
@task
def publish_docker(ctx):
with ctx.cd(BASE_DIR):
docker_image = "rg.fr-par.scw.cloud/crocmagnon/ynab"
docker_image = "crocmagnon/ynab"
ctx.run(
f"docker build --build-arg OFX_VERSION=$(poetry version -s) -t {docker_image} .",
f"docker build --pull --platform linux/amd64 --build-arg OFX_VERSION=$(poetry version -s) -t {docker_image} .",
pty=True,
echo=True,
)