rapina

package module
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 23, 2018 License: MIT Imports: 20 Imported by: 0

README ยถ

๐š›๐šŠ๐š™๐š’๐š—๐šŠ

Download and process Brazilian companies' financial data directly from CVM web server:

http://dados.cvm.gov.br/dados/CIA_ABERTA/DOC/DFP/

GitHub release Travis License

Commands

Download and store financial data into the local database

./rapina get

It downloads all files from CVM web server, parses their contents and stores on a sqlite database at .data/rapina.db.

This command must be run at least once before you run the report.

List all companies

./rapina list

Create a spreadsheet with a company financial data

./rapina report [flags] company_name
Options
  -d, --outputDir string   Output directory
  -s, --scriptMode         Does not show companies list; uses the most similar
                           company name [default: ./reports]

On Linux or macOS, use the arrow keys to navigate through the companies list. On Windows, use j and k.

Examples
./rapina report WEG

The spreadsheet will be saved at ./reports

./rapina report "TEC TOY" -s -d /tmp/output

The spreadsheet will be saved at /tmp/output

How to compile

  1. Clone this repo to your PC (git clone https://github.com/dude333/rapina)
  2. Change to CLI directory (cd rapina/cli)
  3. Compile using the Makefile (make). To cross compile for Windows on Linux, use make win.

Contributing

  1. Fork it
  2. Download your fork to your PC (git clone https://github.com/your_username/rapina && cd rapina)
  3. Create your feature branch (git checkout -b my-new-feature)
  4. Make changes and add them (git add .)
  5. Commit your changes (git commit -m 'Add some feature')
  6. Push to the branch (git push origin my-new-feature)
  7. Create new pull request

License

MIT

Documentation ยถ

Index ยถ

Constants ยถ

This section is empty.

Variables ยถ

This section is empty.

Functions ยถ

func FetchCVM ยถ

func FetchCVM() (err error)

FetchCVM fetches all statements from a range of years

func ListCompanies ยถ

func ListCompanies() (err error)

ListCompanies a company from DB to Excel

func Report ยถ

func Report(company string, path string) (err error)

Report a company from DB to Excel

func SelectCompany ยถ

func SelectCompany(company string, scriptMode bool) string

SelectCompany returns the company name compared to the names stored in the DB

func Unzip ยถ

func Unzip(src string, dest string) ([]string, error)

Unzip will decompress a zip archive, moving all files and folders within the zip file (parameter 1) to an output directory (parameter 2). Source: https://golangcode.com/unzip-files-in-go/

Types ยถ

This section is empty.

Directories ยถ

Path Synopsis
cli
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL