GithubHelp home page GithubHelp logo

iron-e / winvoice-cli Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 3.44 MB

Invoice from the command line!

License: Other

Rust 100.00%
cli command-line command-line-tool invoice invoice-generator invoice-software markdown rust terminal winvoice

winvoice-cli's Introduction

Winvoice

Winvoice is a WIP program to manage invoices from the command-line.

Motivation

There is a lack of programs for CLI invoice maintenance, especially those which are able to export invoices in a presentable manner.

Installation

Requirements:

  • cargo

Run the following command in a terminal:

cargo install winvoice --features=<adapters>
  • Any desired storage implementations (e.g. Bincode, PostgreSQL) should be listed in place of <adapters>.

NOTE: This application has not yet been uploaded to crates.io!

Source

  1. Download this repository from GitHub:
    git clone https://github.com/Iron-E/winvoice
  2. cd to the directory which git just created.
  3. Use cargo to build and install the cloned repo:
    cargo install --features=<adapters> --path=. --root=<desired install folder>

Configuration

Run winvoice config to edit the configuration file for this program. See the documentation of Config for more information about the configuration file and its options.

Usage

  • For basic information, run winvoice help from the command line.
  • For an in-depth guide, see the wiki.

winvoice-cli's People

Contributors

iron-e avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

bram209

winvoice-cli's Issues

Allow querying during `clinvoice create` operations

Right now, one can only be presented with an input::select / input::select_one prompt with every single entity in the system (of the proper type) when being asked to create a new entity which references another (e.g., Organization references Location). Instead, we should allow users to query this information if they choose.

Take care to remove duplicate logic between clinvoice create and clinvoice retrieve while doing so.

Only show `Employee` `Contact` information once per exported `Job`

Right now, every Job which is exported shows the Employee's Contact information every time that the Employee appears in the Job. We should build a HashSet of Employees which have already been shown on the Job, and skip exporting that Employee's Contact info if they appear again.

Bincode Adapter retrieve functions sometimes fail

Occasionally, the retrieve functions implemented for the bincode adapter will fail. The reason for this is unknown, although I suspect it has to do with one of the following reasons:

  • Using the temporary directory for tests.
  • Parallelization of tests in rust.

This issue is especially strange since the implementation of clinvoice_adapter_bincode::util::read_files. It should, in theory, ensure that all filesystem nodes iterated over by the caller are valid files. Yet, somehow a node can be a valid file during the filter operation and then immediately become a non-file after the filter is over.

However, since this issue cannot be consistently reproduced it is low-priority.

Create `query` to SQL functionality

The current query lib works on in-memory types. It would be very inefficient to request all rows from a database, rather than query them.

Retry queries if no results are found

Provided that CLInvoice expects that a user's query will return a result, if nothing is returned the program will simply exit. There should be a prompt for users to retry a query if no results are found, and if so, the query will run again. If not, the program will exit with the same error as before.

Make `Timesheet` and `Job` a relation rather than aggregation

If multiple people want to submit a Timesheet at the same time, a database may drop entries while others submit:

  1. Person A downloads data in state 1.
  2. Person B downloads data in state 1.
  3. Person B uploads data in state 2b.
  4. Person A uploads data in state 2a, overwriting changes made in 2b.

Pass active connection to adapters

Currently, if I wanted to implement sqlx I would have to reconnect to the selected database every single time a function is run on an Adapter. This is obviously a problem.

Improve query prompts

Right now, queries will give users no hint as to why they are querying. It will only show a link to the page in the CLInvoice wiki where documentation for the query can be found.

We should show users some text which shows why they are querying.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.