citeget 0.1.1__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.
- citeget/__init__.py +131 -0
- citeget/__main__.py +6 -0
- citeget/acquire_references.py +1085 -0
- citeget/article_pub/__init__.py +1 -0
- citeget/article_pub/data/journal_profiles.json +262 -0
- citeget/article_pub/scripts/check_article.py +342 -0
- citeget/article_pub/scripts/extract_references.py +162 -0
- citeget/article_pub/scripts/word_count.py +145 -0
- citeget/cli.py +178 -0
- citeget/core.py +517 -0
- citeget/data/libgen_vg_report.md +206 -0
- citeget/extract.py +460 -0
- citeget/resolve.py +760 -0
- citeget-0.1.1.dist-info/METADATA +208 -0
- citeget-0.1.1.dist-info/RECORD +18 -0
- citeget-0.1.1.dist-info/WHEEL +4 -0
- citeget-0.1.1.dist-info/entry_points.txt +2 -0
- citeget-0.1.1.dist-info/licenses/LICENSE +201 -0
citeget/__init__.py
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
"""citeget — Find, acquire, and manage academic references.
|
|
2
|
+
|
|
3
|
+
Tools for searching Library Genesis, downloading papers, and bulk-acquiring
|
|
4
|
+
all references cited in a document. Designed for use by AI agents (via Claude
|
|
5
|
+
Code skills) and by humans (via CLI and Python API).
|
|
6
|
+
|
|
7
|
+
Usage::
|
|
8
|
+
|
|
9
|
+
from citeget import search, search_and_download
|
|
10
|
+
|
|
11
|
+
# Search libgen and get metadata
|
|
12
|
+
results = search("graph theory", topic="articles")
|
|
13
|
+
|
|
14
|
+
# Search and download top results
|
|
15
|
+
search_and_download("python programming", download_dir="~/papers", max_downloads=5)
|
|
16
|
+
|
|
17
|
+
# Acquire all references from a document
|
|
18
|
+
from citeget import parse_references_section, acquire_all_references, resolve_work_dir
|
|
19
|
+
|
|
20
|
+
work_dir = resolve_work_dir(reference_file="my_paper.md")
|
|
21
|
+
refs = parse_references_section(refs_text)
|
|
22
|
+
successes, failures, log = acquire_all_references(
|
|
23
|
+
refs, download_dir=work_dir / "references", work_dir=work_dir,
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
Topics (for libgen search):
|
|
27
|
+
- "books" or "l" — Libgen (books)
|
|
28
|
+
- "articles" or "a" — Scientific Articles
|
|
29
|
+
- "fiction" or "f" — Fiction
|
|
30
|
+
- "comics" or "c" — Comics
|
|
31
|
+
- "magazines" or "m" — Magazines
|
|
32
|
+
- "standards" or "s" — Standards
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
from citeget.core import (
|
|
36
|
+
search,
|
|
37
|
+
download_results,
|
|
38
|
+
download_one,
|
|
39
|
+
search_and_download,
|
|
40
|
+
TOPIC_ALIASES,
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
from citeget.acquire_references import (
|
|
44
|
+
parse_reference,
|
|
45
|
+
parse_references_section,
|
|
46
|
+
acquire_reference,
|
|
47
|
+
acquire_all_references,
|
|
48
|
+
generate_search_queries,
|
|
49
|
+
resolve_work_dir,
|
|
50
|
+
check_existing_downloads,
|
|
51
|
+
write_references_md,
|
|
52
|
+
write_missed_references_md,
|
|
53
|
+
Reference,
|
|
54
|
+
AcquisitionResult,
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
from citeget.extract import (
|
|
58
|
+
extract_references,
|
|
59
|
+
regex_extractor,
|
|
60
|
+
chain as chain_extractors,
|
|
61
|
+
merge as merge_extractors,
|
|
62
|
+
register as register_extractor,
|
|
63
|
+
list_extractors,
|
|
64
|
+
ExtractionResult,
|
|
65
|
+
EXTRACTORS,
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
from citeget.resolve import (
|
|
69
|
+
resolve_reference,
|
|
70
|
+
url_rewriter,
|
|
71
|
+
resolve_and_download,
|
|
72
|
+
chain as chain_strategies,
|
|
73
|
+
chain_resolvers,
|
|
74
|
+
register_resolver,
|
|
75
|
+
register_downloader,
|
|
76
|
+
register_strategy,
|
|
77
|
+
list_resolvers,
|
|
78
|
+
list_downloaders,
|
|
79
|
+
list_strategies,
|
|
80
|
+
RESOLVERS,
|
|
81
|
+
DOWNLOADERS,
|
|
82
|
+
STRATEGIES,
|
|
83
|
+
BUILTIN_URL_RULES,
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
__all__ = [
|
|
87
|
+
# Core search/download
|
|
88
|
+
"search",
|
|
89
|
+
"download_results",
|
|
90
|
+
"download_one",
|
|
91
|
+
"search_and_download",
|
|
92
|
+
"TOPIC_ALIASES",
|
|
93
|
+
# Reference parsing (low-level)
|
|
94
|
+
"parse_reference",
|
|
95
|
+
"parse_references_section",
|
|
96
|
+
# Reference extraction (composable)
|
|
97
|
+
"extract_references",
|
|
98
|
+
"regex_extractor",
|
|
99
|
+
"chain_extractors",
|
|
100
|
+
"merge_extractors",
|
|
101
|
+
"register_extractor",
|
|
102
|
+
"list_extractors",
|
|
103
|
+
"ExtractionResult",
|
|
104
|
+
"EXTRACTORS",
|
|
105
|
+
# Reference resolution/download (composable)
|
|
106
|
+
"resolve_reference",
|
|
107
|
+
"url_rewriter",
|
|
108
|
+
"resolve_and_download",
|
|
109
|
+
"chain_strategies",
|
|
110
|
+
"chain_resolvers",
|
|
111
|
+
"register_resolver",
|
|
112
|
+
"register_downloader",
|
|
113
|
+
"register_strategy",
|
|
114
|
+
"list_resolvers",
|
|
115
|
+
"list_downloaders",
|
|
116
|
+
"list_strategies",
|
|
117
|
+
"RESOLVERS",
|
|
118
|
+
"DOWNLOADERS",
|
|
119
|
+
"STRATEGIES",
|
|
120
|
+
"BUILTIN_URL_RULES",
|
|
121
|
+
# Acquisition (orchestrator)
|
|
122
|
+
"acquire_reference",
|
|
123
|
+
"acquire_all_references",
|
|
124
|
+
"generate_search_queries",
|
|
125
|
+
"resolve_work_dir",
|
|
126
|
+
"check_existing_downloads",
|
|
127
|
+
"write_references_md",
|
|
128
|
+
"write_missed_references_md",
|
|
129
|
+
"Reference",
|
|
130
|
+
"AcquisitionResult",
|
|
131
|
+
]
|