Skip to content

Commit ecc10f8

Browse files
author
Jair de Souza Junior
committed
Initial Commit
0 parents  commit ecc10f8

File tree

16 files changed

+1773
-0
lines changed

16 files changed

+1773
-0
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

CODE_OF_CONDUCT.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at [email protected]. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq

CONTRIBUTING.md

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
# Contributing to OFX2XLS
2+
3+
Thanks for taking the time to contribute!
4+
5+
The following is a set of guidelines for contributing to OFX2XLS and its packages. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
6+
7+
#### Table Of Contents
8+
9+
[Code of Conduct](#code-of-conduct)
10+
11+
[How Can I Contribute?](#how-can-i-contribute)
12+
* [Reporting Bugs](#reporting-bugs)
13+
* [Suggesting Enhancements](#suggesting-enhancements)
14+
* [Your First Code Contribution](#your-first-code-contribution)
15+
* [Pull Requests](#pull-requests)
16+
17+
[Styleguides](#styleguides)
18+
* [Git Commit Messages](#git-commit-messages)
19+
20+
## Code of Conduct
21+
22+
This project and everyone participating in it is governed by the [Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [[email protected]](mailto:[email protected]).
23+
24+
## What should I know before I get started?
25+
26+
### OFX2XLS
27+
28+
OFX2XLS is an small open source project. This project depends on below projects. If you consider contributing with OFX2XLS, you should be know this other projects.
29+
* [banking](https://github.com/euforic/banking.js)
30+
* [exceljs](https://github.com/exceljs/exceljs)
31+
* [express](https://github.com/expressjs/express)
32+
* [lodash](https://github.com/lodash/lodash)
33+
34+
## How Can I Contribute?
35+
36+
### Reporting Bugs
37+
38+
This section guides you through submitting a bug report for OFX2XLS. Following these guidelines helps maintainers and the community understand your report :pencil:, reproduce the behavior :computer: :computer:, and find related reports :mag_right:.
39+
40+
Before creating bug reports, please check [this list](#before-submitting-a-bug-report) as you might find out that you don't need to create one. When you are creating a bug report, please [include as many details as possible](#how-do-i-submit-a-good-bug-report). Fill out [the required template](ISSUE_TEMPLATE.md), the information it asks for helps us resolve issues faster.
41+
42+
> **Note:** If you find a **Closed** issue that seems like it is the same thing that you're experiencing, open a new issue and include a link to the original issue in the body of your new one.
43+
44+
#### How Do I Submit A (Good) Bug Report?
45+
46+
Bugs are tracked as [GitHub issues](https://guides.github.com/features/issues/). After you've determined which repository your bug is related to, create an issue on that repository and provide the following information by filling in [the template](ISSUE_TEMPLATE.md).
47+
48+
Explain the problem and include additional details to help maintainers reproduce the problem:
49+
50+
* **Use a clear and descriptive title** for the issue to identify the problem.
51+
* **Describe the exact steps which reproduce the problem** in as many details as possible.
52+
* **Provide specific examples to demonstrate the steps**. Include links to files or GitHub projects, or copy/pasteable snippets, which you use in those examples. If you're providing snippets in the issue, use [Markdown code blocks](https://help.github.com/articles/markdown-basics/#multiple-lines).
53+
* **Describe the behavior you observed after following the steps** and point out what exactly is the problem with that behavior.
54+
* **Explain which behavior you expected to see instead and why.**
55+
* **Include screenshots and animated GIFs** which show you following the described steps and clearly demonstrate the problem.
56+
* **If the problem wasn't triggered by a specific action**, describe what you were doing before the problem happened and share more information using the guidelines below.
57+
58+
Provide more context by answering these questions:
59+
60+
* **Did the problem start happening recently** (e.g. after updating to a new version) or was this always a problem?
61+
* If the problem started happening recently, **can you reproduce the problem in an older version?** What's the most recent version in which the problem doesn't happen?
62+
* **Can you reliably reproduce the issue?** If not, provide details about how often the problem happens and under which conditions it normally happens.
63+
64+
Include details about your configuration and environment:
65+
66+
* **Which version are you using?**
67+
* **What's the name and version of the OS you're using**?
68+
69+
### Suggesting Enhancements
70+
71+
This section guides you through submitting an enhancement suggestion, including completely new features and minor improvements to existing functionality. Following these guidelines helps maintainers and the community understand your suggestion :pencil: and find related suggestions :mag_right:.
72+
73+
Before creating enhancement suggestions, please check [this list](#before-submitting-an-enhancement-suggestion) as you might find out that you don't need to create one. When you are creating an enhancement suggestion, please [include as many details as possible](#how-do-i-submit-a-good-enhancement-suggestion). Fill in [the template](ISSUE_TEMPLATE.md), including the steps that you imagine you would take if the feature you're requesting existed.
74+
75+
#### Before Submitting An Enhancement Suggestion
76+
77+
* **Perform a cursory search** to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
78+
79+
#### How Do I Submit A (Good) Enhancement Suggestion?
80+
81+
Enhancement suggestions are tracked as [GitHub issues](https://guides.github.com/features/issues/). After you've determined which repository your enhancement suggestion is related to, create an issue on that repository and provide the following information:
82+
83+
* **Use a clear and descriptive title** for the issue to identify the suggestion.
84+
* **Provide a step-by-step description of the suggested enhancement** in as many details as possible.
85+
* **Provide specific examples to demonstrate the steps**. Include copy/pasteable snippets which you use in those examples, as [Markdown code blocks](https://help.github.com/articles/markdown-basics/#multiple-lines).
86+
* **Describe the current behavior** and **explain which behavior you expected to see instead** and why.
87+
* **Include screenshots and animated GIFs** which help you demonstrate the steps or point out the part of this project which the suggestion is related to. You can use [this tool](https://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and [this tool](https://github.com/colinkeenan/silentcast) or [this tool](https://github.com/GNOME/byzanz) on Linux.
88+
* **Explain why this enhancement would be useful** to most of users.
89+
* **Specify the name and version of the OS you're using.**
90+
91+
### Your First Code Contribution
92+
93+
Unsure where to begin contributing? You can start by looking through these `beginner` and `help-wanted` issues:
94+
95+
* [Beginner issues][beginner] - issues which should only require a few lines of code, and a test or two.
96+
* [Help wanted issues][help-wanted] - issues which should be a bit more involved than `beginner` issues.
97+
98+
Both issue lists are sorted by total number of comments. While not perfect, number of comments is a reasonable proxy for impact a given change will have.
99+
100+
### Pull Requests
101+
102+
The process described here has several goals:
103+
104+
- Maintain project quality
105+
- Fix problems that are important to users
106+
- Engage the community in working toward the best possible product
107+
- Enable a sustainable system for project maintainers to review contributions
108+
109+
After you submit your pull request, verify that all [status checks](https://help.github.com/articles/about-status-checks/) are passing <details><summary>What if the status checks are failing?</summary>If a status check is failing, and you believe that the failure is unrelated to your change, please leave a comment on the pull request explaining why you believe the failure is unrelated. A maintainer will re-run the status check for you. If we conclude that the failure was a false positive, then we will open an issue to track that problem with our status check suite.</details>
110+
111+
While the prerequisites above must be satisfied prior to having your pull request reviewed, the reviewer(s) may ask you to complete additional design work, tests, or other changes before your pull request can be ultimately accepted.
112+
113+
## Styleguides
114+
115+
### Git Commit Messages
116+
117+
* Use the present tense ("Add feature" not "Added feature")
118+
* Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
119+
* Limit the first line to 72 characters or less
120+
* Reference issues and pull requests liberally after the first line
121+
* When only changing documentation, include `[ci skip]` in the commit title

Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM node:8-alpine
2+
3+
WORKDIR /app
4+
5+
ADD ./package.json .
6+
7+
RUN npm install
8+
9+
ADD . .
10+
11+
CMD ["npm", "start"]

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) Labbs
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# OFX2XLS - Converting OFX files to XLS &middot; [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)]
2+
3+
## Getting Started
4+
5+
### Requirements
6+
7+
Docker
8+
Docker-compose
9+
10+
### Build and Run
11+
12+
To build and start the container with this api, please run at the root directory of this project:
13+
14+
```
15+
docker-compose up --build
16+
```
17+
18+
When the container is up, you can check at your browser if the service is working accessing *http:\\localhost:3000*. If everything is working you will receive a message "Up and Running!"
19+
20+
To convert a file you can use the *curl* command at your terminal, replacing the **yourOFXFile.ofx** with the path of your OFX file and **yourOFXFile.xls** with the path of your will save your converted file.
21+
22+
```
23+
curl -F '[email protected]' http://localhost:3000/convert/upload -o yourOFXFile.xls
24+
```
25+
26+
## Contributing
27+
28+
Read below to learn how you can take part in improving this project.
29+
30+
### [Code of Conduct](./CODE_OF_CONDUCT.md)
31+
32+
Labbs has adopted a Code of Conduct that we expect project participants to adhere to. Please read [the full text](./CODE_OF_CONDUCT.md) so that you can understand what actions will and will not be tolerated.
33+
34+
### [Contributing Guide](./CONTRIBUTING.md)
35+
36+
Read our [contributing guide](./CONTRIBUTING.md) to learn about our development process, how to propose bugfixes and improvements.
37+
38+
### License
39+
40+
OFX2XLS is [MIT licensed](./LICENSE).
41+
42+

app.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
var express = require('express');
2+
var path = require('path');
3+
var cookieParser = require('cookie-parser');
4+
var logger = require('morgan');
5+
var fileUpload = require('express-fileupload');
6+
7+
var indexRouter = require('./routes/index');
8+
var convertRouter = require('./routes/convert');
9+
10+
var app = express();
11+
12+
app.use(logger('dev'));
13+
app.use(express.json());
14+
app.use(express.urlencoded({ extended: false }));
15+
app.use(cookieParser());
16+
app.use(express.static(path.join(__dirname, 'public')));
17+
app.use(fileUpload());
18+
19+
app.use('/', indexRouter);
20+
app.use('/convert', convertRouter);
21+
22+
module.exports = app;

bin/www

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
#!/usr/bin/env node
2+
3+
/**
4+
* Module dependencies.
5+
*/
6+
7+
var app = require('../app');
8+
var debug = require('debug')('ofx2xls:server');
9+
var http = require('http');
10+
11+
/**
12+
* Get port from environment and store in Express.
13+
*/
14+
15+
var port = normalizePort(process.env.PORT || '3000');
16+
app.set('port', port);
17+
18+
/**
19+
* Create HTTP server.
20+
*/
21+
22+
var server = http.createServer(app);
23+
24+
/**
25+
* Listen on provided port, on all network interfaces.
26+
*/
27+
28+
server.listen(port);
29+
server.on('error', onError);
30+
server.on('listening', onListening);
31+
32+
/**
33+
* Normalize a port into a number, string, or false.
34+
*/
35+
36+
function normalizePort(val) {
37+
var port = parseInt(val, 10);
38+
39+
if (isNaN(port)) {
40+
// named pipe
41+
return val;
42+
}
43+
44+
if (port >= 0) {
45+
// port number
46+
return port;
47+
}
48+
49+
return false;
50+
}
51+
52+
/**
53+
* Event listener for HTTP server "error" event.
54+
*/
55+
56+
function onError(error) {
57+
if (error.syscall !== 'listen') {
58+
throw error;
59+
}
60+
61+
var bind = typeof port === 'string'
62+
? 'Pipe ' + port
63+
: 'Port ' + port;
64+
65+
// handle specific listen errors with friendly messages
66+
switch (error.code) {
67+
case 'EACCES':
68+
console.error(bind + ' requires elevated privileges');
69+
process.exit(1);
70+
break;
71+
case 'EADDRINUSE':
72+
console.error(bind + ' is already in use');
73+
process.exit(1);
74+
break;
75+
default:
76+
throw error;
77+
}
78+
}
79+
80+
/**
81+
* Event listener for HTTP server "listening" event.
82+
*/
83+
84+
function onListening() {
85+
var addr = server.address();
86+
var bind = typeof addr === 'string'
87+
? 'pipe ' + addr
88+
: 'port ' + addr.port;
89+
debug('Listening on ' + bind);
90+
}

0 commit comments

Comments
 (0)