Support conversion from Close to Directive

korrat
Apr 10, 2024, 4:44 PM
FAYDFOUWD22FVQMENDPRNSDDXM5WZA3LEOSXF3GJFUQIY5IUNQJAC

Dependencies

  • [2] TRPNBZBO Support conversion from Open to Directive
  • [3] NSWL54NM allow deriving pretty printing config from a set of directives
  • [4] 6MYJDQ3I Handle price directives
  • [*] YDK6X6PP add a library of important types for beancount
  • [*] 2JBFREZG enable additional warnings
  • [*] R524JUUE Implement metadata & price directives
  • [*] D6UTHZA4 add a simple writer for saving a set of directives to a tree of files
  • [*] QRIJE4AQ add a simple pretty printer for beancount directives
  • [*] PCHAKXNM Add an importer for Fidor account statements

Change contents

  • edit in common/beancount-types/src/lib.rs at line 47
    [7.4427]
    [2.148]
    Close(Close),
  • edit in common/beancount-types/src/lib.rs at line 63
    [8.11234]
    [2.165]
    Self::Close(inner) => {
    inner.add_meta(key, value);
    }
  • edit in common/beancount-types/src/lib.rs at line 86
    [2.307]
    [2.307]
    Self::Close(inner) => inner.date,
  • edit in common/beancount-types/src/lib.rs at line 110
    [2.509]
    [2.509]
    Self::Close(inner) => Some(&inner.account),
  • edit in common/beancount-types/src/lib.rs at line 121
    [2.683]
    [2.683]
    Self::Close(inner) => inner.timestamp(),
  • edit in common/beancount-types/src/lib.rs at line 133
    [2.879]
    [2.879]
    Self::Close(inner) => inner,
  • edit in common/beancount-types/src/lib.rs at line 146
    [2.1152]
    [2.1152]
    }
    }
    impl From<Close> for Directive {
    fn from(inner: Close) -> Self {
    Self::Close(inner)
  • edit in common/beancount-tree-writer/src/lib.rs at line 16
    [8.13551]
    [8.13551]
    use beancount_types::Close;
  • edit in common/beancount-tree-writer/src/lib.rs at line 120
    [2.1489]
    [2.1489]
    | Directive::Close(Close { date, account, .. })
  • edit in common/beancount-pretty-printer/src/lib.rs at line 8
    [10.146]
    [11.21046]
    use beancount_types::Close;
  • edit in common/beancount-pretty-printer/src/lib.rs at line 160
    [3.414]
    [2.1626]
    Directive::Close(close) => self.print_close(close),
  • edit in common/beancount-pretty-printer/src/lib.rs at line 184
    [10.2487]
    [2.1687]
    }
    fn print_close(&mut self, close: &Close) -> Result<()> {
    write!(self.inner, "{close}")
  • edit in common/beancount-pretty-printer/src/lib.rs at line 402
    [3.4928]
    [3.4928]
    Directive::Close(_) | Directive::Open(_) | Directive::Price(_) => {
    Either::Left(rayon::iter::once(Self::zero()))
    }
  • edit in common/beancount-pretty-printer/src/lib.rs at line 409
    [3.5071][2.1790:1871](),[2.1871][3.590:672](),[3.5071][3.590:672]()
    Directive::Open(_) => Either::Left(rayon::iter::once(Self::zero())),
    Directive::Price(_) => Either::Left(rayon::iter::once(Self::zero())),