This repository has been archived by the owner on Mar 23, 2023. It is now read-only.
forked from joaomeirelles/meuqueridodiario
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.html
167 lines (137 loc) · 9.24 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<!doctype html>
<html lang="pt-BR">
<head>
<meta charset="utf-8"/>
<title>DOM-RJ, matérias</title>
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"/>
<style type="text/css">
mark { background-color: #D55;}
data { background-color: orange;}
cite { background-color: #6F6; }
time { background-color: #74C; }
b.givenName { background-color: #D55;}
mark.organization_name {background-color: red;}
cite.contract { background-color: #8B0; }
cite.matricula { background-color: #7C4; }
#materia a {
display: inline-block;
width: 4.5em;
font-size: 80%;
}
</style>
<script src="https://code.jquery.com/jquery-1.12.4.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js" type="text/javascript"></script>
<script type="text/javascript">
var aLista = ''; // make global
$( function() { // ONLOAD
var materias = [
100150, 100157, 101255, 10200, 102207, 102637, 103008, 103431, 105866, 106315, 108714, 108959, 109220, 110242,
111922, 112585, 112731, 113255, 113291, 113548, 113642, 116265, 11630, 116484, 116485, 11669, 116946, 117148,
11813, 118905, 120484, 121481, 122110, 122159, 122271, 123369, 123708, 124030, 125763, 127682, 128133, 129059,
12906, 130047, 130217, 130239, 135522, 136264, 136426, 136717, 137031, 137230, 140599, 145981, 147381, 147495,
147821, 148302, 148602, 149873, 150323, 150807, 151434, 151680, 151915, 152908, 153145, 154440, 155336, 156212,
156773, 157807, 158562, 160367, 160873, 161209, 161364, 161925, 162094, 162342, 162473, 163850, 164924, 165263,
165578, 165653, 165702, 167078, 167115, 167605, 168108, 168757, 168952, 169388, 169420, 169908, 170611, 170614,
170838, 171481, 17157, 17170, 172117, 172126, 174591, 174684, 174807, 175166, 175671, 176314, 177245, 177370,
178524, 178610, 17931, 179546, 179611, 179692, 180087, 180445, 180843, 182132, 182331, 182937, 183896, 184263,
184749, 184827, 185269, 185730, 185800, 186453, 187641, 187689, 188554, 190354, 190787, 191063, 192080, 192158,
192569, 193080, 193274, 193671, 195875, 196339, 196470, 196474, 199827, 199893, 200778, 201460, 201926, 203836,
204524, 204711, 204763, 207121, 207776, 209224, 209522, 210000, 212137, 212588, 213020, 213089, 213666, 214657,
216418, 216714, 216928, 217265, 217535, 217653, 217857, 21812, 218327, 218332, 218405, 218564, 220135, 220291,
220314, 221307, 222127, 222151, 222328, 222751, 222782, 223167, 223828, 224051, 225155, 225351, 225368, 226501,
226539, 227799, 227981, 227986, 227988, 228204, 228410, 228804, 229084, 229925, 230240, 230475, 231296, 231316,
231471, 2328, 233240, 233725, 233889, 235081, 235460, 235581, 235766, 237033, 237757, 238930, 239552, 240142,
240441, 241922, 242791, 242959, 24377, 245246, 245398, 245503, 246843, 247159, 247421, 248168, 248560, 249832,
250515, 250640, 250685, 250714, 25114, 252089, 25259, 252768, 254971, 255577, 260769, 260855, 262185, 264492,
265009, 26574, 266240, 266304, 267321, 268194, 268796, 268845, 268933, 269001, 269078, 269213, 270814, 271079,
273691, 273725, 274566, 275858, 276617, 277108, 277121, 277469, 279049, 280729, 280936, 281338, 282350, 283707,
284488, 28596, 287599, 288433, 289631, 289729, 292348, 29240, 29269, 29270, 293988, 295494, 296863, 297037,
297781, 298467, 298679, 298831, 299853, 302917, 303252, 303649, 303959, 304603, 304758, 305904, 305907, 306420,
306727, 30738, 307478, 309536, 310091, 311096, 31128, 311414, 312265, 313081, 313279, 313289, 313315, 314884,
314892, 315084, 317664, 31768, 317765, 317940, 318228, 318389, 318882, 320009, 3200, 320882, 321330, 323181,
324155, 325462, 327967, 329747, 329954, 329957, 330109, 330819, 332564, 332688, 332691, 332692, 332924, 332950,
333638, 334565, 335811, 34362, 3481, 3535, 37783, 38252, 38444, 38650, 39102, 39643, 41018, 4196, 43314, 43794,
43871, 45462, 45883, 46026, 46660, 46674, 4672, 47241, 47473, 47945, 49346, 50100, 50201, 50758, 51638, 52192,
52994, 53526, 53609, 53856, 55998, 56689, 58101, 59519, 59955, 64098, 64147, 64840, 65026, 65039, 65139, 65422,
66359, 68954, 69614, 70402, 70578, 70747, 7186, 72911, 74628, 75089, 75521, 79990, 80085, 80660, 82298, 83805,
84201, 85161, 8838, 88480, 88801, 89280, 89721, 90222, 92168, 92608, 94012, 95153, 96622, 97979, 98256, 98872, 99173
];
var materias_rich = [100150,100157,103008,103431,105866,313315,117148,108714,108959,109220,204711,59519,111922,112731,113255,113642,116265,116484,118905,120484,121481,122110,122271,125763,169388,127682,128133,129059,12906,130047,130217,136717,140599,145981,147381,147495,148302,148602,151680,151915,152908,154440,156212,156773,88480,88801,158562,160873,161209,161364,162094,70402,165578,162342,163850,164924,70578,165702,167078,168757,168952,170611,170838,46674,116485,185730,186453,172126,174591,74628,175166,178610,179546,216418,187641,179611,179692,180843,182132,182331,187689,183896,184827,185269,190354,191063,192080,192158,192569,193274,195875,196339,196470,209224,212137,213089,214657,216714,21812,218332,68954,218405,220135,220314,221307,233889,233240,222127,225368,226501,226539,227981,227986,227988,228410,235081,229925,230475,239552,235460,235766,238930,240142,293988,241922,242959,52994,245246,245503,277469,297037,246843,247421,250515,250640,311096,252089,75089,25259,255577,265009,266240,269001,269078,332564,269213,312265,271079,273725,275858,277108,277121,279049,280936,283707,288433,29240,29269,29270,298679,298831,302917,303252,303649,46026,304603,304758,305907,30738,314884,317664,50100,317940,318389,318882,3200,320009,320882,321330,325462,329747,329954,329957,330819,332688,332691,332692,332924,332950,335811,34362,3481,38444,53856,38650,39643,4196,11669,43314,45883,46660,55998,53609,101255,102207,102637,137230,153145,247159,307478,333638,65422,47473,65039,50201,50758,51638,59955,64098,65026,66359,75521,79990,80660,84201,89721,95153,98872]
materias = materias.sort((a, b) => a - b);
var mklista = materias.map(function(item) {
var ast = (materias_rich.indexOf(item)>-1)? '*': '';
return ' <a href="#" onclick="return pegaMateriaObj(this)">'+item+ast+'</a>';
});
aLista = mklista.join(' ');
mklista=null;
$('#materia').html( aLista );
var availableTags = materias.map(function(item) { return String(item); });
$( "#enterTag" ).autocomplete({
//source: availableTags,
source: function( request, response ) {
var matcher = new RegExp( "^" + $.ui.autocomplete.escapeRegex( request.term ), "i" );
response( $.grep( availableTags, function( item ){
return matcher.test( item );
}) );
},
change: function( event, ui ) {
if (ui!==null && ui.item!==null) pegaMateria(ui.item.value);
}
});
} ); //ONLOAD
function pegaMateria(x){
if (!x) return;
x = String(x).replace('*','');
var url = 'https://okfn-brasil.github.io/queriDO/content'; // online
if (window.location.hostname.indexOf("github.io") == -1)
url = './content'; // localhost
var folder = $('#sfolder option:selected').val();
url = url +'/'+ folder +'/'+ x +'.html';
$('#materia').load(url);
}
function pegaMateriaObj(obj){
var x=$(obj).text();
x = String(x).replace('*','');
$("#enterTag").val( x );
pegaMateria(x);
return false;
}
function pega_enterTag() { pegaMateria( $('#enterTag').val() ); return true; }
</script>
</head>
<body>
<div class="ui-widget">
Diário Oficial do Rio, ver <label for="enterTag">Matéria nº </label>
<input id="enterTag" value="113255">
<select id="sfolder" name="sfolder" onchange="pega_enterTag()">
<option value="marcado">Marcado (3)</option>
<option value="filtrado">Filtrado (2)</option>
<option value="original">Original (1)</option>
<!-- option value="rascunho">Rascunho</option -->
</select>
<button id="sok" onclick="pega_enterTag()">ok</button>
ou <a href="#" onclick="$('#materia').html( aLista ); return false;">listar todas</a>.
      <a href="https://okfn-brasil.github.io/queriDO/site/">[documentação e relatórios]</a> <a href="https://github.com/okfn-brasil/queriDO">[<tt>git</tt> do projeto]</a>
</div>
<hr/>
<div style="background-color:#DDD; padding:3em" id="materia"></div>
<hr/>
LEGENDA DO <b>MARCADO</b>:
<ul>
<li> <mark class="organization_name"><code><mark></code> organization_name</mark> (alvo da curadoria)</li>
<li> <mark class="organization_vatID"><code><mark></code> etc.</mark>outras marcações terminológicas (nomes próprios, nomes de lugares, </li>
<li> <cite class="any"><code><cite></code> para citações de certificados, leis, contratos, normas técnicas e outros documentos externos</cite></li>
<li> <time class="any"><code><time></code> para expressões de hora e calendário</time></li>
<li> <data class="any"><code><data></code> dados em geral, principalmente códigos (de CEP, CNPJ, CPF, etc.) e valores (monetários e outras quantificações).</data></li>
</ul>
<hr/>
<h1>Outros recursos</h1>
Ainda em construção, mas descam-se:
<ul>
<li> <a href="http://pg.jats.science/vw_content?select=materia_id,kx&kx_n=gt.3">pg.jats.science/<b>vw_content?select=materia_id,kx&kx_n=gt.3</b></a></li>
http://pg.jats.science/
<li> <a href="http://pg.jats.science/vw_content?select=content&materia_id=eq.4196">pg.jats.science/<b>vw_content?select=content&materia_id=eq.4196</b></a></li>
<li>...</li>
</ul>
</body>
</html>