This Streamlit application converts BibTeX files into CSV, JSON, and extracts DOIs into a text file. It allows users to upload BibTeX files or paste BibTeX content directly, and then provides options to download the converted data and preview it.
- BibTeX Parsing: Parses BibTeX content from uploaded files or pasted text.
- CSV Conversion: Converts BibTeX entries to CSV format.
- JSON Conversion: Converts BibTeX entries to JSON format.
- DOI Extraction: Extracts DOIs from BibTeX entries into a text file.
- Download Options: Provides download buttons for CSV, JSON, and DOI text files.
- Preview Options: Allows users to preview CSV, JSON, and DOI data.
- Modal JSON Preview: Displays formatted JSON in a modal for better readability.
- Handles Multiple Files: Combines content from multiple uploaded BibTeX files.
- Error Handling: Provides error messages for parsing and conversion issues.
- Logging: Logs application events and errors to a file.
- Upload BibTeX Files:
- Drag and drop one or more BibTeX files (.bib) into the file uploader.
- The maximum file size is 50MB per file.
- Paste BibTeX Content:
- Alternatively, paste BibTeX content directly into the text area.
- Process Preview:
- Enter the number of entries to process for preview (default is 5).
- Click the "Process Preview" button to process a limited number of entries.
- Process All:
- Click the "Process All" button to process all entries.
- Download Data:
- Click the "Download CSV" button to download the data in CSV format.
- Click the "Download JSON" button to download the data in JSON format.
- Click the "Download DOIs txt" button to download the extracted DOIs in a text file.
- Preview Data:
- Enter the number of records to preview (max 50).
- The app will display a preview of the CSV data in a table.
- Click the "View Full JSON" button to view the JSON data in a modal.
- The app will display a preview of the extracted DOIs.
- Clone the Repository:
git clone [repository_url] cd [repository_directory] - Install Dependencies:
pip install streamlit bibtexparser pandas
- Run the Application:
streamlit run bibtex_app.py
- Streamlit: For creating the web application.
- Streamlit-Modal: For displaying the JSON data in a popup modal.
Future: Consider st.dialog - bibtexparser: For parsing BibTeX files.
- pandas: For data manipulation and CSV conversion.
The application logs events and errors to the app.log file.
Contributions are welcome! Please feel free to submit pull requests or open issues.
[MIT License]