Skip to content

Commit

Permalink
Pagination fix + OG titles & URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
qixils committed Jan 24, 2022
1 parent df0063d commit 568a085
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion viewer-frontend/src/lib/Pagination.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
end = Number(end)
let pages: number[] = [];
for (let i = current-2; i < (current+5) && pages.length < 5; i++) {
for (let i = current-2; i < Math.min(end, (current+5)) && pages.length < 5; i++) {
if (i > 0) {
pages.push(i);
}
Expand Down
1 change: 1 addition & 0 deletions viewer-frontend/src/routes/__error.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

<svelte:head>
<title>Yahoo! Groups Viewer ∙ {status}</title>
<meta property="og:title" content="Yahoo! Groups Viewer ∙ {status}">
</svelte:head>

<header class="text-center">
Expand Down
1 change: 1 addition & 0 deletions viewer-frontend/src/routes/group/[group]/[page].svelte
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@

<svelte:head>
<title>Yahoo! Groups Viewer ∙ Page {page}/{pages} of {group}</title>
<meta property="og:title" content="Yahoo! Groups Viewer ∙ Page {page}/{pages} of {group}">
<meta name="description" content="An archive of emails sent to the {group} group on the defunct website Yahoo! Groups.">
<meta property="og:description" content="An archive of emails sent to the {group} group on the defunct website Yahoo! Groups.">
<meta name="robots" content="noindex">
Expand Down
3 changes: 3 additions & 0 deletions viewer-frontend/src/routes/index.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@

<svelte:head>
<title>Yahoo! Groups Viewer</title>
<meta property="og:title" content="Yahoo! Groups Viewer">
<meta name="description" content="A hub to view archives of emails sent to groups on the defunct website Yahoo! Groups.">
<meta property="og:description" content="A hub to view archives of emails sent to groups on the defunct website Yahoo! Groups.">
<meta property="og:url" content="https://yahoo.qixils.dev/">
<link rel="canonical" href="https://yahoo.qixils.dev/">
</svelte:head>

<main class="text-center max-w-2xl mx-auto">
Expand Down
5 changes: 4 additions & 1 deletion viewer-frontend/src/routes/search.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,12 @@
</script>

<svelte:head>
<title>Yahoo! Groups Viewer</title>
<title>Yahoo! Groups Viewer ∙ Search</title>
<meta property="og:title" content="Yahoo! Groups Viewer ∙ Search">
<meta name="description" content="Advanced search tool for finding specific emails sent to groups on the defunct website Yahoo! Groups.">
<meta property="og:description" content="Advanced search tool for finding specific emails sent to groups on the defunct website Yahoo! Groups.">
<meta property="og:url" content="https://yahoo.qixils.dev/search">
<link rel="canonical" href="https://yahoo.qixils.dev/search">
</svelte:head>

<header class="text-center">
Expand Down
3 changes: 3 additions & 0 deletions viewer-frontend/src/routes/search/[group].svelte
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,12 @@

<svelte:head>
<title>Yahoo! Groups Viewer ∙ Advanced Search Results</title>
<meta property="og:title" content="Yahoo! Groups Viewer ∙ Advanced Search Results">
<meta name="description" content="Search results for a query in the {group} group on the defunct website Yahoo! Groups.">
<meta property="og:description" content="Search results for a query in the {group} group on the defunct website Yahoo! Groups.">
<meta name="robots" content="noindex">
<meta property="og:url" content="https://yahoo.qixils.dev/search/{group}{query}">
<link rel="canonical" href="https://yahoo.qixils.dev/search/{group}{query}">
</svelte:head>

<header class="text-center">
Expand Down
1 change: 1 addition & 0 deletions viewer-frontend/src/routes/user/[user].svelte
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@

<svelte:head>
<title>Yahoo! Groups Viewer ∙ {displayName}'s Profile</title>
<meta property="og:title" content="Yahoo! Groups Viewer ∙ {displayName}'s Profile">
<meta name="description" content="{displayName}'s profile from the defunct website Yahoo! Groups.">
<meta property="og:description" content="{displayName}'s profile from the defunct website Yahoo! Groups.">
<meta name="robots" content="noindex">
Expand Down
2 changes: 1 addition & 1 deletion warc-extractor/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# bizarre prefixes that are found in some messages
SECTION_PREFIX = re.compile(r"^(?:-{5,}_?=_(?:Next)?Part_|--_?[0-9a-f]+-[0-9a-f]+-[0-9a-f]+(?:=:|-)[0-9a-f]+|Content-Type:|--[0-9A-Za-z]{36,})|Content-[Tt]ransfer-[Ee]ncoding:|--Boundary")
# Yahoo! and antivirus software loved advertising themselves in email footers
SECTION_SUFFIX = re.compile(r"^(?:Yahoo! Mail|Yahoo! FareChase|No virus found in this outgoing message.|YAHOO! GROUPS LINKS|Yahoo! Music Unlimited|Do You Yahoo!\?|Yahoo! Messenger|Yahoo! Personals|Yahoo! Model Search|Yahoo! DSL)")
SECTION_SUFFIX = re.compile(r"^(?:Yahoo! Mail|Yahoo! FareChase|No virus found in this outgoing message.|YAHOO! GROUPS LINKS|Yahoo! Music Unlimited|Do You Yahoo!\?|Yahoo! Messenger|Yahoo! Personals|Yahoo! Model Search|Yahoo! DSL|More immediate than e-mail\?|Keine Mail mehr verpassen!|Lustige Emoticons|Die aktuelle Fr=FChj|Windows Live Messenger|Sjekk ut noen av de nye elektroniske tjenestene|Psssst! Schon vom neuen GMX MultiMessenger)")
HYPHENS = re.compile(r"^[-_*]+$")
FAKE_ID_MAX = 1000000
USERNAME = re.compile(r"^[A-Za-z0-9.@_]{4,40}$")
Expand Down

0 comments on commit 568a085

Please sign in to comment.