academia-mcp 1.8.0__py3-none-any.whl → 1.8.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.
- academia_mcp/server.py +2 -4
- academia_mcp/tools/__init__.py +2 -4
- academia_mcp/tools/latex.py +9 -18
- {academia_mcp-1.8.0.dist-info → academia_mcp-1.8.1.dist-info}/METADATA +1 -1
- {academia_mcp-1.8.0.dist-info → academia_mcp-1.8.1.dist-info}/RECORD +9 -9
- {academia_mcp-1.8.0.dist-info → academia_mcp-1.8.1.dist-info}/WHEEL +0 -0
- {academia_mcp-1.8.0.dist-info → academia_mcp-1.8.1.dist-info}/entry_points.txt +0 -0
- {academia_mcp-1.8.0.dist-info → academia_mcp-1.8.1.dist-info}/licenses/LICENSE +0 -0
- {academia_mcp-1.8.0.dist-info → academia_mcp-1.8.1.dist-info}/top_level.txt +0 -0
academia_mcp/server.py
CHANGED
@@ -13,8 +13,7 @@ from .tools.hf_datasets_search import hf_datasets_search
|
|
13
13
|
from .tools.anthology_search import anthology_search
|
14
14
|
from .tools.document_qa import document_qa
|
15
15
|
from .tools.latex import (
|
16
|
-
|
17
|
-
compile_latex_from_str,
|
16
|
+
compile_latex,
|
18
17
|
get_latex_template,
|
19
18
|
get_latex_templates_list,
|
20
19
|
read_pdf,
|
@@ -65,8 +64,7 @@ def run(
|
|
65
64
|
server.add_tool(s2_get_references)
|
66
65
|
server.add_tool(hf_datasets_search)
|
67
66
|
server.add_tool(anthology_search)
|
68
|
-
server.add_tool(
|
69
|
-
server.add_tool(compile_latex_from_str)
|
67
|
+
server.add_tool(compile_latex)
|
70
68
|
server.add_tool(get_latex_template)
|
71
69
|
server.add_tool(get_latex_templates_list)
|
72
70
|
server.add_tool(visit_webpage)
|
academia_mcp/tools/__init__.py
CHANGED
@@ -5,8 +5,7 @@ from .hf_datasets_search import hf_datasets_search
|
|
5
5
|
from .s2_citations import s2_get_references, s2_get_citations
|
6
6
|
from .document_qa import document_qa
|
7
7
|
from .latex import (
|
8
|
-
|
9
|
-
compile_latex_from_str,
|
8
|
+
compile_latex,
|
10
9
|
get_latex_template,
|
11
10
|
get_latex_templates_list,
|
12
11
|
read_pdf,
|
@@ -24,8 +23,7 @@ __all__ = [
|
|
24
23
|
"s2_get_citations",
|
25
24
|
"hf_datasets_search",
|
26
25
|
"document_qa",
|
27
|
-
"
|
28
|
-
"compile_latex_from_str",
|
26
|
+
"compile_latex",
|
29
27
|
"get_latex_template",
|
30
28
|
"get_latex_templates_list",
|
31
29
|
"web_search",
|
academia_mcp/tools/latex.py
CHANGED
@@ -46,7 +46,7 @@ def get_latex_template(template_name: str) -> str:
|
|
46
46
|
return json.dumps({"template": template_path.read_text(), "style": style_path.read_text()})
|
47
47
|
|
48
48
|
|
49
|
-
def
|
49
|
+
def compile_latex(
|
50
50
|
input_filename: str, output_filename: str = "output.pdf", timeout: int = 60
|
51
51
|
) -> str:
|
52
52
|
"""
|
@@ -63,24 +63,8 @@ def compile_latex_from_file(
|
|
63
63
|
if not input_filename_path.exists():
|
64
64
|
input_filename_path = Path(get_workspace_dir()) / input_filename
|
65
65
|
assert input_filename_path.exists(), f"Input file {input_filename} does not exist"
|
66
|
-
|
67
|
-
latex_code = file.read()
|
68
|
-
return compile_latex_from_str(latex_code, output_filename, timeout)
|
66
|
+
latex_code = input_filename_path.read_text(encoding="utf-8")
|
69
67
|
|
70
|
-
|
71
|
-
def compile_latex_from_str(
|
72
|
-
latex_code: str, output_filename: str = "output.pdf", timeout: int = 60
|
73
|
-
) -> str:
|
74
|
-
"""
|
75
|
-
Compile a latex code.
|
76
|
-
|
77
|
-
Returns a string with the result of the compilation.
|
78
|
-
|
79
|
-
Args:
|
80
|
-
latex_code: The latex code to compile.
|
81
|
-
output_filename: The path to the output pdf file.
|
82
|
-
timeout: The timeout for the compilation. 60 seconds by default.
|
83
|
-
"""
|
84
68
|
if shutil.which("pdflatex") is None:
|
85
69
|
return "pdflatex is not installed or not found in PATH."
|
86
70
|
|
@@ -116,6 +100,13 @@ def compile_latex_from_str(
|
|
116
100
|
except Exception:
|
117
101
|
pass
|
118
102
|
|
103
|
+
try:
|
104
|
+
bib_source_path = input_filename_path.parent / "references.bib"
|
105
|
+
if bib_source_path.exists():
|
106
|
+
shutil.copyfile(bib_source_path, temp_dir_path / "references.bib")
|
107
|
+
except Exception:
|
108
|
+
pass
|
109
|
+
|
119
110
|
try:
|
120
111
|
subprocess.run(
|
121
112
|
[
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: academia-mcp
|
3
|
-
Version: 1.8.
|
3
|
+
Version: 1.8.1
|
4
4
|
Summary: MCP server that provides different tools to search for scientific publications
|
5
5
|
Author-email: Ilya Gusev <phoenixilya@gmail.com>
|
6
6
|
Project-URL: Homepage, https://github.com/IlyaGusev/academia_mcp
|
@@ -4,26 +4,26 @@ academia_mcp/files.py,sha256=tvt3OPr5q6pAPCZ0XvRHHL9ZWuTXINRZvqjeRFmx5YE,815
|
|
4
4
|
academia_mcp/llm.py,sha256=E0TjWUCjo2q3lONyWMxdppX72m6BdCjsZk-vFLRvGyo,1003
|
5
5
|
academia_mcp/pdf.py,sha256=9PlXzHGhb6ay3ldbTdxCcTWvH4TkET3bnb64mgoh9i0,1273
|
6
6
|
academia_mcp/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
7
|
-
academia_mcp/server.py,sha256=
|
7
|
+
academia_mcp/server.py,sha256=3qeJaO2udhlFu7AOy7_g3P2DrY-ygYxYsMl-FtlfQFc,3147
|
8
8
|
academia_mcp/utils.py,sha256=P9U3RjYzcztE0KxXvJSy5wSBaUg2CM9tpByljYrsrl4,4607
|
9
9
|
academia_mcp/latex_templates/agents4science_2025/agents4science_2025.sty,sha256=hGcEPCYBJS4vdhWvN_yEaJC4GvT_yDroI94CfY2Oguk,12268
|
10
10
|
academia_mcp/latex_templates/agents4science_2025/agents4science_2025.tex,sha256=Tl1QkHXHRopw9VEfWrD3Layr5JP_0gIzVQjL4KXIWqc,15814
|
11
|
-
academia_mcp/tools/__init__.py,sha256=
|
11
|
+
academia_mcp/tools/__init__.py,sha256=V2A8sG3c2OTf4VOKnntdKDq8Z5EiUrjgBJLLffILrR4,1197
|
12
12
|
academia_mcp/tools/anthology_search.py,sha256=rhFpJZqGLABgr0raDuH0CARBiAJNJtEI4dlMrKNHfDQ,7669
|
13
13
|
academia_mcp/tools/arxiv_download.py,sha256=gBY0_Kz0yGtVkLMwn6GrAyfBjovZVgcSMuyy67p65Cw,10474
|
14
14
|
academia_mcp/tools/arxiv_search.py,sha256=pzM18qrF3QL03A53w003kE7hQi3s3QKtjgw0m7K88UY,8355
|
15
15
|
academia_mcp/tools/bitflip.py,sha256=eihmNk_C_8ZkBcjtJYH6MvZ0rItgIlvHHA0eGLxsvRs,12276
|
16
16
|
academia_mcp/tools/document_qa.py,sha256=t9mygYQ7AFIAPiha1nZ-y043luQlkTCBdWb_SDnzEsE,2444
|
17
17
|
academia_mcp/tools/hf_datasets_search.py,sha256=KiBkqT4rXjEN4oc1AWZOPnqN_Go90TQogY5-DUm3LQo,2854
|
18
|
-
academia_mcp/tools/latex.py,sha256=
|
18
|
+
academia_mcp/tools/latex.py,sha256=B1Leqt1FHY6H3DlUgeYse4LMFpf4-K1FQViXl5MKk8A,6144
|
19
19
|
academia_mcp/tools/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
20
20
|
academia_mcp/tools/review.py,sha256=9lMMELiRNVpiETqtFEHk551LaFuf1LYx0gXD5Sn7Ve0,10285
|
21
21
|
academia_mcp/tools/s2_citations.py,sha256=XZ3a4rsovAiI_D_kIy0GddRHSjpC5Fa_CS8dmB9Qftg,4902
|
22
22
|
academia_mcp/tools/visit_webpage.py,sha256=OZdqDkVPIbANyFw5o5jIjU5Rr_dolxrGDs63Ud-GmRM,1966
|
23
23
|
academia_mcp/tools/web_search.py,sha256=mobKm4iqKppn8pduZYMzWRo1MQBjkAqmMtrFLI5XY2Y,6296
|
24
|
-
academia_mcp-1.8.
|
25
|
-
academia_mcp-1.8.
|
26
|
-
academia_mcp-1.8.
|
27
|
-
academia_mcp-1.8.
|
28
|
-
academia_mcp-1.8.
|
29
|
-
academia_mcp-1.8.
|
24
|
+
academia_mcp-1.8.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
25
|
+
academia_mcp-1.8.1.dist-info/METADATA,sha256=PNRwlxz6oRQmZDKqJiMzfsXZQLb1lI4Y8n8s2jVvFCI,3714
|
26
|
+
academia_mcp-1.8.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
27
|
+
academia_mcp-1.8.1.dist-info/entry_points.txt,sha256=gxkiKJ74w2FwJpSECpjA3XtCfI5ZfrM6N8cqnwsq4yY,51
|
28
|
+
academia_mcp-1.8.1.dist-info/top_level.txt,sha256=CzGpRFsRRJRqWEb1e3SUlcfGqRzOxevZGaJWrtGF8W0,13
|
29
|
+
academia_mcp-1.8.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|