REM d:\freebasic\fbc d:\lomd\in.bas #include "vbcompat.bi" print "Auxiliar de consulta para os arquivos PDF da Imprensa Nacional - V1.00.20080224" print "Autoria: Luis Olavo Dantas - luis@dantas.com" print "http://www.dantas.com/imprensanacional" print p$="e:\" k1$="Consulta a Imprensa Nacional - autor: luisdantas@gmail.com" print #1,"" print #1, "

" for q=2008 to 2002 step -1 print q print #1,"
 " for r=101 to 112 b$=str$(q) c$=right$(str$(r),2) if r=101 then e$="Janeiro" if r=102 then e$="Fevereiro" if r=103 then e$="Março" if r=104 then e$="Abril" if r=105 then e$="Maio" if r=106 then e$="Junho" if r=107 then e$="Julho" if r=108 then e$="Agosto" if r=109 then e$="Setembro" if r=110 then e$="Outubro" if r=111 then e$="Novembro" if r=112 then e$="Dezembro" print #1,""; if b$="2003" then print #1," bgcolor=ffaacc>"; if b$="2004" then print #1," bgcolor=ccffcc>"; if b$="2005" then print #1," bgcolor=ffcccc>"; if b$="2006" then print #1," bgcolor=ccffff>"; if b$="2007" then print #1," bgcolor=ffccff>"; if b$="2008" then print #1," bgcolor=ffffcc>"; for i=1 to 6 if b$>="2008" then if (i=2) or (i=3) goto 120 if i=1 then print #1,""; if i=2 then print #1,""; if i=3 then print #1,""; if i=4 then print #1,""; if i=5 then print #1,""; if i=6 then print #1,""; for j=1001 to 1031 k=dateserial(val(b$),val(c$),j-1000) k=weekday(k) if j>1028 then if c$="02" then if b$<>"2008" then if b$<>"2004" then goto 110 if j>1029 then if c$="02" then goto 110 if j>1030 then if (c$="04") or (c$="06") or (c$="09") or (c$="11") then goto 110 print #1,"" 110 next j print #1,"" 120 next i next r print #1,"

 DJ  Seção 1 de ";e$;" de ";b$;"

 DJ  Seção 2 de ";e$;" de ";b$;"

 DJ  Seção 3 de ";e$;" de ";b$;"

 DOU Seção 1 de ";e$;" de ";b$;"

 DOU Seção 2 de ";e$;" de ";b$;"

 DOU Seção 3 de ";e$;" de ";b$;"
 "; if k<2 goto 105 if k>6 goto 105 print #1,k1$;right$(str$(j),2);"/";c$;"/";b$;"&jornal=d"; if i<4 then print #1,"j"; if i>3 then print #1,"o"; print #1, "&secao="; if i=1 then print #1, "1"; if i=2 then print #1, "2"; if i=3 then print #1, "3"; if i=4 then print #1, "1"; if i=5 then print #1, "2"; if i=6 then print #1, "3"; print #1,"&pagina=1>"; 105 print #1,str$(j-1000); if k>=2 then if k<=6 then print #1,""; print #1," 
" print #1,"
" print #1, "

2002 | 2003 | 2004 | 2005 | 2006 | 2007 | 2008

" next q print #1,"" close 1 print print Print "Para fazer sua consulta, abra o arquivo .htm agora, via Internet Explorer ou Windows Explorer." print print "Esta janela se fechará automaticamente em dez segundos." t$=right$(time$,2) 900 d=val(right$(time$,2))-val(t$):if d>=0 then if d<10 goto 900 end REM Modelo alternativo de tabela mensal print #1,"" print #1,"" for i=1001 to 1031 if i>1028 then if c$="02" then if b$<>"2008" then goto 90 if i>1029 then if c$="02" then goto 90 if i>1030 then if (c$="04") or (c$="06") or (c$="09") or (c$="11") then goto 90 print #1,"" for j=1 to 6 if b$>="2008" then if j=2 goto 90 if b$>="2008" then if j=3 goto 90 print #1,"" 90 next print #1,"" next i print #1,"
Diários da Imprensa Nacional no mês de ";c$;"/";b$;" (página 1):
DJ"; if b$<="2007" then print #1,"1DJ2DJ3"; print #1, "DO1DO2DO3
";k1$;right$(str$(i),2);"/";c$;"/";b$;"&jornal=d"; if j<4 then print #1,"j"; if j>3 then print #1,"o"; print #1, "&segedicao=&secao="; if j=1 then print #1, "1"; if j=2 then print #1, "2"; if j=3 then print #1, "3"; if j=4 then print #1, "1"; if j=5 then print #1, "2"; if j=6 then print #1, "3"; print #1,"&pagina=1>";str$(i-1000);"

"