MCPcopy Create free account

hub / github.com/internetarchive/openlibrary / functions

Functions6,179 in github.com/internetarchive/openlibrary

↓ 2 callersMethod_updateBackgroundColor
()
openlibrary/components/lit/OLReadMore.js:156
↓ 2 callersFunction_update_spam_doc
(**kwargs)
openlibrary/plugins/upstream/spamcheck.py:29
↓ 2 callersFunction_validate_catalog
( catalog: Catalog, )
openlibrary/i18n/__init__.py:75
↓ 2 callersFunction_write_test_config
(tmp_path: Path, body: str | None = None)
openlibrary/tests/core/test_features.py:28
↓ 2 callersMethodadd
(self, key, value)
openlibrary/mocks/mock_memcache.py:21
↓ 2 callersFunctionaddGoalEditClickListener
* Adds click listener to the given edit link. * * Given modal will be displayed when the edit link * is clicked. * @param {HTMLElement} editLink A
openlibrary/plugins/openlibrary/js/reading-goals/index.js:67
↓ 2 callersFunctionaddGoalSubmissionListener
* Adds click listener to given reading goal form submission button. * * On click, POSTs form to server. Updates view depending on whether * the ac
openlibrary/plugins/openlibrary/js/reading-goals/index.js:92
↓ 2 callersFunctionaddText
(text)
openlibrary/plugins/openlibrary/js/template.js:16
↓ 2 callersFunctionadd_cover
Adds a cover to coverstore and returns the cover id. :param str cover_url: URL of cover image :param str ekey: Edition key /book/OL..M
openlibrary/catalog/add_book/__init__.py:314
↓ 2 callersMethodadd_docs
(self, docs)
openlibrary/tests/solr/test_update.py:83
↓ 2 callersFunctionadd_iframe
(selector, src)
openlibrary/plugins/openlibrary/js/covers.js:41
↓ 2 callersMethodadd_illustrators
(self, illustrators: list[str])
scripts/providers/import_wikisource.py:283
↓ 2 callersMethodadd_job
( self, func, trigger=None, args=None, kwargs=None, id=None,
scripts/utils/scheduler.py:28
↓ 2 callersMethodadd_list
(self, key: str, key2: str)
openlibrary/core/ia.py:306
↓ 2 callersMethodadd_subjects
(self, subjects: list[str])
scripts/providers/import_wikisource.py:287
↓ 2 callersFunctionaffiliate_id
(affiliate)
openlibrary/core/helpers.py:299
↓ 2 callersFunctionappend_random_suffix
(text: str, limit: int = 9999)
openlibrary/accounts/model.py:47
↓ 2 callersMethodargs_dict
(self)
scripts/solr_builder/solr_builder/fn_to_cli.py:78
↓ 2 callersFunctionassert_valid_html
Assert that ``html_string`` is well-formed HTML with no orphan/mismatched tags. Uses lxml's HTML parser with ``recover=False``, which raises
openlibrary/tests/core/test_jinja.py:86
↓ 2 callersFunctionattachNewActiveShowcaseItem
(listKey, seedKey, listTitle, coverUrl = DEFAULT_COVER_URL)
openlibrary/plugins/openlibrary/js/lists/ShowcaseItem.js:299
↓ 2 callersMethodauthenticate
(cls, email: str, password: str, test: bool = False)
openlibrary/accounts/model.py:723
↓ 2 callersMethodautologin
Login to Open Library with credentials taken from ~/.olrc file. The ~/.olrc file must be in ini format (format readable by configpars
openlibrary/api.py:75
↓ 2 callersFunctionbatch_import
This processes raw byte data from a JSONL POST to the batch import endpoint. Each line in the JSONL file (i.e. import item) must pass the sa
openlibrary/core/batch_imports.py:74
↓ 2 callersMethodbind_to_webpy_db
Allow Sentry to record DB events.
openlibrary/utils/sentry.py:106
↓ 2 callersMethodblock_ips
(self, ips)
openlibrary/plugins/admin/code.py:502
↓ 2 callersMethodbuild
(self)
openlibrary/solr/updater/work.py:304
↓ 2 callersFunctionbuildSparql
(authors)
openlibrary/plugins/openlibrary/js/readinglog_stats.js:144
↓ 2 callersFunctionbuildUrl
* Constructs a search API or page URL containing the given query fragment. * * @param {string} queryFragment * @param {boolean} forUi
openlibrary/plugins/openlibrary/js/librarian-dashboard/index.js:86
↓ 2 callersFunctionbuild_data0
()
openlibrary/plugins/books/tests/test_dynlinks.py:23
↓ 2 callersMethodbuild_identifiers
(self)
openlibrary/solr/updater/work.py:664
↓ 2 callersFunctionbuild_job_query
:param job: job to complete :param start_at: key (type-prefixed) to start from as opposed to offset; WAY more efficient since offset has
scripts/solr_builder/solr_builder/solr_builder.py:338
↓ 2 callersMethodcache_cached_editions_ia_metadata
(self)
scripts/solr_builder/solr_builder/solr_builder.py:238
↓ 2 callersMethodcache_get
Reads value of a key from the cache. When key is a string, this is equvivalant to:: return cache[key] When key is a 2-t
openlibrary/core/cache.py:481
↓ 2 callersMethodcache_set
Sets a key to a given value in the cache. When key is a string, this is equvivalant to:: cache[key] = value When key is
openlibrary/core/cache.py:500
↓ 2 callersFunctioncached_pd_org_query
()
openlibrary/plugins/openlibrary/pd.py:70
↓ 2 callersMethodcapture_exception_webpy
(self)
openlibrary/utils/sentry.py:89
↓ 2 callersFunctioncheckFacetMoreLessVisibility
Runs visibility tests for 'less', 'bull' and 'more' elements in document * * @param {Number} totalFacet total number of facet * @param {N
tests/unit/js/search.test.js:88
↓ 2 callersFunctioncheckFacetVisibility
Runs visibility tests for all 'facetEntry' elements in document. * * @param {Number} totalFacet total number of facet * @param {Number} e
tests/unit/js/search.test.js:62
↓ 2 callersFunctioncheck_cover_url_host
(cover_url: str | None, allowed_cover_hosts: Iterable[str] = ALLOWED_COVER_HOSTS)
openlibrary/catalog/add_book/__init__.py:578
↓ 2 callersFunctioncheck_digit_10
Takes the first 9 digits of an ISBN10 and returns the calculated final checkdigit.
openlibrary/utils/isbn.py:6
↓ 2 callersFunctioncheck_digit_13
Takes the first 12 digits of an ISBN13 and returns the calculated final checkdigit.
openlibrary/utils/isbn.py:22
↓ 2 callersFunctionchoose_sorting_ddc
(normalized_ddcs: Iterable[str])
openlibrary/utils/ddc.py:168
↓ 2 callersFunctionchoose_sorting_lcc
(sortable_lccs: Iterable[str])
openlibrary/utils/lcc.py:210
↓ 2 callersFunctionclear_cookies
()
openlibrary/accounts/model.py:249
↓ 2 callersMethodcloseModal
* Closes the opened `colorbox` modal.
openlibrary/plugins/openlibrary/js/my-books/MyBooksDropper/CheckInComponents.js:336
↓ 2 callersFunctioncollapse_multiple_space
(s: str)
openlibrary/utils/ddc.py:42
↓ 2 callersFunctioncompare_date
(e1: dict, e2: dict)
openlibrary/catalog/add_book/match.py:211
↓ 2 callersFunctioncompare_isbn
(e1: dict, e2: dict)
openlibrary/catalog/add_book/match.py:228
↓ 2 callersFunctioncompare_lccn
(e1: dict, e2: dict)
openlibrary/catalog/add_book/match.py:202
↓ 2 callersFunctioncompose_ia_url
This needs to be exposed by a generalized API endpoint within plugins/api/browse which lets lazy-load more items for the homepage carousel and
openlibrary/core/lending.py:111
↓ 2 callersFunctioncompute_trending_z_score
Calculate the trending z-score for the last 24h compared to the past events. I.e. How many standard deviations the current number of events i
scripts/solr_updater/trending_updater_hourly.py:251
↓ 2 callersFunctioncompute_work_search_html_fields
Compute the Solr fields needed for rendering work search HTML. HTML require additional fields beyond the default search results to display
openlibrary/plugins/worksearch/code.py:75
↓ 2 callersFunctionconnect_to_pg
Connects to the postgres database specified in the dictionary `config`. Needs a top level key `db_parameters` and under that `database` (or `d
openlibrary/admin/stats.py:26
↓ 2 callersFunctionconvert_key
>>> convert_key("/authors/OL1A", {'/authors/': '/a/'}) '/a/OL1A'
openlibrary/plugins/upstream/adapter.py:24
↓ 2 callersFunctioncount
(table, type, key, value)
openlibrary/plugins/ol_infobase.py:145
↓ 2 callersMethodcount_followers
(cls, publisher)
openlibrary/core/follows.py:125
↓ 2 callersMethodcount_following
(cls, subscriber)
openlibrary/core/follows.py:114
↓ 2 callersMethodcount_shelf
(self, key: READING_LOG_KEYS)
openlibrary/plugins/upstream/mybooks.py:553
↓ 2 callersFunctioncreateElementFromMarkup
* Returns an `HTMLElement` that was created using the given `markup`. * * `markup` is expected to be well-formed, and only have a single root * ele
openlibrary/plugins/openlibrary/js/search.js:155
↓ 2 callersFunctioncreateListFormMarkup
(isFilled)
tests/unit/js/sample-html/lists-test-data.js:1
↓ 2 callersFunctioncreateSearchFacets
Creates a dummy search facets section with a list of 'facetEntry' element and a * 'facetMoreLess' section. * * @param {Number} totalFacet tota
tests/unit/js/search.test.js:11
↓ 2 callersFunctioncreateSelectDataCell
(index, type, values)
openlibrary/plugins/openlibrary/js/add_provider.js:30
↓ 2 callersFunctioncreateTestElementsForProcessClick
()
tests/unit/js/SelectionManager.test.js:3
↓ 2 callersFunctioncreateTextInputDataCell
(index, type)
openlibrary/plugins/openlibrary/js/add_provider.js:25
↓ 2 callersFunctioncreateWorkChart
* * @param {Config} config * @param {ChartConfig} chartConfig * @param {Element} container * @param {HTMLCanvasElement} canvas
openlibrary/plugins/openlibrary/js/readinglog_stats.js:56
↓ 2 callersFunctioncreate_app
()
openlibrary/asgi_app.py:139
↓ 2 callersMethodcreate_authors_from_form_data
Create any __new__ authors in the provided array. Updates the authors dicts _in place_ with the new key. :param list[dict] au
openlibrary/plugins/upstream/addbook.py:145
↓ 2 callersFunctioncreate_dynamic_document
Creates a handler for `url` for servering combined js/css for `prefix/*` pages
openlibrary/plugins/upstream/code.py:185
↓ 2 callersFunctioncreate_link_doc
Creates doc required for generating verification link email. The doc contains username, email and a generated code.
openlibrary/accounts/model.py:227
↓ 2 callersFunctioncreate_local_connection
()
openlibrary/plugins/openlibrary/connection.py:580
↓ 2 callersFunctioncreate_mock_request
Helper to create a mock FastAPI Request object.
openlibrary/utils/tests/test_request_context.py:15
↓ 2 callersFunctioncreate_remote_connection
()
openlibrary/plugins/openlibrary/connection.py:587
↓ 2 callersMethodcreate_root
(self, root_name)
openlibrary/plugins/openlibrary/opds.py:107
↓ 2 callersFunctioncreate_sort_option_type
Generates a Pydantic type alias that validates against the provided sorts_map and dynamically generates the OpenAPI Enum documentation.
openlibrary/fastapi/search.py:234
↓ 2 callersFunctiondate_range_to_publish_year_filter
(published_in: str)
openlibrary/plugins/worksearch/subjects.py:87
↓ 2 callersMethoddecompress
(*args, **kw)
openlibrary/plugins/upstream/utils.py:1255
↓ 2 callersFunctiondefineFocusableElement
(tagName, { renderHTML = '', focusTargetSelector = null } = {})
tests/unit/js/focusableHostMixin.test.js:18
↓ 2 callersMethoddelete
(self, id, redirect_url=None)
openlibrary/coverstore/tests/test_webapp.py:73
↓ 2 callersMethoddelete
Delete this waiting loan from database.
openlibrary/core/waitinglist.py:147
↓ 2 callersMethoddelete_by_username
(cls, username)
openlibrary/core/bookshelves_events.py:212
↓ 2 callersMethoddelete_loan
(self, identifier, userid)
openlibrary/core/lending.py:998
↓ 2 callersMethoddirect_get
(self, fq: Iterable[str] | None = None)
openlibrary/plugins/worksearch/autocomplete.py:56
↓ 2 callersFunctiondirindex
(dir, back="..")
openlibrary/data/sitemap.py:132
↓ 2 callersMethoddispatchCheckInSubmission
* Dispatches a custom `submit-check-in` event with the given date. * * @param {number} year * @param {number|null} month * @param
openlibrary/plugins/openlibrary/js/my-books/MyBooksDropper/CheckInComponents.js:383
↓ 2 callersFunctiondisplayIdentifierError
(event, errorMessage)
openlibrary/plugins/openlibrary/js/add-book.js:79
↓ 2 callersFunctiondoFetchAndUpdate
* Attempts to fetch HTML for a single carousel, and updates the view * with the results. * * If the request is successful, the given `target` eleme
openlibrary/plugins/openlibrary/js/lazy-carousel.js:52
↓ 2 callersFunctiondo_test
(d)
openlibrary/coverstore/tests/test_coverstore.py:91
↓ 2 callersFunctiondownload_external_image
(url: str)
openlibrary/coverstore/utils.py:106
↓ 2 callersFunctiondrop
(s)
openlibrary/catalog/utils/__init__.py:181
↓ 2 callersFunctioneast_in_by_statement
Returns False if there is no by_statement in rec. Otherwise returns whether author name uses eastern name order. TODO: elaborate on what
openlibrary/catalog/add_book/load_book.py:78
↓ 2 callersFunctioneditions_match
Converts the existing edition into a comparable dict and performs a thresholded comparison to decide whether they are the same. Used by a
openlibrary/catalog/add_book/match.py:18
↓ 2 callersMethodedits
(self, today, tomorrow, bots=False)
openlibrary/plugins/ol_infobase.py:224
↓ 2 callersFunctionelapsed_time
Two ways to use elapsed_time(): 1. As a decorator to time the execution of an entire function: @elapsed_time("my_slow_function")
openlibrary/utils/dateutil.py:113
↓ 2 callersFunctionesc
(s)
openlibrary/catalog/marc/html.py:9
↓ 2 callersFunctionevaluate_experiments_for_request
Resolves active experiments for a request based on session, IP, and query params.
openlibrary/core/experiments.py:72
↓ 2 callersFunctionextract_agent_counts
(ua_counts, allowed_names=None)
scripts/monitoring/monitor.py:114
↓ 2 callersFunctionextract_year
Extracts the year from an author's birth or death date.
openlibrary/core/helpers.py:317
↓ 2 callersFunctionf
(self, *a, **kw)
openlibrary/mocks/mock_memcache.py:42
↓ 2 callersMethodfacet_wrapper
(self, facet: str, value: str, label: str, count: int)
openlibrary/plugins/worksearch/subjects.py:340
↓ 2 callersFunctionfetchLanguageOptions
({ limit = 500, timeout = 8000 } = {})
openlibrary/plugins/openlibrary/js/search-modal/languages.js:28
← previousnext →1,001–1,100 of 6,179, ranked by callers