MCPcopy Create free account

hub / github.com/internetarchive/openlibrary / functions

Functions6,179 in github.com/internetarchive/openlibrary

↓ 19 callersMethodkeys
(self, **kw)
openlibrary/mocks/mock_infobase.py:387
↓ 19 callersMethodload
(self, data)
openlibrary/plugins/openlibrary/code.py:784
↓ 19 callersFunctionlog
(*args)
openlibrary/data/dump.py:29
↓ 19 callersMethodlog
:param PLogEntry entry:
scripts/solr_builder/solr_builder/solr_builder.py:453
↓ 19 callersMethodquery
Query Open Library. Open Library always limits the result to 1000 items due to performance issues. Pass limit=False to fetch all matc
openlibrary/api.py:174
↓ 19 callersMethodvalidate
Validate the given import data. Return True if the import object is valid. Successful validation of either model is sufficient, thou
openlibrary/plugins/importapi/import_validator.py:90
↓ 18 callersMethodadd_items
:param items: either a list of `ia_id` (legacy) or a list of dicts containing keys `ia_id` and book `data`. In the case of
openlibrary/core/imports.py:103
↓ 18 callersFunctionnormalize_isbn
Takes an isbn-like string, keeps only numbers and X/x, and returns an ISBN-like string or None. Does NOT validate length or checkdigits.
openlibrary/utils/isbn.py:71
↓ 18 callersFunctionresponse
(status="ok", **kwargs)
openlibrary/plugins/upstream/edits.py:24
↓ 18 callersMethodsave_many
(self, docs, comment=None, data=None, action=None)
openlibrary/plugins/upstream/tests/test_merge_authors.py:59
↓ 18 callersMethodsetcookie
(name, value, expires)
openlibrary/tests/core/test_processors_invalidation.py:169
↓ 17 callersFunctionauthor_import_record_to_author
Converts an import style new-author dictionary into an Open Library existing author, or new author candidate, representation. Does NOT cr
openlibrary/catalog/add_book/load_book.py:297
↓ 17 callersMethodclose
Hides the toast component and removes it from the DOM.
openlibrary/plugins/openlibrary/js/Toast.js:38
↓ 17 callersMethoddialog
@returns {HTMLDialogElement}
openlibrary/components/lit/OlDialog.js:355
↓ 17 callersFunctionisValidLccn
(lccn)
openlibrary/plugins/openlibrary/js/idValidation.js:100
↓ 17 callersFunctionmd
(text)
openlibrary/tests/core/test_olmarkdown.py:5
↓ 17 callersMethodnow
(cls, tz=None)
scripts/solr_updater/tests/test_trending_updater_init.py:20
↓ 17 callersMethodquicksave
Handy utility to save an object with less code and get the saved object as return value. foo = mock_site.quicksave("/books/OL1M", "/type/edit
openlibrary/mocks/mock_infobase.py:122
↓ 17 callersMethodrequest
(self, sitename, path, method="GET", data=None)
openlibrary/plugins/openlibrary/connection.py:555
↓ 16 callersMethod_isActive
(type, options = {})
openlibrary/components/lit/OLMarkdownEditor.js:563
↓ 16 callersMethodcommit
Saves all the collected docs.
openlibrary/plugins/upstream/addbook.py:140
↓ 16 callersMethodcreate
Creates a new Tag object.
openlibrary/core/models.py:1265
↓ 16 callersFunctioncreatesubSection
(array, text)
openlibrary/plugins/openlibrary/js/team.js:185
↓ 16 callersMethodinitialize
* Adds click listener to dropper's toggle arrow.
openlibrary/plugins/openlibrary/js/dropper/Dropper.js:79
↓ 16 callersFunctionis_valid_date
Validates dates. Dates are considered valid if there is: 1. A year only. 2. A year and a month only. 3. A year, month, and day.
openlibrary/plugins/upstream/checkins.py:31
↓ 16 callersFunctionmake_thing
(key: str, title: str = "", thing_type: str | None = None)
openlibrary/plugins/admin/tests/test_code.py:22
↓ 16 callersFunctionnormalize
Normalizes a title for matching purposes, not display, by lowercasing, unicode -> NFC, stripping extra whitespace and punctuation, and re
openlibrary/catalog/add_book/match.py:60
↓ 16 callersMethodparse_args
(self, args: typing.Sequence[str] | None = None)
scripts/solr_builder/solr_builder/fn_to_cli.py:74
↓ 16 callersMethodthings
(self, sitename, data)
openlibrary/plugins/openlibrary/connection.py:78
↓ 16 callersMethodwrap
Wrap an async function so it can be called from sync code, preserving type hints. Args: func: The async function to wrap
openlibrary/utils/async_utils.py:29
↓ 15 callersMethodadd_list
(self, name, values, prefix="", attrs=None)
openlibrary/plugins/openlibrary/opds.py:68
↓ 15 callersMethodformat
(self)
openlibrary/solr/updater/work.py:619
↓ 15 callersMethodfrom_markdown
Parse one row of table of contents. >>> def f(text): ... d = TocEntry.from_markdown(text) ... return (d.leve
openlibrary/plugins/upstream/table_of_contents.py:90
↓ 15 callersMethodfrom_yaml
Load feature flags from the ``features:`` section of a YAML file. YAML keys are expected to match field names (kebab-case keys like `
openlibrary/core/features.py:39
↓ 15 callersMethodget_by_email
the email stored in account doc is case-sensitive. The lowercase of email is used in the account-email document. querying that first a
openlibrary/accounts/model.py:628
↓ 15 callersMethodget_by_username
Retrieves and OpenLibraryAccount by username if it exists or
openlibrary/accounts/model.py:605
↓ 15 callersFunctionload_config
Loads the config file. The loaded config will be available via infogami.config.
openlibrary/config.py:33
↓ 15 callersMethodnew_key
(self, type)
openlibrary/mocks/mock_infobase.py:303
↓ 15 callersFunctionreadRecentSearches
()
openlibrary/plugins/openlibrary/js/search-modal/constants.js:386
↓ 15 callersMethodthings
(self, query)
openlibrary/plugins/upstream/tests/test_merge_authors.py:44
↓ 14 callersMethodcount
(self, tables, where, vars)
openlibrary/plugins/ol_infobase.py:245
↓ 14 callersFunctioneditions_matched
Search OL for editions matching record's 'key' value. :param dict rec: Edition import record :param str key: Key to search on, e.g. 'isb
openlibrary/catalog/add_book/__init__.py:531
↓ 14 callersFunctionexpand_record
Returns an expanded representation of an edition dict, usable for accurate comparisons between existing and new records. :param dict
openlibrary/catalog/add_book/match.py:120
↓ 14 callersMethodget_relpath
e.g. s_covers_0008/s_covers_0008_82.zip or covers_0008/covers_0008_82.zip
openlibrary/coverstore/archive.py:73
↓ 14 callersFunctionis_low_quality_book
Check if a book item is of low quality which means that 1) one of its authors (regardless of case) is in the set of excluded authors.
scripts/partner_batch_imports.py:345
↓ 14 callersFunctionloadGraphIfExists
(id, options, tooltip_message, color)
openlibrary/plugins/openlibrary/js/graphs/plot.js:285
↓ 14 callersFunctionluqum_parser
Parses a lucene-like query, with the special binding rules of Open Library. In our queries, unlike native solr/lucene, field names are greed
openlibrary/solr/query_utils.py:139
↓ 14 callersFunctionqueryMatchesName
(query, name)
openlibrary/plugins/openlibrary/js/search-modal/authorSuggestion.js:40
↓ 14 callersFunctionquery_matches_name
True when the query names the author. Matches on word boundaries only, so a query can't match mid-word ("art" must not surface "Bart ..."):
openlibrary/plugins/worksearch/author_suggestion.py:34
↓ 14 callersFunctionsafeget
TODO: DRY with solrbuilder copy >>> safeget(lambda: {}['foo']) >>> safeget(lambda: {}['foo']['bar'][0]) >>> safeget(lambda: {'foo': [
openlibrary/plugins/upstream/utils.py:655
↓ 14 callersMethodsave
Update work and edition documents according to the specified formdata.
openlibrary/plugins/upstream/addbook.py:552
↓ 14 callersFunctionwork
Build a Solr-style work doc with a single primary author.
openlibrary/plugins/worksearch/tests/test_author_suggestion.py:15
↓ 14 callersFunctionwork
Build a /search.json-style work doc with a single primary author.
tests/unit/js/searchModalAuthor.test.js:8
↓ 13 callersMethodadd
(self, docs)
openlibrary/plugins/upstream/tests/test_merge_authors.py:64
↓ 13 callersFunctionauthor_dates_match
Checks if the years of two authors match. Only compares years, not names or keys. Works by returning False if any year specified in one recor
openlibrary/catalog/utils/__init__.py:50
↓ 13 callersMethoddelete
(key, comment="")
openlibrary/plugins/upstream/addbook.py:669
↓ 13 callersFunctionget_jinja_env
Lazily initialize and return the Jinja2 environment (cached after first call). Per Jinja docs, a single Environment instance should be reused to
openlibrary/core/jinja.py:25
↓ 13 callersMethodget_many
(self, sitename, data)
openlibrary/plugins/openlibrary/connection.py:318
↓ 13 callersFunctionget_solr
()
openlibrary/plugins/worksearch/search.py:11
↓ 13 callersMethodis_librarian_or_higher
(self)
openlibrary/core/models.py:973
↓ 13 callersFunctionjoin
(items)
openlibrary/plugins/openlibrary/js/jsdef.js:45
↓ 13 callersMethodnormalize
Normalize a tag/subject name to a URL-safe lowercase slug. Canonical form for stored tag names and subject URL keys. Delegates to nor
openlibrary/core/models.py:1247
↓ 13 callersFunctionnormalize_import_record
Normalize the import record by: - Verifying required fields; - Ensuring source_records is a list; - Splitting subtitles o
openlibrary/catalog/add_book/__init__.py:745
↓ 13 callersFunctionreadableLanguageMismatch
({ edition, languages, siteLanguage, options })
openlibrary/plugins/openlibrary/js/search-modal/constants.js:312
↓ 13 callersMethodrun
* * @param {ExtractionOptions} extractOptions * @param {string} text * @returns {Promise<BookMatch[]>}
openlibrary/components/BulkSearch/utils/classes.js:79
↓ 13 callersMethodsearch
(self, query, limit=10, offset=0, fields: list[str] | None = None)
openlibrary/api.py:211
↓ 13 callersMethodserialize
Takes a full Amazon product Advertising API returned AmazonProduct with multiple ResponseGroups, and extracts the data we are interest
openlibrary/core/vendors.py:173
↓ 12 callersFunctiondicthash
Dictionaries are not hashable. This function converts dictionary into nested tuples, so that it can hashed.
openlibrary/utils/__init__.py:102
↓ 12 callersMethodget_many
(self, keys)
openlibrary/plugins/upstream/tests/test_merge_authors.py:53
↓ 12 callersMethodget_user
A user is where preferences are attached to an account. An "Account" is outside of infogami in a separate table and is used to store p
openlibrary/accounts/model.py:376
↓ 12 callersFunctionisbn_13_to_isbn_10
(isbn_13: str)
openlibrary/utils/isbn.py:41
↓ 12 callersFunctionmake_test_account
(username: str)
openlibrary/plugins/admin/tests/test_code.py:11
↓ 12 callersMethodnew
(self, query, comment=None, action=None)
openlibrary/api.py:171
↓ 12 callersFunctionparseLccn
(lccn)
openlibrary/plugins/openlibrary/js/idValidation.js:72
↓ 12 callersMethodpreferences
(self)
openlibrary/core/models.py:927
↓ 12 callersMethodraise_for_status
(self)
scripts/tests/test_obfi.py:22
↓ 12 callersFunctionreadableEditionLanguages
({ edition, languages, options })
openlibrary/plugins/openlibrary/js/search-modal/constants.js:341
↓ 12 callersMethodrender
(self)
openlibrary/utils/form.py:148
↓ 12 callersFunctionsafe_seeother
Safe version of `web.seeother` which encodes the url path appropriately using `encode_url_path`.
openlibrary/plugins/upstream/addbook.py:199
↓ 12 callersFunctionsaveRecentSearch
(query)
openlibrary/plugins/openlibrary/js/search-modal/constants.js:401
↓ 12 callersFunctionsearch
Helper function to make search requests with query parameters. This helper provides a cleaner interface for making search requests by accepti
openlibrary/tests/fastapi/test_search.py:26
↓ 12 callersMethodungettext
(self, message1, message2, n)
openlibrary/tests/core/test_i18n.py:13
↓ 12 callersFunctionurlencode
urlencodes the given data dictionary. If any of the value is a file object, data is multipart encoded. @@@ should go into web.browser
openlibrary/coverstore/utils.py:166
↓ 12 callersMethodverify
Verify an HMAC digest against a message with timestamp validation. This method validates that the provided HMAC digest matches the e
openlibrary/core/auth.py:25
↓ 11 callersFunction_anonymize_post
( client, *, data=None, headers=None, hmac_return_value=True, hmac_side_effect=None,
openlibrary/tests/fastapi/test_account.py:14
↓ 11 callersFunction_full_config
(**overrides: str)
openlibrary/tests/core/test_features.py:14
↓ 11 callersMethodcompute_sortable_rating
Computes a rating that can be used for sorting works by rating. It takes into account the fact that a book with only 1 rating that is
openlibrary/core/ratings.py:117
↓ 11 callersFunctiondebounce
(func, threshold=100, execAsap=false)
openlibrary/plugins/openlibrary/js/nonjquery_utils.js:15
↓ 11 callersMethoddump
(self, d)
openlibrary/plugins/openlibrary/code.py:780
↓ 11 callersFunctionf
(k)
openlibrary/plugins/openlibrary/code.py:166
↓ 11 callersMethodis_admin
Returns True if the current user is in admin usergroup.
openlibrary/plugins/admin/code.py:154
↓ 11 callersFunctionisbn_10_to_isbn_13
(isbn_10: str)
openlibrary/utils/isbn.py:48
↓ 11 callersFunctionopen_test_data
Returns a file handle to file with specified filename inside test_data directory.
openlibrary/catalog/add_book/tests/test_add_book.py:31
↓ 11 callersMethodset
(self, key, value)
openlibrary/tests/core/test_cache.py:103
↓ 11 callersMethodset_status
(self, status, error=None, ol_key=None)
openlibrary/core/imports.py:238
↓ 11 callersMethodstart
Start the configured executors and job stores and begin processing scheduled jobs. :param bool paused: if ``True``, don't start job
scripts/utils/scheduler.py:94
↓ 11 callersFunctionthreshold_match
Determines (according to a threshold) whether two edition representations are sufficiently the same. Used when importing new books. :par
openlibrary/catalog/add_book/match.py:432
↓ 11 callersFunctionwrap_jsonp
Wrap data in JSONP callback if callback param is present. Always returns a Response object. Accepts a dict or list (which will be JSON-serial
openlibrary/fastapi/models.py:61
↓ 10 callersMethod_make_handler
(self)
openlibrary/plugins/openlibrary/tests/test_verification.py:39
↓ 10 callersMethod_request
( self, path, method="GET", data=None, headers=None, params=No
openlibrary/api.py:45
← previousnext →101–200 of 6,179, ranked by callers