A copyright violation detector running on Wikimedia Cloud Services https://tools.wmflabs.org/copyvios/
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

index.mako 11 KiB

hace 11 años
hace 11 años
hace 11 años
hace 11 años
hace 11 años
hace 11 años
hace 11 años
hace 11 años
hace 11 años
hace 11 años
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. <%include file="/support/header.mako" args="environ=environ, cookies=cookies, title='Earwig\'s Copyvio Detector'"/>\
  2. <%namespace module="copyvios" import="main, highlight_delta"/>\
  3. <%namespace module="copyvios.misc" import="urlstrip"/>\
  4. <% query, bot, all_langs, all_projects, page, result = main(environ) %>\
  5. % if query.project and query.lang and query.title and not page:
  6. <div class="red-box">
  7. <p>The given site (project=<b><span class="mono">${query.project | h}</span></b>, language=<b><span class="mono">${query.lang | h}</span></b>) doesn't seem to exist. It may also be closed or private. <a href="//${query.lang | h}.${query.project | h}.org/">Confirm its URL.</a></p>
  8. </div>
  9. % elif query.project and query.lang and query.title and page and not result:
  10. <div class="red-box">
  11. <p>The given page doesn't seem to exist: <a href="${page.url}">${page.title | h}</a>.</p>
  12. </div>
  13. % elif query.project and query.lang and query.title and query.url and page and result == "bad URI":
  14. <% result = None %>
  15. <div class="red-box">
  16. <p>Unsupported URI scheme: <a href="${query.url | h}">${query.url | h}</a>.</p>
  17. </div>
  18. % endif
  19. <p>This tool attempts to detect <a href="//en.wikipedia.org/wiki/WP:COPYVIO">copyright violations</a> in articles. Simply give the title of the page you want to check and hit Submit. The tool will then search for its content elsewhere on the web and display a report if a similar webpage is found. If you also provide a URL, it will not query any search engines and instead display a report comparing the article to that particular webpage, like the <a href="//toolserver.org/~dcoetzee/duplicationdetector/">Duplication Detector</a>. Check out the <a href="//en.wikipedia.org/wiki/User:EarwigBot/Copyvios/FAQ">FAQ</a> for more information and technical details.</p>
  20. <p><i>Note:</i> The tool is still in beta. You are completely welcome to use it and provide <a href="//en.wikipedia.org/wiki/User_talk:The_Earwig">feedback</a>, but be aware that it may produce strange or broken results.</p>
  21. <form action="${environ['SCRIPT_URL']}" method="get">
  22. <table>
  23. <tr>
  24. <td>Site:</td>
  25. <td>
  26. <span class="mono">http://</span>
  27. <select name="lang">
  28. <% selected_lang = query.orig_lang if query.orig_lang else cookies["CopyviosDefaultLang"].value if "CopyviosDefaultLang" in cookies else bot.wiki.get_site().lang %>\
  29. % for code, name in all_langs:
  30. % if code == selected_lang:
  31. <option value="${code | h}" selected="selected">${name}</option>
  32. % else:
  33. <option value="${code | h}">${name}</option>
  34. % endif
  35. % endfor
  36. </select>
  37. <span class="mono">.</span>
  38. <select name="project">
  39. <% selected_project = query.project if query.project else cookies["CopyviosDefaultProject"].value if "CopyviosDefaultProject" in cookies else bot.wiki.get_site().project %>\
  40. % for code, name in all_projects:
  41. % if code == selected_project:
  42. <option value="${code | h}" selected="selected">${name}</option>
  43. % else:
  44. <option value="${code | h}">${name}</option>
  45. % endif
  46. % endfor
  47. </select>
  48. <span class="mono">.org</span>
  49. </td>
  50. </tr>
  51. <tr>
  52. <td>Page title:</td>
  53. % if page:
  54. <td><input type="text" name="title" size="60" value="${page.title | h}" /></td>
  55. % elif query.title:
  56. <td><input type="text" name="title" size="60" value="${query.title | h}" /></td>
  57. % else:
  58. <td><input type="text" name="title" size="60" /></td>
  59. % endif
  60. </tr>
  61. <tr>
  62. <td>URL (optional):</td>
  63. % if query.url:
  64. <td><input type="text" name="url" size="120" value="${query.url | h}" /></td>
  65. % else:
  66. <td><input type="text" name="url" size="120" /></td>
  67. % endif
  68. </tr>
  69. % if query.nocache or (result and result.cached):
  70. <tr>
  71. <td>Bypass cache:</td>
  72. % if query.nocache:
  73. <td><input type="checkbox" name="nocache" value="1" checked="checked" /></td>
  74. % else:
  75. <td><input type="checkbox" name="nocache" value="1" /></td>
  76. % endif
  77. </tr>
  78. % endif
  79. <tr>
  80. <td><button type="submit">Submit</button></td>
  81. <td></td>
  82. </tr>
  83. </table>
  84. </form>
  85. % if page and result:
  86. <div class="divider"></div>
  87. <div id="cv-result-${'yes' if result.violation else 'no'}">
  88. % if result.violation:
  89. <h2 id="cv-result-header"><a href="${page.url}">${page.title | h}</a> is a suspected violation of <a href="${result.url | h}">${result.url | urlstrip, h}</a>.</h2>
  90. % else:
  91. <h2 id="cv-result-header">No violations detected in <a href="${page.url}">${page.title | h}</a>.</h2>
  92. % endif
  93. <ul id="cv-result-list">
  94. % if not result.violation and not query.url:
  95. % if result.url:
  96. <li>Best match: <a href="${result.url | h}">${result.url | urlstrip, h}</a>.</li>
  97. % else:
  98. <li>No matches found.</li>
  99. % endif
  100. % endif
  101. <li><b><span class="mono">${round(result.confidence * 100, 1)}%</span></b> confidence of a violation.</li>
  102. % if result.cached:
  103. <li>Results are <a id="cv-cached" href="#">cached
  104. <span>To save time (and money), this tool will retain the results of checks for up to 72 hours. This includes the URL of the "violated" source, but neither its content nor the content of the article. Future checks on the same page (assuming it remains unchanged) will not involve additional search queries, but a fresh comparison against the source URL will be made. If the page is modified, a new check will be run.</span>
  105. </a> from ${result.cache_time} (${result.cache_age} ago). <a href="${environ['REQUEST_URI'] | h}&amp;nocache=1">Bypass the cache.</a></li>
  106. % else:
  107. <li>Results generated in <span class="mono">${round(result.time, 3)}</span> seconds using <span class="mono">${result.queries}</span> queries.</li>
  108. % endif
  109. % if "CopyviosShowDetails" in cookies and cookies["CopyviosShowDetails"].value == "True":
  110. <li><a id="cv-result-detail-link" href="#cv-result-detail" onclick="copyvio_toggle_details()">Hide details:</a></li>
  111. % else:
  112. <li><a id="cv-result-detail-link" href="#cv-result-detail" onclick="copyvio_toggle_details()">Show details:</a></li>
  113. % endif
  114. </ul>
  115. % if "CopyviosShowDetails" in cookies and cookies["CopyviosShowDetails"].value == "True":
  116. <div id="cv-result-detail" style="display: block;">
  117. % else:
  118. <div id="cv-result-detail" style="display: none;">
  119. % endif
  120. <ul id="cv-result-detail-list">
  121. <li>Trigrams: <i>Article:</i> <span class="mono">${result.article_chain.size()}</span> / <i>Source:</i> <span class="mono">${result.source_chain.size()}</span> / <i>Delta:</i> <span class="mono">${result.delta_chain.size()}</span></li>
  122. % if result.cached:
  123. % if result.queries:
  124. <li>Retrieved from cache in <span class="mono">${round(result.time, 3)}</span> seconds (originally generated in <span class="mono">${round(result.original_time, 3)}</span>s using <span class="mono">${result.queries}</span> queries; <span class="mono">${round(result.original_time - result.time, 3)}</span>s saved).</li>
  125. % else:
  126. <li>Retrieved from cache in <span class="mono">${round(result.time, 3)}</span> seconds (originally generated in <span class="mono">${round(result.original_time, 3)}</span>s; <span class="mono">${round(result.original_time - result.time, 3)}</span>s saved).</li>
  127. % endif
  128. % endif
  129. % if result.queries:
  130. <li><i>Fun fact:</i> The Wikimedia Foundation paid Yahoo! Inc. <a href="http://info.yahoo.com/legal/us/yahoo/search/bosspricing/details.html">$${result.queries * 0.0008} USD</a> for these results.</li>
  131. % endif
  132. </ul>
  133. <table id="cv-chain-table">
  134. <tr>
  135. <td class="cv-chain-cell">Article: <div class="cv-chain-detail"><p>${highlight_delta(result.article_chain, result.delta_chain)}</p></div></td>
  136. <td class="cv-chain-cell">Source: <div class="cv-chain-detail"><p>${highlight_delta(result.source_chain, result.delta_chain)}</p></div></td>
  137. </tr>
  138. </table>
  139. </div>
  140. </div>
  141. % endif
  142. <%include file="/support/footer.mako" args="environ=environ, cookies=cookies"/>