1
Fork 0

Remove beancount-import
All checks were successful
build/frp Building image frp
build/base Building image base
build/forgejo Building image forgejo
build/fluentd Building image fluentd
build/node-script Building image node-script
build/python-script Building image python-script
build/ruby-script Building image ruby-script
build/fava Building image fava
build/gotenberg Building image gotenberg
build/lua-clib Building image lua-clib
build/gitea Building images gitea-package, gitea-pr, gitea-status
build/rust-xwin Building image rust-xwin
build/nextcloud Building image nextcloud

Without the configuration that's stored in the development repo,
the image simply breaks.
This commit is contained in:
Lucas Schwiderski 2024-11-25 15:51:00 +01:00
parent e7660beb26
commit 9749813cea
Signed by: lucas
GPG key ID: AA12679AAA6DF4D8
6 changed files with 0 additions and 111 deletions

View file

@ -1,2 +0,0 @@
Dockerfile
.dockerignore

View file

@ -1,24 +0,0 @@
FROM python:3.12.6-slim
COPY requirements.txt /tmp
RUN set -eux; \
pip3 install --break-system-packages -r /tmp/requirements.txt; \
rm -rf \
/root/.cache \
/tmp/requirements.txt \
;
WORKDIR /beancount-import
COPY . .
ENV BEANCOUNT_IMPORT_ARGS="" \
BEANCOUNT_IMPORT_JOURNAL_DIR="/beancount-import/journal" \
BEANCOUNT_IMPORT_DATA_DIR="/beancount-import/data"
EXPOSE 8080
VOLUME ${BEANCOUNT_IMPORT_DATA_DIR}
VOLUME ${BEANCOUNT_IMPORT_JOURNAL_DIR}
CMD [ "python3", "/beancount-import/run.py", "--address", "0.0.0.0", "--port", "8080", "${BEANCOUNT_IMPORT_ARGS}" ]

View file

@ -1,45 +0,0 @@
"""
This config is where you would initialize your importers with personal info
like account number or credit card last4 digit.
you may also define CONFIG:List[ImporterProtocol] for other beancount tools like
bean-identify, bean-file, and other beancount scripts to use
eg. `bean-identify _config.py ~/Downloads`
to identify the files that importers defined here can process
beancount-import should have it's own run.py where you invoke the
`beancount_import.webserver.main` but import the Importer objects from this config
This is the way!!
"""
from beancount.ingest.importers.csv import Importer as CSVImporter, Col
my_foobar_bank_importer = CSVImporter(
{
Col.DATE: "Date",
Col.NARRATION1: "Description",
Col.AMOUNT: "Amount",
},
"Assets:FooBarBank", # account
"EUR", # currency
# regexps used by ImporterProtocol.identify() to identify the correct file
'"Date","Description","Amount"',
)
my_amex_cc_importer = CSVImporter(
{
Col.DATE: "Date",
Col.NARRATION1: "Description",
Col.AMOUNT: "Amount",
Col.BALANCE: "Balance",
},
"Liabilities:Amex-Credit-Card", # account
"EUR", # currency
# regexps used by ImporterProtocol.identify() to identify the correct file
("Date,Description,Amount,Balance", "Credit.*7890"),
skip_lines=1,
)
# beancount's scripts use this
CONFIG = [my_foobar_bank_importer, my_amex_cc_importer]

View file

@ -1,5 +0,0 @@
# beancount-import doesn't specify this constraint itself, but is also
# not compatible with v3. So we need to ensure this here.
beancount<3.0.0
beancount-import==1.4.0
smart_importer==0.5

View file

@ -1,31 +0,0 @@
#!/usr/bin/env python3
import os
import sys
from _config import data_sources
def run_reconcile(extra_args):
import beancount_import.webserver
journal_dir = os.environ["BEANCOUNT_IMPORT_JOURNAL_DIR"]
beancount_import.webserver.main(
extra_args,
journal_input=os.path.join(journal_dir, "main.beancount"),
ignored_journal=os.path.join(journal_dir, "ignored.beancount"),
default_output=os.path.join(journal_dir, "main.beancount"),
open_account_output_map=[
(".*", os.path.join(journal_dir, "accounts.beancount")),
],
balance_account_output_map=[
(".*", os.path.join(journal_dir, "accounts.beancount")),
],
price_output=os.path.join(journal_dir, "prices.beancount"),
data_sources=data_sources,
)
if __name__ == "__main__":
run_reconcile(sys.argv[1:])

View file

@ -36,10 +36,6 @@
"type": "simple",
"name": "forgejo"
},
{
"type": "simple",
"name": "beancount-import"
},
{
"type": "simple",
"name": "frp"