Skip to content

vcolella/SINACOR-PARSER

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SINACOR-PARSER

Parser gratuito para notas de corretagem no formato SINACOR que não requer conexão com internet ou compartilhamento de suas notas de corretagem.

O objetivo inicial é fornecer um resumo simples da quantidade de cotas de cada ativo, preço médio e total do patrimônio.


Running in command line:

  1. Add all of your pdf notes to the pdf directory.
  2. Open a terminal window and navigate to the repo's root.
  3. Run the script parser.py
    $  python .\parser.py

    ⚠️ CAUTION : This tool is under development and might generate wrong results. Thus, I don't take any responsability for the reliability of the generated data.

Running programmatically:

Instantiating

If you're running your script from the repo's root, create a parser object with:

from sinacor_parser import SinacorParser

parser = SinacorParser()

 
By default, the pdfs with broker notes are read from the .\pdf directory. If you wish to read from anywhere else, use the pdf_directory keyword :

parser = SinacorParser(pdf_directory="full_path_to_directory")

Processing

To start reading the pdfs, run :

report, negotiations = parser.process()

where report and negotiations are dataframes with the extracted data.

Exporting

Finally, to export the data to a spreadsheet use:

parser.export()

or

parser.export(output_name="my_name_without_extension")

to specify the name of the spreadsheet. If no keyword is provided, the default name of the output is output.xlsx and it's saved to the .\output directory.


TODO

  • Implement import as module
  • Reorganize files for repo
  • Split reports by cpf
  • Track sales
  • Calculate DARF for sales
  • Implement export to spreadsheet
  • Read files with multiple pages
  • Skip repeated notes
  • Adicionar exportação de csv

Releases

No releases published

Packages

No packages published

Languages