1+ <!DOCTYPE html>
2+ < html lang ="en ">
3+ < head >
4+ < meta charset ="UTF-8 ">
5+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
6+ < title > RsMetaCheck Pitfalls Report</ title >
7+ < style >
8+ body {
9+ font-family : 'Segoe UI' , Tahoma, Geneva, Verdana, sans-serif;
10+ background-color : # ffffff ;
11+ color : # 333333 ;
12+ margin : 0 ;
13+ padding : 20px ;
14+ }
15+ h1 {
16+ text-align : center;
17+ color : # 2c3e50 ;
18+ margin-bottom : 30px ;
19+ }
20+ .table-container {
21+ max-width : 1200px ;
22+ margin : 0 auto;
23+ overflow-x : auto;
24+ box-shadow : 0 4px 6px rgba (0 , 0 , 0 , 0.1 );
25+ border-radius : 8px ;
26+ }
27+ table {
28+ width : 100% ;
29+ border-collapse : collapse;
30+ background-color : # fff ;
31+ }
32+ th , td {
33+ padding : 12px 15px ;
34+ text-align : left;
35+ border-bottom : 1px solid # e0e0e0 ;
36+ }
37+ th {
38+ background-color : # f8f9fa ;
39+ font-weight : 600 ;
40+ color : # 2c3e50 ;
41+ position : sticky;
42+ top : 0 ;
43+ z-index : 10 ;
44+ }
45+ tbody : hover {
46+ background-color : # f5f5f5 ;
47+ }
48+ .repo-link {
49+ color : # 3498db ;
50+ text-decoration : none;
51+ word-break : break-all;
52+ }
53+ .repo-link : hover {
54+ text-decoration : underline;
55+ }
56+ .code-badge {
57+ display : inline-block;
58+ padding : 4px 8px ;
59+ border-radius : 4px ;
60+ font-size : 0.85em ;
61+ font-weight : bold;
62+ }
63+ .code-p {
64+ background-color : # ffebee ;
65+ color : # c0392b ;
66+ border : 1px solid # ffcdd2 ;
67+ }
68+ .code-w {
69+ background-color : # fff8e1 ;
70+ color : # e67e22 ;
71+ border : 1px solid # ffecb3 ;
72+ }
73+ .desc-text {
74+ font-size : 0.9em ;
75+ color : # 666 ;
76+ margin-top : 4px ;
77+ }
78+ </ style >
79+ </ head >
80+ < body >
81+
82+ < h1 > Repository Assessment Report</ h1 >
83+
84+ < p style ="text-align: center; color: #444; font-size: 1.05em; line-height: 1.4; ">
85+ Total repositories studied: 200 extracted< br >
86+ Every repository being studied has codemeta.json, and at least one metadata file< br >
87+ Currently: Covered 150 out 200 repository
88+ </ p >
89+
90+ < div class ="table-container ">
91+ < table id ="pitfallsTable ">
92+ < thead >
93+ < tr >
94+ < th > Repository</ th >
95+ < th > Pitfall / Warning Code</ th >
96+ < th > Description</ th >
97+ < th > Source File</ th >
98+ < th > Automated</ th >
99+ </ tr >
100+ </ thead >
101+ </ table >
102+ </ div >
103+
104+ < script >
105+ document . addEventListener ( "DOMContentLoaded" , ( ) => {
106+ fetch ( 'summary_pitfalls_warnings.json' )
107+ . then ( response => {
108+ if ( ! response . ok ) {
109+ throw new Error ( 'Network response was not ok' ) ;
110+ }
111+ return response . json ( ) ;
112+ } )
113+ . then ( data => {
114+ const table = document . querySelector ( '#pitfallsTable' ) ;
115+
116+ for ( const [ repoId , repoData ] of Object . entries ( data ) ) {
117+ const url = repoData . url || 'Unknown URL' ;
118+
119+ const pEntries = repoData . pitfalls ? Object . entries ( repoData . pitfalls ) : [ ] ;
120+ const wEntries = repoData . warnings ? Object . entries ( repoData . warnings ) : [ ] ;
121+ const totalRows = pEntries . length + wEntries . length ;
122+
123+ if ( totalRows === 0 ) continue ;
124+
125+ const tbody = document . createElement ( 'tbody' ) ;
126+ let isFirstContext = true ;
127+
128+ for ( const [ code , info ] of pEntries ) {
129+ addRow ( tbody , url , code , info , 'p' , isFirstContext , totalRows ) ;
130+ isFirstContext = false ;
131+ }
132+ for ( const [ code , info ] of wEntries ) {
133+ addRow ( tbody , url , code , info , 'w' , isFirstContext , totalRows ) ;
134+ isFirstContext = false ;
135+ }
136+
137+ table . appendChild ( tbody ) ;
138+ }
139+ } )
140+ . catch ( error => {
141+ console . error ( 'Error loading the JSON data:' , error ) ;
142+ const table = document . querySelector ( '#pitfallsTable' ) ;
143+ table . innerHTML += `<tbody><tr><td colspan="5" style="text-align: center; color: red;">Error loading data. Please ensure you are viewing this file via a local server.</td></tr></tbody>` ;
144+ } ) ;
145+ } ) ;
146+
147+ function addRow ( tbody , url , code , info , type , isFirstContext , totalRows ) {
148+ const tr = document . createElement ( 'tr' ) ;
149+
150+ if ( isFirstContext ) {
151+ const tdRepo = document . createElement ( 'td' ) ;
152+ const aRepo = document . createElement ( 'a' ) ;
153+ aRepo . href = url ;
154+ aRepo . textContent = url ;
155+ aRepo . className = 'repo-link' ;
156+ aRepo . target = '_blank' ;
157+ tdRepo . appendChild ( aRepo ) ;
158+ tdRepo . rowSpan = totalRows ;
159+ tr . appendChild ( tdRepo ) ;
160+ }
161+
162+ // Code Column
163+ const tdCode = document . createElement ( 'td' ) ;
164+ const spanCode = document . createElement ( 'span' ) ;
165+ spanCode . textContent = code ;
166+ spanCode . className = `code-badge code-${ type } ` ;
167+ tdCode . appendChild ( spanCode ) ;
168+
169+ // Description Column
170+ const tdDesc = document . createElement ( 'td' ) ;
171+ if ( info . description && info . description !== "No description available" ) {
172+ tdDesc . textContent = info . description ;
173+ tdDesc . className = 'desc-text' ;
174+ } else {
175+ tdDesc . textContent = '' ;
176+ }
177+
178+ // Source File Column
179+ const tdSource = document . createElement ( 'td' ) ;
180+ tdSource . textContent = info . source_file || 'Unknown' ;
181+
182+ // Automated Column
183+ const tdAutomated = document . createElement ( 'td' ) ;
184+ tdAutomated . textContent = 'Yes' ;
185+
186+ tr . appendChild ( tdCode ) ;
187+ tr . appendChild ( tdDesc ) ;
188+ tr . appendChild ( tdSource ) ;
189+ tr . appendChild ( tdAutomated ) ;
190+
191+ tbody . appendChild ( tr ) ;
192+ }
193+ </ script >
194+ </ body >
195+ </ html >
0 commit comments