arxiv-to-prompt 0.2.0__py3-none-any.whl → 0.2.2__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.
@@ -13,8 +13,20 @@ Example:
13
13
 
14
14
  from .core import process_latex_source, download_arxiv_source, get_default_cache_dir
15
15
 
16
+ # Import version from package metadata
17
+ try:
18
+ from importlib.metadata import version
19
+
20
+ __version__ = version("arxiv-to-prompt")
21
+ except ImportError:
22
+ # Python < 3.8 fallback
23
+ from importlib_metadata import version
24
+
25
+ __version__ = version("arxiv-to-prompt")
26
+
16
27
  __all__ = [
17
28
  "process_latex_source",
18
29
  "download_arxiv_source",
19
30
  "get_default_cache_dir",
20
- ]
31
+ "__version__",
32
+ ]
arxiv_to_prompt/core.py CHANGED
@@ -192,7 +192,8 @@ def flatten_tex(directory: str, main_file: str) -> str:
192
192
 
193
193
  # Process the command normally
194
194
  input_file = match.group(1)
195
- if not input_file.endswith('.tex'):
195
+ # Only add .tex extension if the file has no extension at all
196
+ if not os.path.splitext(input_file)[1]:
196
197
  input_file += '.tex'
197
198
  input_path = os.path.join(directory, input_file)
198
199
  return process_file(input_path, processed_files)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: arxiv-to-prompt
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: transform arXiv papers into a single latex prompt for LLMs
5
5
  Author: Takashi Ishida
6
6
  License: MIT
@@ -0,0 +1,9 @@
1
+ arxiv_to_prompt/__init__.py,sha256=UjbXdsTGX7eT6O1RvqGB1-wMv_Kj-pM-7M5FZUUzVIQ,899
2
+ arxiv_to_prompt/cli.py,sha256=2ZVmxNcygFpOFROfCo-FtXzcRpLVVRUOkIhASL0iD7o,1179
3
+ arxiv_to_prompt/core.py,sha256=0XwG9hqljQ3FHDOmmR7C8CX4ge1CJJAqSosVzTXhkes,10425
4
+ arxiv_to_prompt-0.2.2.dist-info/licenses/LICENSE,sha256=np8L3--VyxwVJa_8D_mfK4RYrtnRMM_eeYN3rM4PMHo,1071
5
+ arxiv_to_prompt-0.2.2.dist-info/METADATA,sha256=MwmVCm5oLxKS8L-gQeFHK5W-YCidjepwebVesWHskco,3998
6
+ arxiv_to_prompt-0.2.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
7
+ arxiv_to_prompt-0.2.2.dist-info/entry_points.txt,sha256=iYEEn8xZ_5OkhNIs5HCyHSQBpDRJkbD5h0tlAb16lL0,61
8
+ arxiv_to_prompt-0.2.2.dist-info/top_level.txt,sha256=JClbu_lGGWu3RaTHZlNqTKB1-DUSbYXQNIYmJ9_F7fY,16
9
+ arxiv_to_prompt-0.2.2.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- arxiv_to_prompt/__init__.py,sha256=oL2bEzZhiFoMqCF-84Xmljqw55lgRkwInBFpExRPCTY,609
2
- arxiv_to_prompt/cli.py,sha256=2ZVmxNcygFpOFROfCo-FtXzcRpLVVRUOkIhASL0iD7o,1179
3
- arxiv_to_prompt/core.py,sha256=pVsUzpplBBTLBxxjYQ6AbR667XlZ9TMz3RFNS8bX7X8,10343
4
- arxiv_to_prompt-0.2.0.dist-info/licenses/LICENSE,sha256=np8L3--VyxwVJa_8D_mfK4RYrtnRMM_eeYN3rM4PMHo,1071
5
- arxiv_to_prompt-0.2.0.dist-info/METADATA,sha256=iD0c2HDslUJzc-1xWN1-0X95TUZtxBpLPc36NIicF_A,3998
6
- arxiv_to_prompt-0.2.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
7
- arxiv_to_prompt-0.2.0.dist-info/entry_points.txt,sha256=iYEEn8xZ_5OkhNIs5HCyHSQBpDRJkbD5h0tlAb16lL0,61
8
- arxiv_to_prompt-0.2.0.dist-info/top_level.txt,sha256=JClbu_lGGWu3RaTHZlNqTKB1-DUSbYXQNIYmJ9_F7fY,16
9
- arxiv_to_prompt-0.2.0.dist-info/RECORD,,