Comments (5)
Thanks for the report, it looks like the format changed in the last 3 years; it should now be %Y-%m-%dT%T%Q%Z
. If you confirm, I'll update the example.
from hledger.
(Or if you find other issues, a PR is welcome.)
from hledger.
That does work! Thanks. If I find any more I will PR.
from hledger.
Actually the transactions CSV is more detailed now:
# 2021
# ID,Type,Amount,Date & time,Status,Addresses from,Addresses to,Withdrawals
fields id,type,amount,date,status_,addressesfrom,addressesto,withdrawals
# 2024 (5.3)
# ID,Type,TOTAL (ADA),Sent amount (ADA),Deposit amount (ADA),Fee (ADA),Tokens (unformatted amounts),Date & time,Status,Addresses from,Addresses to,Withdrawals
fields id, type, total_ada, sent_amount_ada, deposit_amount_ada, fee_ada, tokens, datetime, status, addresses_from, addresses_to, withdrawals
Let us know if you come up with a decent set of rules; I'll do the same.
from hledger.
I got sucked in to the puzzle. Here's my attempt:
# hledger CSV conversion rules for Daedalus's transactions export. Tested with daedalus 5.3.
# ID,Type,TOTAL (ADA),Sent amount (ADA),Deposit amount (ADA),Fee (ADA),Tokens (unformatted amounts),Date & time,Status,Addresses from,Addresses to,Withdrawals
fields id, type, total_ada, sent_ada, deposit_ada, fee_ada, tokens, datetime, status_, addresses_from, addresses_to, withdrawals
skip 1
date %datetime
date-format %Y-%m-%dT%T%Q%Z
newest-first
if ! %status_ Confirmed
status !
description %type %tokens
account1 assets:cc:cardano:wallet1:YYYY-MM-DD
# Received
# posting 1 is for the wallet
# posting 2 is for the source
if %type Received
comment \nfrom: %addresses_from\nto: %addresses_to\nwithdrawals: %withdrawals\ndatetime: %datetime\nstatus: %status_\ncc-ada-acquire:
amount %total_ada ADA
comment1 TODO: add lot date & cost
# Sent
# posting 1 is for the wallet
# posting 2 is for deposits
# posting 3 is for fees
# posting 4 is for the destination
if %type Sent
comment \nfrom: %addresses_from\nto: %addresses_to\nwithdrawals: %withdrawals\ndatetime: %datetime\nstatus: %status_\ncc-ada-dispose:\nTODO: select source lots; add costs & prices & gain/loss
amount1 %total_ada ADA
if %type Sent
& %deposit_ada [1-9]
amount2 %deposit_ada ADA
account2 assets:cc:cardano:wallet1:deposit
description %type deposit
if %type Sent
& %fee_ada [1-9]
amount3 %fee_ada ADA
account3 expenses:fees:cardano
# The CSV duplicates the amount in sent deposit transactions so we need to avoid those here.
# &! is not yet supported, work around with regexp.
if %type Sent
& %sent_ada [1-9]
& %deposit_ada ^[^1-9]*$
amount4 %sent_ada ADA
account4 expenses:unknown
# Categorise manually, or add categorising rules below.
if %addresses_to addr1alksjdflkjsadfff098234lkjlkjasfd09234jlljkasdf09234jl
account4 assets:cc:cardano:wallet2:YYYY-MM-DD
comment4 TODO: add lot date & cost
Manual fixups are required, but the result is pretty useful I think.
from hledger.
Related Issues (20)
- csv: use existing journal entries as a source of implicit rules
- equity --opening produces a journal that cannot be read HOT 2
- in expr: queries, open-ended date periods are not OR'd correctly HOT 5
- `expr:` OR queries with date: are not handled correctly HOT 15
- Support --sort for register command
- Documentation: if|table, priority of search patterns HOT 12
- hledger-ui : Quickly change status of an entry HOT 1
- Make the newest version apt binaries available for Ubuntu 22.04.x LTS HOT 7
- print: preserve Ledger-specific lot syntax in amounts, even if unsupported
- CSV files, variable number of fields
- Extra BOM in CSV file, hledger reports an error HOT 6
- roi valuation refuses to unify accounts, gives incorrect recommendation HOT 7
- directives from included files have are ignored HOT 4
- date2-format for date2, CSV import HOT 1
- Project level default configuration should be possible without user intervention HOT 5
- Inconsistent Decimal Mark Handling after CSV Import with Rules HOT 2
- 1.25: balance reports' HTML output stopped showing digit group marks HOT 1
- roi command includes unwanted amounts when given a period and dates on postings. HOT 6
- `stack8.10.yaml`, build failure `NonEmpty` does not export `singleton` HOT 3
- incorrect prices for "daily" roi HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hledger.