Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ <h2 id="Top-1000-Ranks"><a href="#Top-1000-Ranks">Top 1000 Ranks</a></h2>
</div>
<span class="search-count" id="rank-search-count"></span>
</div>
<label class="surt-toggle" id="surt-toggle" title="SURT (Sort-friendly URI Rewriting Transform) shows domains in reversed notation, e.g. com.google instead of google.com">
<input type="checkbox" id="surt-checkbox"><span class="surt-slider"><span class="surt-label">SURT</span></span>
<label class="surt-toggle" id="surt-toggle" title="Show domains in reversed notation, e.g. com.google instead of google.com">
<input type="checkbox" id="surt-checkbox" checked><span class="surt-slider"><span class="surt-label">REV</span></span>
</label>
</div>
<div class="rank-content" id="rank-content">
Expand Down Expand Up @@ -473,6 +473,9 @@ <h3 id='related-reading'><a href="#related-reading">Related Reading</a></h3>
<li>
<a href='https://index.commoncrawl.org/web-graphs-index.html' target='_blank' rel='noopener noreferrer nofollow'>Web Graphs Index</a>
</li>
<li>
<a href='https://github.com/commoncrawl/cc-host-index' target='_blank' rel='noopener noreferrer nofollow'>cc-host-index</a> &mdash; a lookup index for host and domain metadata from the web graph rankings (<a href='https://commoncrawl.org/blog/introducing-the-host-index' target='_blank' rel='noopener noreferrer nofollow'>announcement</a>)
</li>
</ul>
</div>
<div class="info-card">
Expand Down
16 changes: 8 additions & 8 deletions docs/pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ async function fetchRankData(fileType, release) {
const panelState = { domain: null, host: null };

const HEADER_LABELS = {
'#harmonicc_pos': 'HC Rank',
'#harmonicc_val': 'HC Value',
'#pr_pos': 'PR Rank',
'#pr_val': 'PR Value',
'#host_rev': 'Host',
'#harmonicc_pos': 'hcrank_pos',
'#harmonicc_val': 'hcrank_raw',
'#pr_pos': 'prank_pos',
'#pr_val': 'prank_raw',
'#host_rev': 'URL_HOST_NAME',
'#n_hosts': 'Hosts',
'#domain_rev': 'Domain'
};

const SURT_HEADER_LABELS = {
'#host_rev': 'Host (rev)',
'#host_rev': 'URL_HOST_NAME_REVERSED',
'#domain_rev': 'Domain (rev)'
};

Expand All @@ -44,8 +44,8 @@ function reverseDomain(s) {
return s.split('.').reverse().join('.');
}

// Track whether SURT mode is active (default: off = human-friendly)
var surtMode = false;
// Track whether SURT mode is active (default: on = reversed notation)
var surtMode = true;

function buildTable(container, data, fileType) {
container.innerHTML = '';
Expand Down
7 changes: 5 additions & 2 deletions src/build_webpage.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,8 +456,8 @@ def copy_to_docs(file_path, dest_name=None):
</div>
<span class="search-count" id="rank-search-count"></span>
</div>
<label class="surt-toggle" id="surt-toggle" title="SURT (Sort-friendly URI Rewriting Transform) shows domains in reversed notation, e.g. com.google instead of google.com">
<input type="checkbox" id="surt-checkbox"><span class="surt-slider"><span class="surt-label">SURT</span></span>
<label class="surt-toggle" id="surt-toggle" title="Show domains in reversed notation, e.g. com.google instead of google.com">
<input type="checkbox" id="surt-checkbox" checked><span class="surt-slider"><span class="surt-label">REV</span></span>
</label>
</div>
<div class="rank-content" id="rank-content">
Expand Down Expand Up @@ -649,6 +649,9 @@ def copy_to_docs(file_path, dest_name=None):
<li>
<a href='https://index.commoncrawl.org/web-graphs-index.html' target='_blank' rel='noopener noreferrer nofollow'>Web Graphs Index</a>
</li>
<li>
<a href='https://github.com/commoncrawl/cc-host-index' target='_blank' rel='noopener noreferrer nofollow'>cc-host-index</a> &mdash; a lookup index for host and domain metadata from the web graph rankings (<a href='https://commoncrawl.org/blog/introducing-the-host-index' target='_blank' rel='noopener noreferrer nofollow'>announcement</a>)
</li>
</ul>
</div>
<div class="info-card">
Expand Down
16 changes: 8 additions & 8 deletions src/pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ async function fetchRankData(fileType, release) {
const panelState = { domain: null, host: null };

const HEADER_LABELS = {
'#harmonicc_pos': 'HC Rank',
'#harmonicc_val': 'HC Value',
'#pr_pos': 'PR Rank',
'#pr_val': 'PR Value',
'#host_rev': 'Host',
'#harmonicc_pos': 'hcrank_pos',
'#harmonicc_val': 'hcrank_raw',
'#pr_pos': 'prank_pos',
'#pr_val': 'prank_raw',
'#host_rev': 'URL_HOST_NAME',
'#n_hosts': 'Hosts',
'#domain_rev': 'Domain'
};

const SURT_HEADER_LABELS = {
'#host_rev': 'Host (rev)',
'#host_rev': 'URL_HOST_NAME_REVERSED',
'#domain_rev': 'Domain (rev)'
};

Expand All @@ -44,8 +44,8 @@ function reverseDomain(s) {
return s.split('.').reverse().join('.');
}

// Track whether SURT mode is active (default: off = human-friendly)
var surtMode = false;
// Track whether SURT mode is active (default: on = reversed notation)
var surtMode = true;

function buildTable(container, data, fileType) {
container.innerHTML = '';
Expand Down
3 changes: 3 additions & 0 deletions src/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ dependencies = [
"pandas",
"tqdm",
]

[tool.setuptools]
packages = []