Skip to content

Commit 2ef3dca

Browse files
csv report
1 parent 26daf41 commit 2ef3dca

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

apps/cli.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,14 @@ def cli():
6161
@option_cronologico
6262
@option_conjunto
6363
@option_html
64+
@option_csv
6465
@option_posnw
6566
@option_nomearquivo
6667
@option_limInf
6768
@option_limSup
6869
@option_boxplot
6970
@option_usinas
70-
def realiza_report(outpath, arquivo_json, txt, nomearquivo, tipo, automatico, cronologico, conjunto, html, posnw, liminf, limsup, boxplot, usinas):
71+
def realiza_report(outpath, arquivo_json, txt, nomearquivo, tipo, automatico, cronologico, conjunto, html, posnw, liminf, limsup, boxplot, usinas,csv):
7172
start_time = time.time()
7273
cores = ["black", "red", "blue", "yellow", "gray", "green","purple","darkgreen", "darkblue","royalblue","skyblue","gold"]
7374
contador = 0
@@ -152,7 +153,7 @@ def realiza_report(outpath, arquivo_json, txt, nomearquivo, tipo, automatico, cr
152153
arquivo_json = "exemplo_conj.json"
153154

154155
from apps.services.report import Report
155-
Report(outpath, arquivo_json, txt, nomearquivo, tipo, cronologico, conjunto, html, posnw, liminf, limsup, boxplot, usinas)
156+
Report(outpath, arquivo_json, txt, nomearquivo, tipo, cronologico, conjunto, html, posnw, liminf, limsup, boxplot, usinas,csv)
156157
end_time = time.time()
157158
elapsed_time = end_time - start_time
158159
minutes = int(elapsed_time // 60)

apps/services/report.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from apps.services.temporal import Temporal
2020

2121
class Report():
22-
def __init__(self,outpath, arq_json, txt, nomearquivo, tipo, cronologico, conjunto, html, posnw, liminf, limsup, boxplot, usinas):
22+
def __init__(self,outpath, arq_json, txt, nomearquivo, tipo, cronologico, conjunto, html, posnw, liminf, limsup, boxplot, usinas,csv):
2323
self.json = arq_json
2424
self.txt = txt
2525
self.titulo = nomearquivo
@@ -202,8 +202,9 @@ def __init__(self,outpath, arq_json, txt, nomearquivo, tipo, cronologico, conjun
202202
cli_command = cli_command.replace("ADD_SBMS", submercados)
203203
if(html == None):
204204
cli_command = cli_command + " --html True"
205+
if(csv == "True"):
206+
cli_command = cli_command + " --csv True"
205207
if("temporal" in cli_command):
206-
207208
if(data.conjuntoCasos[0].casos[0].modelo == "NEWAVE" and "--eixox" not in cli_command):
208209
self.data_inicio = "data_inicio"
209210

0 commit comments

Comments
 (0)