Code Monkey home page Code Monkey logo

estratto's People

Contributors

atul9 avatar betogrun avatar dependabot[bot] avatar rynaro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

estratto's Issues

Allow Document entry point accept File and Yaml objects

In version 1.0.0 we only accept file paths as parameters in Document entry point.
One great improvement to gem is accept the File, and YAML objects from caller system. This feature makes gem more flexible for integration.

Implement allow_empty field for formats

Third-party files sometimes has lack of data integrity. It's not uncommon, you need to parse a date (like birthdate), and third-party file does not contain this information in the specified range.
Today, estratto raises error trying to parse the date format, 'cause ' ' isnt valid date to parse.


Proposal change:

In formats node, we'll insert a new property called allow_empty receiving a boolean value. When this value was true, estratto will return nil value to avoid any problems, and keeping data integrity. (Using premise, if we don't get data from range, a nil data can describe the actual state)
If value is false or allow_empty omitted, estratto will raise errors as default behaviour.


Technical usage proposal:

        - name: birthdate
          range: 137..144
          type: DateTime
          formats:
            allow_empty: true
            format: '%Y%m%d'

Update README to include ICU dependency

Estratto uses the CharlockHolmes gem which depends on ICU to check the input file encoding.
It is necessary to add a section on README describing this dependency and provide install instructions for libicu-dev otherwise the user may face the following error message:

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

Creating mono layout support

Estratto was builted with intent to deal with multi-layout as primary context, but one of most common layout type of fixed width.

In mono layout type generally has header, and footer, that these lines do not shares the same pattern of principal content lines.

Suggested initial point of this feature:

layout:
  name: 'monolayout'
  multi-register: false # or nonexistent key
  header: true
  footer: true
  registers:
    - header:
     # content
    - register:
     # content
    - footer:
     # content

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.