litloop 1.18.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- litloop/__init__.py +89 -0
- litloop/__main__.py +6 -0
- litloop/_source_hygiene.py +158 -0
- litloop/agents/__init__.py +13 -0
- litloop/agents/client.py +164 -0
- litloop/agents/runner.py +123 -0
- litloop/agents/system.py +54 -0
- litloop/agents/tools.py +142 -0
- litloop/app_server.py +8 -0
- litloop/browser/__init__.py +1 -0
- litloop/browser/backend.py +1009 -0
- litloop/browser/camofox_api.py +368 -0
- litloop/browser/chrome_copy.py +136 -0
- litloop/browser/cloakbrowser_compat.py +72 -0
- litloop/browser/cookies.py +347 -0
- litloop/browser/engine.py +965 -0
- litloop/browser/login.py +636 -0
- litloop/browser/pdf.py +263 -0
- litloop/browser/profile_health.py +167 -0
- litloop/browser/runtime.py +210 -0
- litloop/cache.py +104 -0
- litloop/citations/__init__.py +1 -0
- litloop/citations/bib_import.py +102 -0
- litloop/citations/bibtex_crossref.py +143 -0
- litloop/citations/formats.py +225 -0
- litloop/citations/paper_list.py +200 -0
- litloop/citations/session_export.py +94 -0
- litloop/cli/__init__.py +12 -0
- litloop/cli/_utils.py +267 -0
- litloop/cli/commands.py +1098 -0
- litloop/cli/doctor.py +141 -0
- litloop/cli/main.py +1173 -0
- litloop/cli/web.py +190 -0
- litloop/config.py +413 -0
- litloop/data/VARCON-LICENSE.txt +62 -0
- litloop/data/elements.tsv +119 -0
- litloop/data/institutional_identity_policy.json +165 -0
- litloop/data/publisher_access_catalog.json +969 -0
- litloop/data/publisher_carsi.json +105 -0
- litloop/data/spelling_search.tsv.gz +0 -0
- litloop/data/spelling_us.tsv.gz +0 -0
- litloop/data/webvpn.dat +0 -0
- litloop/data/webvpn.json +603 -0
- litloop/db.py +1922 -0
- litloop/deps.py +128 -0
- litloop/desktop/__init__.py +1 -0
- litloop/desktop/agent_runner.py +537 -0
- litloop/desktop/download_jobs.py +571 -0
- litloop/desktop/error_text.py +192 -0
- litloop/desktop/server.py +999 -0
- litloop/desktop/settings.py +552 -0
- litloop/desktop/translate.py +103 -0
- litloop/diagnostics.py +126 -0
- litloop/download/__init__.py +1 -0
- litloop/download/doi_check.py +44 -0
- litloop/download/fetcher.py +975 -0
- litloop/download/markdown.py +130 -0
- litloop/download/pdf.py +454 -0
- litloop/download/pipeline.py +1166 -0
- litloop/download/progress.py +312 -0
- litloop/download/rename.py +211 -0
- litloop/extractors/__init__.py +0 -0
- litloop/extractors/html_extractor.py +31 -0
- litloop/extractors/pdf_extractor.py +151 -0
- litloop/extractors/publisher_adapters/__init__.py +0 -0
- litloop/extractors/publisher_adapters/acs.py +167 -0
- litloop/extractors/publisher_adapters/elsevier.py +178 -0
- litloop/extractors/publisher_adapters/generic.py +191 -0
- litloop/extractors/publisher_adapters/nature.py +204 -0
- litloop/extractors/publisher_adapters/rsc.py +154 -0
- litloop/extractors/publisher_adapters/tandfonline.py +154 -0
- litloop/extractors/publisher_adapters/wiley.py +160 -0
- litloop/http_utils.py +57 -0
- litloop/identifiers.py +134 -0
- litloop/institutional/__init__.py +1 -0
- litloop/institutional/auth.py +576 -0
- litloop/institutional/carsi_login.py +569 -0
- litloop/institutional/config_adapter.py +63 -0
- litloop/institutional/proxy_check.py +98 -0
- litloop/institutional/remote_assist.py +274 -0
- litloop/institutional/schools.py +102 -0
- litloop/institutional/session_heal.py +73 -0
- litloop/institutional/session_store.py +105 -0
- litloop/log.py +47 -0
- litloop/models.py +269 -0
- litloop/network.py +417 -0
- litloop/optional.py +310 -0
- litloop/publishers/__init__.py +1 -0
- litloop/publishers/access.py +232 -0
- litloop/publishers/pdf_router.py +451 -0
- litloop/publishers/profiles.py +899 -0
- litloop/publishers/strategies/__init__.py +122 -0
- litloop/publishers/strategies/_core.py +2340 -0
- litloop/publishers/strategies/_elsevier_api.py +578 -0
- litloop/publishers/strategies/acm.py +27 -0
- litloop/publishers/strategies/acs.py +42 -0
- litloop/publishers/strategies/aip.py +27 -0
- litloop/publishers/strategies/aps.py +29 -0
- litloop/publishers/strategies/asce.py +28 -0
- litloop/publishers/strategies/base.py +108 -0
- litloop/publishers/strategies/copernicus.py +24 -0
- litloop/publishers/strategies/elsevier.py +66 -0
- litloop/publishers/strategies/generic.py +39 -0
- litloop/publishers/strategies/ieee.py +28 -0
- litloop/publishers/strategies/iop.py +27 -0
- litloop/publishers/strategies/nature.py +27 -0
- litloop/publishers/strategies/oxford.py +27 -0
- litloop/publishers/strategies/registry.py +83 -0
- litloop/publishers/strategies/royalsociety.py +28 -0
- litloop/publishers/strategies/rsc.py +27 -0
- litloop/publishers/strategies/sage.py +30 -0
- litloop/publishers/strategies/science.py +27 -0
- litloop/publishers/strategies/springer.py +34 -0
- litloop/publishers/strategies/tandfonline.py +32 -0
- litloop/publishers/strategies/wiley.py +32 -0
- litloop/publishers/supplementary.py +219 -0
- litloop/quota.py +202 -0
- litloop/search/__init__.py +1 -0
- litloop/search/abstracts.py +291 -0
- litloop/search/deep.py +1216 -0
- litloop/search/quick.py +1102 -0
- litloop/search/scansci_find.py +410 -0
- litloop/search/screening.py +225 -0
- litloop/search/title_to_doi.py +163 -0
- litloop/search/watches.py +124 -0
- litloop/server.py +1731 -0
- litloop/sources/__init__.py +1339 -0
- litloop/sources/_batch.py +529 -0
- litloop/sources/_index.py +221 -0
- litloop/sources/_routes.py +290 -0
- litloop/sources/altcha.py +90 -0
- litloop/sources/arxiv.py +45 -0
- litloop/sources/attempt.py +91 -0
- litloop/sources/carsi.py +74 -0
- litloop/sources/core_api.py +46 -0
- litloop/sources/crossref.py +162 -0
- litloop/sources/elsevier_api.py +620 -0
- litloop/sources/elsevier_check.py +274 -0
- litloop/sources/europepmc.py +81 -0
- litloop/sources/ezproxy.py +317 -0
- litloop/sources/instsci.py +1295 -0
- litloop/sources/libgen.py +116 -0
- litloop/sources/nature.py +39 -0
- litloop/sources/oa_discovery.py +135 -0
- litloop/sources/openaire.py +122 -0
- litloop/sources/openalex.py +100 -0
- litloop/sources/publishers.py +684 -0
- litloop/sources/sage_cn.py +139 -0
- litloop/sources/scibban.py +10 -0
- litloop/sources/scihub.py +1379 -0
- litloop/sources/scihub_domains.py +203 -0
- litloop/sources/scihub_speed.py +187 -0
- litloop/sources/scoring.py +250 -0
- litloop/sources/semantic_scholar.py +146 -0
- litloop/sources/springer_tdm.py +172 -0
- litloop/sources/unpaywall.py +116 -0
- litloop/sources/vpnsci.py +38 -0
- litloop/store.py +264 -0
- litloop/templates/index.html +347 -0
- litloop/terms/__init__.py +1 -0
- litloop/terms/glossary.py +422 -0
- litloop/terms/spelling.py +89 -0
- litloop/terms/text.py +106 -0
- litloop/tor/__init__.py +1 -0
- litloop/tor/embedded.py +371 -0
- litloop/tor/proxy.py +110 -0
- litloop/updates.py +148 -0
- litloop/zotero/__init__.py +1 -0
- litloop/zotero/bridge.py +309 -0
- litloop/zotero/client.py +317 -0
- litloop-1.18.3.dist-info/METADATA +347 -0
- litloop-1.18.3.dist-info/RECORD +176 -0
- litloop-1.18.3.dist-info/WHEEL +5 -0
- litloop-1.18.3.dist-info/entry_points.txt +2 -0
- litloop-1.18.3.dist-info/licenses/LICENSE +197 -0
- litloop-1.18.3.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# symbol name (American), from PubChem's periodic table; built by scripts/build_element_table.py
|
|
2
|
+
H hydrogen
|
|
3
|
+
He helium
|
|
4
|
+
Li lithium
|
|
5
|
+
Be beryllium
|
|
6
|
+
B boron
|
|
7
|
+
C carbon
|
|
8
|
+
N nitrogen
|
|
9
|
+
O oxygen
|
|
10
|
+
F fluorine
|
|
11
|
+
Ne neon
|
|
12
|
+
Na sodium
|
|
13
|
+
Mg magnesium
|
|
14
|
+
Al aluminum
|
|
15
|
+
Si silicon
|
|
16
|
+
P phosphorus
|
|
17
|
+
S sulfur
|
|
18
|
+
Cl chlorine
|
|
19
|
+
Ar argon
|
|
20
|
+
K potassium
|
|
21
|
+
Ca calcium
|
|
22
|
+
Sc scandium
|
|
23
|
+
Ti titanium
|
|
24
|
+
V vanadium
|
|
25
|
+
Cr chromium
|
|
26
|
+
Mn manganese
|
|
27
|
+
Fe iron
|
|
28
|
+
Co cobalt
|
|
29
|
+
Ni nickel
|
|
30
|
+
Cu copper
|
|
31
|
+
Zn zinc
|
|
32
|
+
Ga gallium
|
|
33
|
+
Ge germanium
|
|
34
|
+
As arsenic
|
|
35
|
+
Se selenium
|
|
36
|
+
Br bromine
|
|
37
|
+
Kr krypton
|
|
38
|
+
Rb rubidium
|
|
39
|
+
Sr strontium
|
|
40
|
+
Y yttrium
|
|
41
|
+
Zr zirconium
|
|
42
|
+
Nb niobium
|
|
43
|
+
Mo molybdenum
|
|
44
|
+
Tc technetium
|
|
45
|
+
Ru ruthenium
|
|
46
|
+
Rh rhodium
|
|
47
|
+
Pd palladium
|
|
48
|
+
Ag silver
|
|
49
|
+
Cd cadmium
|
|
50
|
+
In indium
|
|
51
|
+
Sn tin
|
|
52
|
+
Sb antimony
|
|
53
|
+
Te tellurium
|
|
54
|
+
I iodine
|
|
55
|
+
Xe xenon
|
|
56
|
+
Cs cesium
|
|
57
|
+
Ba barium
|
|
58
|
+
La lanthanum
|
|
59
|
+
Ce cerium
|
|
60
|
+
Pr praseodymium
|
|
61
|
+
Nd neodymium
|
|
62
|
+
Pm promethium
|
|
63
|
+
Sm samarium
|
|
64
|
+
Eu europium
|
|
65
|
+
Gd gadolinium
|
|
66
|
+
Tb terbium
|
|
67
|
+
Dy dysprosium
|
|
68
|
+
Ho holmium
|
|
69
|
+
Er erbium
|
|
70
|
+
Tm thulium
|
|
71
|
+
Yb ytterbium
|
|
72
|
+
Lu lutetium
|
|
73
|
+
Hf hafnium
|
|
74
|
+
Ta tantalum
|
|
75
|
+
W tungsten
|
|
76
|
+
Re rhenium
|
|
77
|
+
Os osmium
|
|
78
|
+
Ir iridium
|
|
79
|
+
Pt platinum
|
|
80
|
+
Au gold
|
|
81
|
+
Hg mercury
|
|
82
|
+
Tl thallium
|
|
83
|
+
Pb lead
|
|
84
|
+
Bi bismuth
|
|
85
|
+
Po polonium
|
|
86
|
+
At astatine
|
|
87
|
+
Rn radon
|
|
88
|
+
Fr francium
|
|
89
|
+
Ra radium
|
|
90
|
+
Ac actinium
|
|
91
|
+
Th thorium
|
|
92
|
+
Pa protactinium
|
|
93
|
+
U uranium
|
|
94
|
+
Np neptunium
|
|
95
|
+
Pu plutonium
|
|
96
|
+
Am americium
|
|
97
|
+
Cm curium
|
|
98
|
+
Bk berkelium
|
|
99
|
+
Cf californium
|
|
100
|
+
Es einsteinium
|
|
101
|
+
Fm fermium
|
|
102
|
+
Md mendelevium
|
|
103
|
+
No nobelium
|
|
104
|
+
Lr lawrencium
|
|
105
|
+
Rf rutherfordium
|
|
106
|
+
Db dubnium
|
|
107
|
+
Sg seaborgium
|
|
108
|
+
Bh bohrium
|
|
109
|
+
Hs hassium
|
|
110
|
+
Mt meitnerium
|
|
111
|
+
Ds darmstadtium
|
|
112
|
+
Rg roentgenium
|
|
113
|
+
Cn copernicium
|
|
114
|
+
Nh nihonium
|
|
115
|
+
Fl flerovium
|
|
116
|
+
Mc moscovium
|
|
117
|
+
Lv livermorium
|
|
118
|
+
Ts tennessine
|
|
119
|
+
Og oganesson
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"last_review": "2026-06-07",
|
|
4
|
+
"purpose": "Reusable policy for choosing institutional identity routes before browser-backed publisher PDF downloads.",
|
|
5
|
+
"default_mode": "auto",
|
|
6
|
+
"default_identity": "publisher_broker",
|
|
7
|
+
"preferred_off_campus_access": "shibboleth_or_openathens",
|
|
8
|
+
"subscription_institution": {
|
|
9
|
+
"required_for_closed_access": true,
|
|
10
|
+
"hardcoded_default": "",
|
|
11
|
+
"resolution_order": [
|
|
12
|
+
"--institution",
|
|
13
|
+
"config.carsi_idp_name",
|
|
14
|
+
"config.school",
|
|
15
|
+
"interactive_prompt"
|
|
16
|
+
],
|
|
17
|
+
"prompt_label": "Subscription institution",
|
|
18
|
+
"notes": "Ask for the user's own subscription institution at the point of use. Do not default to Tsinghua University or any other school."
|
|
19
|
+
},
|
|
20
|
+
"final_pdf_verdict_requires": "visible_cloakbrowser",
|
|
21
|
+
"identity_order": [
|
|
22
|
+
"publisher_broker",
|
|
23
|
+
"federated_sso",
|
|
24
|
+
"webvpn_broker",
|
|
25
|
+
"campus_connector",
|
|
26
|
+
"http_preflight"
|
|
27
|
+
],
|
|
28
|
+
"federated_login_methods": [
|
|
29
|
+
"wayfless_federated_sso",
|
|
30
|
+
"standard_federated_sso"
|
|
31
|
+
],
|
|
32
|
+
"login_method_order": [
|
|
33
|
+
"wayfless_federated_sso",
|
|
34
|
+
"standard_federated_sso",
|
|
35
|
+
"publisher_article_page_institutional_login",
|
|
36
|
+
"webvpn_broker",
|
|
37
|
+
"campus_connector",
|
|
38
|
+
"http_preflight"
|
|
39
|
+
],
|
|
40
|
+
"routing_rules": [
|
|
41
|
+
"Ask the user for their own subscription institution when no institution is configured; never use a hard-coded school as the default.",
|
|
42
|
+
"For off-campus access to publishers that support Shibboleth or OpenAthens, prefer federated institutional authentication over WebVPN.",
|
|
43
|
+
"When a publisher/institution-specific WAYFless link is configured, use it to skip group/institution selection and enter the institution IdP directly.",
|
|
44
|
+
"If the WAYFless link fails, fall back to the publisher's standard Shibboleth/OpenAthens institution-selection flow.",
|
|
45
|
+
"Do not make WebVPN a global default because not every institution provides a WebVPN gateway.",
|
|
46
|
+
"Use WebVPN only when the configured institution has a WebVPN-style gateway and the publisher route has been browser-verified through that gateway.",
|
|
47
|
+
"Do not treat exported cookies as full browser session persistence. Cookie stores are useful for HTTP preflight and some request reuse only.",
|
|
48
|
+
"For closed-access publisher PDFs, keep the visible CloakBrowser context alive when SSO, CAPTCHA, 2FA, Cloudflare, or publisher-generated PDF tokens are involved.",
|
|
49
|
+
"A final claim that a publisher can or cannot provide a PDF must come from a visible CloakBrowser workflow, not requests, curl, or cookie replay alone.",
|
|
50
|
+
"When WebVPN fails to provide a PDF, fall back to the publisher-specific broker and article-page institutional login flow before marking the publisher failed."
|
|
51
|
+
],
|
|
52
|
+
"identities": {
|
|
53
|
+
"publisher_broker": {
|
|
54
|
+
"global_default": true,
|
|
55
|
+
"recommended_role": "primary_closed_access_pdf_route",
|
|
56
|
+
"recommended_persistence": [
|
|
57
|
+
"same_live_cloakbrowser_context",
|
|
58
|
+
"browser_profile_dir",
|
|
59
|
+
"carsi_cookie_dir/<publisher>.json",
|
|
60
|
+
"attempt_cache"
|
|
61
|
+
],
|
|
62
|
+
"persistence_notes": "The same visible CloakBrowser context preserves browser storage, challenge state, page-generated PDF tokens, and session cookies. The persistent profile is the disk-backed fallback when the broker is restarted.",
|
|
63
|
+
"final_verdict_scope": "browser verified"
|
|
64
|
+
},
|
|
65
|
+
"webvpn": {
|
|
66
|
+
"global_default": false,
|
|
67
|
+
"recommended_role": "optional_identity_layer",
|
|
68
|
+
"enable_when": [
|
|
69
|
+
"configured_school_type_is_webvpn",
|
|
70
|
+
"webvpn_base_url_is_set",
|
|
71
|
+
"user_can_complete_institution_login_in_visible_cloakbrowser"
|
|
72
|
+
],
|
|
73
|
+
"recommended_persistence": [
|
|
74
|
+
"same_live_cloakbrowser_context",
|
|
75
|
+
"browser_profile_dir",
|
|
76
|
+
"webvpn_gateway_cookies",
|
|
77
|
+
"publisher_broker_fallback"
|
|
78
|
+
],
|
|
79
|
+
"persistence_limits": {
|
|
80
|
+
"cookie_store": {
|
|
81
|
+
"verdict_scope": "HTTP preflight only",
|
|
82
|
+
"notes": "Saved cookies can validate simple gateway reachability, but they do not preserve all browser storage, WebVPN in-memory state, TLS session tickets, publisher challenge state, or generated PDF tokens."
|
|
83
|
+
},
|
|
84
|
+
"browser_profile_dir": {
|
|
85
|
+
"verdict_scope": "browser startup hint",
|
|
86
|
+
"notes": "A persistent browser profile can keep cookies, localStorage, IndexedDB, service workers, and cache. It still may not restore live connection state, TLS sessions, or challenge state after the process exits."
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"non_exportable_state": [
|
|
90
|
+
"tls_session",
|
|
91
|
+
"browser_fingerprint",
|
|
92
|
+
"in_memory_webvpn_state",
|
|
93
|
+
"cloudflare_or_waf_challenge_state",
|
|
94
|
+
"page_generated_pdf_token",
|
|
95
|
+
"live_http2_connection_state"
|
|
96
|
+
],
|
|
97
|
+
"final_verdict_scope": "browser verified only when the PDF is captured in the active WebVPN CloakBrowser context"
|
|
98
|
+
},
|
|
99
|
+
"federated_sso": {
|
|
100
|
+
"global_default": false,
|
|
101
|
+
"recommended_role": "preferred_off_campus_identity",
|
|
102
|
+
"methods": {
|
|
103
|
+
"wayfless_federated_sso": {
|
|
104
|
+
"priority": 1,
|
|
105
|
+
"notes": "Use institution-specific WAYFless links when configured, because they skip the federation group and institution picker and go directly to the institution IdP."
|
|
106
|
+
},
|
|
107
|
+
"standard_federated_sso": {
|
|
108
|
+
"priority": 2,
|
|
109
|
+
"notes": "Use publisher controls such as Sign in by institution, Log in via Shibboleth, OpenAthens, CARSI, China CERNET Federation, or institution search."
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"recommended_persistence": [
|
|
113
|
+
"same_live_cloakbrowser_context",
|
|
114
|
+
"browser_profile_dir",
|
|
115
|
+
"carsi_cookie_dir/<publisher>.json"
|
|
116
|
+
],
|
|
117
|
+
"persistence_notes": "Use article-page controls such as Institutional Sign In, OpenAthens, Access through your institution, or Access through your organization. The user completes credentials, 2FA, and CAPTCHA manually."
|
|
118
|
+
},
|
|
119
|
+
"campus_connector": {
|
|
120
|
+
"global_default": false,
|
|
121
|
+
"recommended_role": "network_layer_for_easyconnect_atrust_or_local_socks",
|
|
122
|
+
"recommended_persistence": [
|
|
123
|
+
"external_connector_process",
|
|
124
|
+
"browser_profile_dir",
|
|
125
|
+
"publisher_broker"
|
|
126
|
+
],
|
|
127
|
+
"persistence_notes": "Some schools require a local connector instead of WebVPN. LitLoop-PDF should not assume a WebVPN URL exists for these institutions."
|
|
128
|
+
},
|
|
129
|
+
"http_preflight": {
|
|
130
|
+
"global_default": false,
|
|
131
|
+
"recommended_role": "route_template_and_blocker_diagnostics",
|
|
132
|
+
"recommended_persistence": [
|
|
133
|
+
"cookie_store_when_available"
|
|
134
|
+
],
|
|
135
|
+
"final_verdict_scope": "HTTP preflight only"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"institutional_findings": {
|
|
139
|
+
"tsinghua_library_notice_2026_06_07": {
|
|
140
|
+
"institution": "Tsinghua University",
|
|
141
|
+
"generalizable_rules": [
|
|
142
|
+
"Many databases support Shibboleth or OpenAthens institutional authentication.",
|
|
143
|
+
"Standard login flow: publisher login page -> institutional/Shibboleth/OpenAthens login -> federation group such as China CERNET Federation or CARSI when shown -> user's own institution -> institution IdP.",
|
|
144
|
+
"WAYFless links can skip federation and institution selection when the institution-specific link is configured.",
|
|
145
|
+
"If a WAYFless shortcut fails, switch to the standard Shibboleth/OpenAthens login page.",
|
|
146
|
+
"These rules should be parameterized by the user's subscription institution; Tsinghua University is not a default."
|
|
147
|
+
],
|
|
148
|
+
"example_supported_databases": [
|
|
149
|
+
"AIP",
|
|
150
|
+
"ACM",
|
|
151
|
+
"ACS Publications",
|
|
152
|
+
"Annual Reviews",
|
|
153
|
+
"Elsevier ScienceDirect",
|
|
154
|
+
"IOP",
|
|
155
|
+
"Nature",
|
|
156
|
+
"Oxford Journals",
|
|
157
|
+
"RSC",
|
|
158
|
+
"Scitation",
|
|
159
|
+
"SpringerLink",
|
|
160
|
+
"Taylor & Francis",
|
|
161
|
+
"Wiley"
|
|
162
|
+
]
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|