|
@ -35,6 +35,10 @@ def create_app(test_config=None):
|
|||
def about():
|
||||
return render_template('about.html')
|
||||
|
||||
@app.route('/results')
|
||||
def results():
|
||||
return render_template('results.html')
|
||||
|
||||
|
||||
# a simple page that says hello
|
||||
@app.route('/registration-classes')
|
||||
|
|
|
@ -12,34 +12,69 @@ bp = Blueprint('search', __name__)
|
|||
@bp.route('/')
|
||||
def index():
|
||||
results = None
|
||||
term = None
|
||||
title = None
|
||||
paging=None
|
||||
sentTitle = None
|
||||
search_type = "ft"
|
||||
if request.args:
|
||||
term = request.args['term']
|
||||
if request.args['type'] == 'ft':
|
||||
response = search(request.args['term'], request.args.get('page'),
|
||||
request.args.get('per_page'))
|
||||
elif request.args['type'] == 'reg':
|
||||
search_type = "reg"
|
||||
term = term.strip().upper()
|
||||
response = reg_search(term,
|
||||
request.args.get('page'),
|
||||
request.args.get('per_page'))
|
||||
else:
|
||||
search_type = "ren"
|
||||
term = term.strip().upper()
|
||||
response = ren_search(term,
|
||||
request.args.get('page'),
|
||||
request.args.get('per_page'))
|
||||
|
||||
paging = proc_pagination(response['data']['paging'],
|
||||
request.args.get('page'))
|
||||
results = proc_results(response)
|
||||
arguments = request.args.get("title") or request.args.get("renewal") or request.args.get("registration") or request.args.get("author") or request.args.get("publisher")
|
||||
#print("TEST HERE")
|
||||
#print(request.args)
|
||||
#print(request.args.get("title"))
|
||||
print("----------------------------------------------------------")
|
||||
unique = 0
|
||||
|
||||
if not arguments:
|
||||
print("NO ARGUMENTS GIVEN. PLEASE GIVE ARGUMENTS")
|
||||
else:
|
||||
if request.args.get("renewal"):
|
||||
results = ren_search(request.args['renewal'], request.args.get('page'),
|
||||
request.args.get('per_page'))
|
||||
paging = proc_pagination(results['data']['paging'], request.args.get('page'))
|
||||
unique = 1
|
||||
|
||||
|
||||
if request.args.get("registration") and unique == 0:
|
||||
results = reg_search(request.args['registration'], request.args.get('page'),
|
||||
request.args.get('per_page'))
|
||||
paging = proc_pagination(results['data']['paging'], request.args.get('page'))
|
||||
unique = 1 #technically not 100% unique but should be very simplified for now
|
||||
|
||||
if request.args.get("title") and unique == 0:
|
||||
title = request.args['title']
|
||||
results = search(title, request.args.get('page'),
|
||||
request.args.get('per_page'))
|
||||
paging = proc_pagination(results['data']['paging'],
|
||||
request.args.get('page'))
|
||||
|
||||
|
||||
if request.args.get("author") and unique == 0:
|
||||
results = search(request.args['author'], request.args.get('page'),
|
||||
request.args.get('per_page'))
|
||||
paging = proc_pagination(results['data']['paging'],
|
||||
request.args.get('page'))
|
||||
|
||||
|
||||
if request.args.get("publisher") and unique == 0:
|
||||
results = search(request.args['publisher'], request.args.get('page'),
|
||||
request.args.get('per_page'))
|
||||
paging = proc_pagination(results['data']['paging'],
|
||||
request.args.get('page'))
|
||||
#paging = proc_pagination(results['data']['paging'],
|
||||
# request.args.get('page'))
|
||||
|
||||
print("PRINTING PAGING HERE")
|
||||
print(paging)
|
||||
|
||||
results = proc_results(results)
|
||||
print(results)
|
||||
|
||||
if results == []:
|
||||
print("NO RESULTS")
|
||||
noresults = 1
|
||||
return render_template('search/index.html', noresults=noresults)
|
||||
|
||||
return render_template('search/index.html', results=results, term=term,
|
||||
paging=paging, search_type=search_type)
|
||||
return render_template('search/index.html', results=results, term=title,
|
||||
paging=paging, search_type=search_type)
|
||||
|
||||
|
||||
def proc_results(r):
|
||||
|
@ -49,7 +84,6 @@ def proc_results(r):
|
|||
def enhance_results(r):
|
||||
if r.get('type') == 'renewal':
|
||||
return r
|
||||
|
||||
return {**r, **{'original': strip_tags(r.get('xml')),
|
||||
'is_post_1963': is_post_1963(r.get('registrations')),
|
||||
'is_foreign': is_foreign(r.get('registrations')),
|
||||
|
@ -63,7 +97,7 @@ def strip_tags(xml):
|
|||
return ""
|
||||
|
||||
|
||||
def ia_url(src):
|
||||
def ia_url(src):
|
||||
#return src
|
||||
return "{}#page/{:d}/mode/1up".format(ia_stream(src.get('url', '')),
|
||||
src.get('page', 0))
|
||||
|
|
After Width: | Height: | Size: 984 KiB |
After Width: | Height: | Size: 151 KiB |
After Width: | Height: | Size: 691 KiB |
After Width: | Height: | Size: 613 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 31 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 28 KiB |
|
@ -1,44 +1,96 @@
|
|||
.info-card {
|
||||
border: 2px solid black;
|
||||
border-radius: 1em;
|
||||
margin-bottom: 1em;
|
||||
padding-bottom: 1em;
|
||||
body, html {
|
||||
background: url('cover-collage-2.jpg');
|
||||
background-size: 100%;
|
||||
}
|
||||
|
||||
.info-card dt {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.info-card dd {
|
||||
padding-bottom: 0.5em;
|
||||
}
|
||||
|
||||
.info-card ul.child-renewal {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
fieldset.usa-fieldset legend {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.pagination {
|
||||
.content{
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
background-color:#E4E6E9;
|
||||
border: solid #969FAA 3px;
|
||||
border-radius: 35px;
|
||||
text-align: center;
|
||||
width: 60%;
|
||||
padding: 20px 30px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
nav.pagination {
|
||||
margin-bottom: 1rem;
|
||||
.content p {
|
||||
line-height: 1.5em;
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
}
|
||||
|
||||
nav.pagination li {
|
||||
display: inline-block;
|
||||
padding: 0 1em;
|
||||
#cprr {
|
||||
width:75%
|
||||
}
|
||||
|
||||
header {
|
||||
margin-top: 1rem;
|
||||
padding-bottom: 1rem;
|
||||
input {
|
||||
width: 85%;
|
||||
height:30px;
|
||||
padding-left: 5px;
|
||||
margin-bottom:10px;
|
||||
}
|
||||
|
||||
.usa-logo {
|
||||
margin-top: 0;
|
||||
.btn{
|
||||
margin-top: 0.75em
|
||||
}
|
||||
|
||||
.header {
|
||||
background: black;
|
||||
/* padding:2%; */
|
||||
padding-left: 10px;
|
||||
overflow: hidden;
|
||||
position: sticky;
|
||||
position: -webkit-sticky;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
/* FOR THE RESULTS PAGE */
|
||||
|
||||
.results {
|
||||
/* position:relative; */
|
||||
width: 70%;
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
margin-top: 1em;
|
||||
margin-bottom: 1em;
|
||||
padding: 30px 20px;
|
||||
/* padding-top:10%; */
|
||||
background-color:#E4E6E9;
|
||||
border: solid #969FAA 4px;
|
||||
border-radius: 46px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
ul {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.results p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
th {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.table-bordered td, .table-bordered th {
|
||||
border: 2px solid black;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.title {
|
||||
width: fit-content;
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
padding: 10px 20px;
|
||||
/* padding-top:10%; */
|
||||
background-color:#E4E6E9;
|
||||
border: solid #969FAA 4px;
|
||||
border-radius: 20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 21 KiB |
|
@ -1,46 +1,12 @@
|
|||
{% extends 'base.html' %}
|
||||
|
||||
{% block header %}
|
||||
<h2>About this project</h2>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<p>This is an unofficial, experimental interface for searching records from the
|
||||
US Copyright Office's <i>Catalog of Copyright Entries</i> digitized by NYPL. You
|
||||
can read about the inception and progress of the project in two blog
|
||||
posts: <a href="https://www.nypl.org/blog/2018/03/30/unlocking-record-american-creativity">Unlocking
|
||||
the Record of American Creativity—with Your Help</a>
|
||||
and <a href="https://www.nypl.org/blog/2019/05/31/us-copyright-history-1923-1964">https://www.nypl.org/blog/2019/05/31/us-copyright-history-1923-1964</a></p>
|
||||
|
||||
<p>Renewals have been searchable for many years thanks to the <a href="https://exhibits.stanford.edu/copyrightrenewals?forward=home">Copyright Renewals project</a> at Stanford. The digitization of <em>registrations</em> by NYPL allows us to find renewed and <em>unrenewed</em> works with equal ease. Search results in this interface contain registrations with their associated renewals, registrations with no known renewals, as well as renewal entries on their own.</p>
|
||||
|
||||
<h2>What's in the Data?</h2>
|
||||
|
||||
<p>This dataset contains registrations from all the book volumes of the <i>Catalog of Copyright Entries</i>, 1923 to 1969, but <em>not including</em> the “pamphlet” volumes (part 1, group 2) from 1923 to 1953. It contains all renewals from book volumes from 1923 to 1977, including “pamphlet” volumes (from Project Gutenberg transcriptions) and all renewals from <em>all classes</em> of works from 1978 to 1991 (from the Copyright Office database).</p>
|
||||
|
||||
<p>Clearly there are many renewal records for items not yet included in the registrations but, in theory, <em>all</em> book renewals should be included here. That said, these search results are far from definitive. The data still requires cleanup (see <a href="#reporting-errors">How to report a problem or error</a> below).</p>
|
||||
|
||||
<h2 id="reporting-errors">How to report a problem or error</h2>
|
||||
|
||||
<p>If the problem is with this website and not the data, for instance broken
|
||||
links, server errors, or ideas for improvement, you
|
||||
can <a href="https://github.com/seanredmond/cce-search-prototype/issues">submit
|
||||
an issue on Github</a>.</p>
|
||||
|
||||
<p>If you find an error in the data please submit in issue <a href="https://github.com/NYPL/catalog_of_copyright_entries_project/issues">via the Github repository for the registrations</a> unless you are certain that problem is in a renewal entry, in which case you can submit an issue via the <a href="https://github.com/NYPL/cce-renewals/issues">renewals repository</a>. Data problems may involve simple typos, mistakes in parsing, or missing or mistaken links between registrations and renewals. When reporting data problems, please include the CCEIDs of the entries involved. The CCEID is the string of 32 letters in numbers at the end of each record, such as “be62f40e-6d17-1014-b416-88728c01eda4”.</p>
|
||||
|
||||
<p>If you are comfortable with git and editing large XML files, you can also submit a pull request.</p>
|
||||
|
||||
<h2 id="get-code">Get the Code</h2>
|
||||
|
||||
<p>Registration and renewal data is in the Public Domain and available from two repositories:</p>
|
||||
|
||||
<ul>
|
||||
<li>Registrations: <a href="https://github.com/NYPL/catalog_of_copyright_entries_project">https://github.com/NYPL/catalog_of_copyright_entries_project</a></li>
|
||||
<li>Renewals: <a href="https://github.com/NYPL/cce-renewals">https://github.com/NYPL/cce-renewals</a></li>
|
||||
</ul>
|
||||
|
||||
<p>Code for this website is available from its own repository: <a href="https://github.com/seanredmond/cce-search-prototype">https://github.com/seanredmond/cce-search-prototype</a></p>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
<div class="py-5 text-center">
|
||||
<div class="content">
|
||||
<h1>About</h1>
|
||||
<p>Many books published between 1923 through 1977 may be in the public domain either because their copyright was not registered, or because their copyrights were not renewed after an initial term. Unfortunately, determining the copyright status of these books requires a review of the copyright records of registration and renewal. Unfortunately, these records were all on paper. Digital scans of these records were made, and are available from the Internet Archive, but searching the scans is not easy.</p>
|
||||
<p>To make this task more manageable, work has gone underway to convert the Catalog of Copyright Entries (CCEs) into well-structured XML data. The CCEs are comprised of about 450,000 pages and are printed compilations of brief registration and renewal records. These records were published by the Copyright Office at regular intervals, ranging in length from semi-weekly to semi-annually. The CCEs are divided by classes of works, such as books, periodicals, music, drama, maps, photographs, etc. Conversion of a set of 10,000 pages of book registration records published between 1923 and 1964 has been completed, and the result is publicly <a href="https://github.com/NYPL/catalog_of_copyright_entries_project">available</a>.</p>
|
||||
<p>This website serves as a user-friendly interface for librarians, archivists, and rights researchers to make use of the XML data.</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -1,102 +1,50 @@
|
|||
<!doctype html>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{% block title %}{% endblock %} - CCE Search</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='uswds.css') }}">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
|
||||
<meta name="twitter:card" content="summary" />
|
||||
<meta name="twitter:site" content="@rdmond" />
|
||||
<meta name="twitter:title" content="Unofficial copyright search prototype" />
|
||||
<meta name="twitter:description" content="Unofficial, experimental interface to search records digitized by NYPL's Catalog of Copyright Entries project" />
|
||||
<meta name="twitter:image" content="https://cce-search.herokuapp.com/static/cce-volume.jpg" />
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"
|
||||
integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
|
||||
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"
|
||||
integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
|
||||
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
|
||||
<link rel="stylesheet" href="/static/styles.css">
|
||||
|
||||
<head>
|
||||
<title>Copyright Renewals</title>
|
||||
</head>
|
||||
|
||||
<body >
|
||||
|
||||
<body>
|
||||
<a class="usa-skipnav" href="#main-content">Skip to main content</a>
|
||||
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
||||
<a class="navbar-brand">Copyright Renewals</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
|
||||
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
<header class="usa-header usa-header--basic grid-container" role="banner">
|
||||
<div class="grid-row">
|
||||
<div class="grid-col-10">
|
||||
<div class="usa-logo">
|
||||
<h1 class="usa-logo__text">
|
||||
<a href="/" title="Home" aria-label="Home">US Copyright Search</a>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
<div>Search for copyright registrations and renewals on books from the <i>Catalog of Copyright Entries</i></div>
|
||||
</div>
|
||||
<div class="grid-col-2">
|
||||
<nav role="navigation" class="usa-nav">
|
||||
<ul class="usa-nav__primary usa-accordion">
|
||||
<li class="usa-nav__primary-item">
|
||||
<a class="usa-nav__link" href="/">Search</a>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav mr-auto">
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="/">Search <span class="sr-only"></span></a>
|
||||
</li>
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="/about">About Us <span class="sr-only"></span></a>
|
||||
</li>
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="https://github.com/NYPL/catalog_of_copyright_entries_project">Copyrights Catalog <span class="sr-only"></span></a>
|
||||
</li>
|
||||
<li class="usa-nav__primary-item">
|
||||
<a class="usa-nav__link" href="/about">About
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
||||
|
||||
<main id="main-content" class="grid-container">
|
||||
{% block header %}{% endblock %}
|
||||
{% for message in get_flashed_messages() %}
|
||||
<div class="flash">{{ message }}</div>
|
||||
{% endfor %}
|
||||
{% block content %}{% endblock %}
|
||||
</main>
|
||||
|
||||
<footer class="usa-footer usa-footer--slim" role="contentinfo">
|
||||
<div class="grid-container usa-footer__return-to-top">
|
||||
<a href="#">Return to top</a>
|
||||
</div>
|
||||
<div class="usa-footer__primary-section">
|
||||
<div class="grid-row grid-row maxw-desktop margin-x-auto desktop:padding-x-4">
|
||||
<div class="mobile-lg:grid-col-8">
|
||||
<nav class="usa-footer__nav">
|
||||
<ul class="add-list-reset grid-row grid-gap">
|
||||
<li class="mobile-lg:grid-col-6 desktop:grid-col-auto usa-footer__primary-content">
|
||||
<a class="usa-footer__primary-link" href="/">Search</a>
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="https://www.nypl.org/">NYPL <span class="sr-only"></span></a>
|
||||
</li>
|
||||
<li class="mobile-lg:grid-col-6 desktop:grid-col-auto usa-footer__primary-content">
|
||||
<a class="usa-footer__primary-link" href="/about">About</a>
|
||||
</li>
|
||||
<li class="mobile-lg:grid-col-6 desktop:grid-col-auto usa-footer__primary-content">
|
||||
<a class="usa-footer__primary-link" href="/about#reporting-errors">Report an Error</a>
|
||||
</li>
|
||||
<li class="mobile-lg:grid-col-6 desktop:grid-col-auto usa-footer__primary-content">
|
||||
<a class="usa-footer__primary-link" href="/about#get-code">Get the Code</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="mobile-lg:grid-col-4">
|
||||
<address class="usa-footer__address">
|
||||
<div class="grid-row grid-gap mobile-lg:grid-gap-0">
|
||||
<div class="grid-col-auto mobile-lg:grid-col-12 desktop:grid-col-auto">
|
||||
<div class="usa-footer__contact-info">
|
||||
<a href="https://twitter.com/rdmond">@rdmond</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</address>
|
||||
</div>
|
||||
</div>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="usa-footer__secondary-section">
|
||||
<div class="grid-container">
|
||||
<div class="usa-footer__logo grid-row grid-gap-2">
|
||||
An unofficial, experimental interface to search records digitized by NYPL's <a href="https://github.com/NYPL/catalog_of_copyright_entries_project">Catalog of Copyright Entries project</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</nav>
|
||||
{% block content %}{% endblock %}
|
||||
</body>
|
||||
|
||||
</html>
|
After Width: | Height: | Size: 151 KiB |
|
@ -0,0 +1,53 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
|
||||
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"
|
||||
integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
|
||||
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"
|
||||
integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
|
||||
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
|
||||
<link rel="stylesheet" href="/static/styles.css">
|
||||
|
||||
<head>
|
||||
<title>Copyright Renewals</title>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
||||
<a class="navbar-brand">Copyright Renewals</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
|
||||
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav mr-auto">
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="/">Search <span class="sr-only"></span></a>
|
||||
</li>
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="about">About Us <span class="sr-only"></span></a>
|
||||
</li>
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="#">Copyrights <span class="sr-only"></span></a>
|
||||
</li>
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="#">NYPL <span class="sr-only"></span></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="bg">
|
||||
<div class="results">
|
||||
<h1>Static Results page</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -6,9 +6,11 @@
|
|||
|
||||
{% block content %}
|
||||
{% if result["type"] %}
|
||||
{% include "search/render_renewal.html" %}
|
||||
{% include "search/new_renewal.html" %}
|
||||
{% else %}
|
||||
{% include "search/render_registration.html" %}
|
||||
<div class="results">
|
||||
{% include "search/new_registration.html" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -1,74 +1,41 @@
|
|||
{% extends 'base.html' %}
|
||||
|
||||
{% block header %}
|
||||
<h2>{% block title %}Find Copyright Entries{% endblock %}</h2>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="grid-row">
|
||||
<div class="tablet:grid-col-8">
|
||||
<h3>Search</h3>
|
||||
<form method="get" class="usa-form">
|
||||
<fieldset class="usa-fieldset">
|
||||
<legend>Search Type</legend>
|
||||
<div class="usa-radio">
|
||||
<input class="usa-radio__input" id="type_ft" type="radio"
|
||||
{% if search_type == "ft" %}checked{% endif %} name="type"
|
||||
value="ft">
|
||||
<label class="usa-radio__label" for="type_ft">Full Text</label>
|
||||
</div>
|
||||
<div class="usa-radio">
|
||||
<input class="usa-radio__input" id="type_registration" type="radio"
|
||||
{% if search_type == "reg" %}checked{% endif %} name="type"
|
||||
value="reg">
|
||||
<label class="usa-radio__label" for="type_registration">Registration Number</label>
|
||||
</div>
|
||||
<div class="usa-radio">
|
||||
<input class="usa-radio__input" id="type_renewal" type="radio"
|
||||
{% if search_type == "ren" %}checked{% endif %} name="type"
|
||||
value="ren">
|
||||
<label class="usa-radio__label" for="type_renewal">Renewal Number</label>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
|
||||
<label for="term" class="usa-label">Search For</label>
|
||||
<input name="term" id="term" required class="usa-input"
|
||||
{% if term %} value="{{ term }}" {% endif %} >
|
||||
|
||||
<input type="submit" value="Search" class="usa-button">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="tablet:grid-col">
|
||||
<h3>Search Hints</h3>
|
||||
|
||||
<ul>
|
||||
<li>Use “Full Text” for authors, titles, and publishers</li>
|
||||
<li>Use quotation marks to search phrases (for example "Grapes of Wrath")</li>
|
||||
<li>Searches are case insensitive</li>
|
||||
<li>Renewal numbers look like <tt>R12345</tt> or <tt>RE12345</tt></li>
|
||||
<li>Registration numbers look like <tt>A12345</tt>, <tt>BB12345</tt>, <tt>D12345</tt>. That is, they start with many letters or combination of letters, but not “R” or “RE”</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if results %}
|
||||
<h2>Results</h2>
|
||||
{% block content %}
|
||||
|
||||
{% if results %}
|
||||
{% include "search/paging.html" %}
|
||||
|
||||
<ul class="usa-list usa-list--unstyled">
|
||||
{% for result in results %}
|
||||
{% if result['type'] %}
|
||||
<li>{% include "search/render_renewal.html" %}</li>
|
||||
{% else %}
|
||||
<li>{% include "search/render_registration.html" %}</li>
|
||||
{% endif %}
|
||||
<div class = "results">
|
||||
<!-- {% include "search/render_registration.html" %} -->
|
||||
{% include "search/new_registration.html" %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% include "search/paging.html" %}
|
||||
|
||||
|
||||
<div class="py-5 text-center">
|
||||
<div class = "content">
|
||||
<h1>Copyright Search</h1>
|
||||
<p id="cprr">Search for copyright registrations and renewals on books from the Catalog of Copyright Entries.</p>
|
||||
<p>Find a book:</p>
|
||||
<form>
|
||||
<input type="text" name="title" id="title" placeholder="Title" autocomplete="off"><br>
|
||||
<input type="text" name="author" placeholder="Author" autocomplete="off"><br>
|
||||
<input type="text" name="publisher" placeholder="Publisher" autocomplete="off"><br>
|
||||
<input type="text" name="registration" placeholder="Registration Number" autocomplete="off"><br>
|
||||
<input type="text" name="renewal" placeholder="Renewal Number" autocomplete="off"><br>
|
||||
<button type="submit" class="btn btn-secondary">Search</button>
|
||||
</form>
|
||||
{% if noresults %}
|
||||
<br>
|
||||
<div class="alert alert-danger" role="alert">No results found. Please try another search.</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
|
|
@ -0,0 +1,103 @@
|
|||
<h3>Registration {{ result['registrations'][0]['number'] }}</h3>
|
||||
<table class="table table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">Title</th>
|
||||
<td>{{ result['title'] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Authors</th>
|
||||
<td>
|
||||
{% for a in result['authors'] %}
|
||||
<p>{{ a }}</p>
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Registrations</th>
|
||||
<td>
|
||||
{% for r in result['registrations'] %}
|
||||
<p>{{ r['number'] }} {{ r['date'] }}</p>
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
{% if result['copies'] %}
|
||||
<tr>
|
||||
<th scope="row">Copies</th>
|
||||
<td>{{ result['copies'] }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
||||
{% if result['copy_date'] %}
|
||||
<tr>
|
||||
<th scope="row">Copy Date</th>
|
||||
<td>{{ result['copy_date'] }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
||||
{% if result['description'] %}
|
||||
<tr>
|
||||
<th scope="row">Description</th>
|
||||
<td>{{ result['description'] }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
||||
{% if result['pub_date'] %}
|
||||
<tr>
|
||||
<th scope="row">Publication Date</th>
|
||||
<td>{{ result['pub_date'] }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
||||
{% if result['publishers'] %}
|
||||
<tr>
|
||||
<th scope="row">Publishers</th>
|
||||
<td>
|
||||
{% for p in result['publishers'] %}
|
||||
<p>{{p}}</p>
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
||||
<tr>
|
||||
<th scope="row">Renewals</th>
|
||||
<td>
|
||||
{% if result['is_post_1963'] %}
|
||||
<em>Works published after 1963 do not require renewal and are in copyright</em>
|
||||
{% else %}
|
||||
{% if result['renewals'] %}
|
||||
{% for renewal in result['renewals'] %}
|
||||
{% include "search/render_child_renewal.html" %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<em>No renewals found</em>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if result['is_foreign'] %}
|
||||
<br>See note on <a href="/registration-classes#foreign">Foreign publications</a>
|
||||
{% endif %}
|
||||
|
||||
{% if result['is_interim'] %}
|
||||
<br>See note on <a href="/registration-classes#interim">Interim registrations</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Source</th>
|
||||
<td>
|
||||
<a href="{{ result['source_url'] }}">
|
||||
{{ result['source']['year'] }} p. {{ result['source']['page'] }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Original</th>
|
||||
<td>{{ result['original'] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">CCEID</th>
|
||||
<td><a href="/cceid/{{ result['uuid'] }}">{{ result['uuid'] }}</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
|
@ -0,0 +1,51 @@
|
|||
<h3>Renewal {{ result['renewal_num'] }}</h3>
|
||||
<table class="table table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">Title</th>
|
||||
<td>{{ result['title'] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Authors</th>
|
||||
<td>{{ result['author'] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Renewal</th>
|
||||
<td>{{ result['renewal_num'] }} {{ result['renewal_date'] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Claimants</th>
|
||||
<td>
|
||||
{% for c in result['claimants'] %}
|
||||
<p>{{ c['name'] }} ({{ c['type'] }})</p>
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
{% if result['new_matter'] %}
|
||||
<tr>
|
||||
<th scope="row">New Matter</th>
|
||||
<td>{{ result['new_matter'] }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
||||
{% if result['notes'] %}
|
||||
<tr>
|
||||
<th scope="row">Notes</th>
|
||||
<td>{{ result['notes'] }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
||||
{% if result['source'] %}
|
||||
<tr>
|
||||
<th scope="row">Original</th>
|
||||
<td>{{ result['source'] }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
||||
<tr>
|
||||
<th scope="row">CCEID</th>
|
||||
<td><a href="/cceid/{{ result['uuid'] }}">{{ result['uuid'] }}</a></dd>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
|
@ -1,29 +1,44 @@
|
|||
{% if paging["has_pages"] %}
|
||||
<nav aria-label="pagination" class="pagination">
|
||||
<ul class="usa-list usa-list--unstyled">
|
||||
<nav class="nav justify-content-end">
|
||||
|
||||
{% if paging['pages']['first'] %}
|
||||
<li><a href="{{ paging['pages']['first'] }}">First</a></li>
|
||||
<span class="badge badge-light">
|
||||
<a href="{{ paging['pages']['first'] }}">First</a>
|
||||
</span>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if paging['pages']['previous'] %}
|
||||
<li><a href="{{ paging['pages']['previous'] }}">Previous</a></li>
|
||||
<span class="badge badge-light">
|
||||
<a href="{{ paging['pages']['previous'] }}">Previous</a>
|
||||
</span>
|
||||
{% endif %}
|
||||
|
||||
<li>Page {{ paging["current_page"] }} of {{ paging["last_page"] }}</li>
|
||||
<span class="badge badge-primary">
|
||||
Page {{ paging["current_page"] }} of {{ paging["last_page"] }}
|
||||
</span>
|
||||
|
||||
{% if paging['pages']['next'] %}
|
||||
<li><a href="{{ paging['pages']['next'] }}">Next</a></li>
|
||||
<span class="badge badge-light">
|
||||
<a href="{{ paging['pages']['next'] }}">Next</a>
|
||||
</span>
|
||||
{% endif %}
|
||||
|
||||
{% if paging['pages']['last'] %}
|
||||
<li><a href="{{ paging['pages']['last'] }}">Last</a></li>
|
||||
<span class="badge badge-light">
|
||||
<a href="{{ paging['pages']['last'] }}">Last</a>
|
||||
</span>
|
||||
{% endif %}
|
||||
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
<div class="float-right badge badge-light">
|
||||
<a href="/">Back To Search</a>
|
||||
</div>
|
||||
<br>
|
||||
{% else %}
|
||||
{% if results %}
|
||||
<div class="pagination">Page 1 of 1</div>
|
||||
{% endif %}
|
||||
<div class="nav justify-content-end">Page 1 of 1</div>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
|
|
@ -1,17 +1,13 @@
|
|||
<div class="grid-col-4">
|
||||
<a href="/cceid/{{ renewal['uuid'] }}">
|
||||
<p><a href="/cceid/{{ renewal['uuid'] }}">
|
||||
{{ renewal['renewal_num'] }} {{ renewal['renewal_date'] }}
|
||||
</a>
|
||||
</div>
|
||||
</a></p>
|
||||
|
||||
<div class="grid-col-6">
|
||||
<div>
|
||||
<p>
|
||||
{{ renewal['author'] }} {{ renewal['title'] }}
|
||||
</div>
|
||||
</p>
|
||||
|
||||
<ul class="usa-list usa-list--unstyled">
|
||||
{% for cl in renewal['claimants'] %}
|
||||
<li>{{ cl['name'] }} ({{ cl['type'] }})</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -1,73 +1,68 @@
|
|||
<div class="info-card registration grid-container">
|
||||
<h3>Registration {{ result['registrations'][0]['number'] }}</h3>
|
||||
<<<<<<< HEAD
|
||||
|
||||
<div>
|
||||
<dl class="grid-row">
|
||||
<dt class="grid-col-2">Title</dt>
|
||||
<dd class="grid-col-9">{{ result['title'] }}</dd>
|
||||
<div class = "d-flex"><h3>Title: {{ result['title'] }}</h3></div>
|
||||
<dl>
|
||||
|
||||
=======
|
||||
<div class = "d-flex"><h3>Registration {{ result['registrations'][0]['number'] }}</h3></div>
|
||||
<dl>
|
||||
|
||||
<div class="row">
|
||||
<div class="col col-sm-6"><b>Title</b></div>
|
||||
<div class="col col-sm-6">{{ result['title'] }}</div>
|
||||
</div>
|
||||
>>>>>>> 64bb8e084d56712426a580424bbea10580ed97dc
|
||||
|
||||
<dt class="grid-col-2">Authors</dt>
|
||||
<dd class="grid-col-9">
|
||||
<ul class="usa-list usa-list--unstyled">
|
||||
<div class = "row">
|
||||
<div class="col col-sm-6"><b>Authors</b></div>
|
||||
{% for a in result['authors'] %}
|
||||
<li>{{ a }}</li>
|
||||
<div class="col col-sm-6">-{{ a }}</div>
|
||||
<div class="col-sm-6"> </div>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</dd>
|
||||
</div>
|
||||
|
||||
<dt class="grid-col-2">Registrations</dt>
|
||||
<dd class="grid-col-9">
|
||||
<ul class="usa-list usa-list--unstyled">
|
||||
<div class="row">
|
||||
<div class="col-sm-6"><b>Registrations</b></div>
|
||||
{% for r in result['registrations'] %}
|
||||
<li>{{ r['number'] }} {{ r['date'] }}</li>
|
||||
<div class="col-sm-6">-{{ r['number'] }} {{ r['date'] }}</div>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</dd>
|
||||
</div>
|
||||
|
||||
{% if result['copies'] %}
|
||||
<dt class="grid-col-2">Copies</dt>
|
||||
<dd class="grid-col-9">{{ result['copies'] }}</dd>
|
||||
<dt>Copies</dt>
|
||||
{{ result['copies'] }}
|
||||
{% endif %}
|
||||
|
||||
{% if result['copy_date'] %}
|
||||
<dt class="grid-col-2">Copy Date</dt>
|
||||
<dd class="grid-col-9">{{ result['copy_date'] }}</dd>
|
||||
<dt>Copy Date</dt>
|
||||
{{ result['copy_date'] }}
|
||||
{% endif %}
|
||||
|
||||
{% if result['description'] %}
|
||||
<dt class="grid-col-2">Description</dt>
|
||||
<dd class="grid-col-9">{{ result['description'] }}</dd>
|
||||
<dt>Description</dt>
|
||||
{{ result['description'] }}
|
||||
{% endif %}
|
||||
|
||||
{% if result['pub_date'] %}
|
||||
<dt class="grid-col-2">Publication Date</dt>
|
||||
<dd class="grid-col-9">{{ result['pub_date'] }}</dd>
|
||||
<dt>Publication Date</dt>
|
||||
{{ result['pub_date'] }}
|
||||
{% endif %}
|
||||
|
||||
{% if result['publishers'] %}
|
||||
<dt class="grid-col-2">Publishers</dt>
|
||||
<dd class="grid-col-9">
|
||||
<ul class="usa-list usa-list--unstyled">
|
||||
<dt>Publishers</dt>
|
||||
{% for p in result['publishers'] %}
|
||||
<li>{{ p }}</li>
|
||||
- {{ p }}<br>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</dd>
|
||||
{% endif %}
|
||||
|
||||
<dt class="grid-col-2">Renewals</dt>
|
||||
<dd class="grid-col-9">
|
||||
<dt>Renewals</dt>
|
||||
{% if result['is_post_1963'] %}
|
||||
<em>Works published after 1963 do not require renewal and are in copyright</em>
|
||||
{% else %}
|
||||
{% if result['renewals'] %}
|
||||
<ul class="child-renewal grid-container usa-list usa-list--unstyled">
|
||||
{% for renewal in result['renewals'] %}
|
||||
<li class="grid-row">
|
||||
{% include "search/render_child_renewal.html" %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<em>No renewals found</em>
|
||||
{% endif %}
|
||||
|
@ -80,26 +75,16 @@
|
|||
{% if result['is_interim'] %}
|
||||
<p>See note on <a href="/registration-classes#interim">Interim registrations</a></p>
|
||||
{% endif %}
|
||||
</dd>
|
||||
|
||||
<dt class="grid-col-2">Source</dt>
|
||||
<dd class="grid-col-9">
|
||||
<dt>Source</dt>
|
||||
<a href="{{ result['source_url'] }}">
|
||||
{{ result['source']['year'] }} p. {{ result['source']['page'] }}
|
||||
</a>
|
||||
</dd>
|
||||
|
||||
<dt class="grid-col-2">Original</dt>
|
||||
<dd class="grid-col-9">{{ result['original'] }}</dd>
|
||||
<dt>Original</dt>
|
||||
{{ result['original'] }}
|
||||
|
||||
<dt class="grid-col-2">CCEID</dt>
|
||||
<dd class="grid-col-9">
|
||||
<dt>CCEID</dt>
|
||||
<a href="/cceid/{{ result['uuid'] }}">{{ result['uuid'] }}</a>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<div class="info-card renewal grid-container">
|
||||
<h3>Renewal {{ result['renewal_num'] }}</h3>
|
||||
|
||||
<div>
|
||||
<h2>Renewal {{ result['renewal_num'] }}</h2>
|
||||
<dl class="grid-row">
|
||||
<dt class="grid-col-2">Title</dt>
|
||||
<dd class="grid-col-9">{{ result['title'] }}</dd>
|
||||
|
@ -43,6 +41,4 @@
|
|||
<a href="/cceid/{{ result['uuid'] }}">{{ result['uuid'] }}</a>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|