summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorCaptainJack2491 <jayrupnakawala@gmail.com>2026-02-27 23:24:52 +0000
committerCaptainJack2491 <jayrupnakawala@gmail.com>2026-02-27 23:24:52 +0000
commit94c52b54f3d1693ef5d1831b0fa6beba8c68b414 (patch)
treeee134da05e3e9529e667d7af9e6fd3e44d19b585 /scripts
parentd81a300f16fc22237b8422edc975272b41b8a61d (diff)
created the logs branch
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/extract_abstract42
-rwxr-xr-xscripts/generate_refrences30
2 files changed, 0 insertions, 72 deletions
diff --git a/scripts/extract_abstract b/scripts/extract_abstract
deleted file mode 100755
index e70b3cb..0000000
--- a/scripts/extract_abstract
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/bin/bash
-
-# Directory containing the papers
-PAPER_DIR="../papers"
-
-echo "Fetching abstracts for arXiv papers in $PAPER_DIR..."
-echo "===================================================="
-
-for file in "$PAPER_DIR"/*.pdf; do
- # Extract the arXiv ID (e.g., 2401.05566) from the filename
- filename=$(basename "$file")
- id=$(echo "$filename" | grep -oE '[0-9]{4}\.[0-9]{4,5}')
-
- if [ -n "$id" ]; then
- echo "FILE: $filename"
- echo "ID: $id"
-
- # Fetch XML from arXiv API and parse the <summary> tag using Python
- curl -s "https://export.arxiv.org/api/query?id_list=$id" | \
- python3 -c "
-import sys, xml.etree.ElementTree as ET
-try:
- xml_data = sys.stdin.read()
- root = ET.fromstring(xml_data)
- ns = {'atom': 'http://www.w3.org/2005/Atom'}
- summary = root.find('.//atom:summary', ns)
- if summary is not None:
- print(summary.text.strip())
- else:
- print('Abstract not found in API response.')
-except Exception as e:
- print(f'Error parsing response: {e}')
-"
- echo "----------------------------------------------------"
- else
- echo "Skipping: $filename (No arXiv ID detected)"
- echo "----------------------------------------------------"
- fi
- sleep 1
-done
-
-
diff --git a/scripts/generate_refrences b/scripts/generate_refrences
deleted file mode 100755
index 1d5ec25..0000000
--- a/scripts/generate_refrences
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/bash
-
-OUTPUT_FILE="../src/final/references.bib"
-echo "Generating $OUTPUT_FILE..."
-
-# Clear the file if it exists
-> "$OUTPUT_FILE"
-
-for file in ../papers/*.pdf; do
- # Extract the arXiv ID (e.g., 2401.05566)
- id=$(basename "$file" | grep -oE '[0-9]{4}\.[0-9]{4,5}')
-
- if [ -n "$id" ]; then
- echo "Fetching BibTeX for ID: $id"
-
- # Fetch the BibTeX entry from arXiv's export service
- # -L follows redirects
- # -s is silent
- curl -L -s "https://arxiv.org/bibtex/$id" >> "$OUTPUT_FILE"
-
- # Add a newline between entries
- echo -e "\n" >> "$OUTPUT_FILE"
- else
- echo "Skipping non-arXiv file: $(basename "$file")"
- fi
-done
-
-echo "Done! Created $OUTPUT_FILE with $(grep -c "@article" "$OUTPUT_FILE") entries."
-
-