File size: 3,131 Bytes
760d086
 
 
 
 
 
 
 
 
 
 
c09438e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4d55138
 
c09438e
 
 
 
 
 
 
 
 
 
4d55138
c09438e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4d55138
c09438e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
---
title: Reference Management System
emoji: πŸ“š
colorFrom: blue
colorTo: purple
sdk: docker
sdk_version: "latest"
app_file: app.py
pinned: false
---

# Reference Management System

A simple web app to process and organize BibTeX references.

## What It Does

**Input**: Paste your BibTeX entries  
**Process**: Enrich metadata, abbreviate journals, protect acronyms  
**Output**: View results and save to database  

No local files needed (main.tex, Refs.bib). Everything happens online.

## Quick Start

### Local Setup
```bash
pip install -r requirements.txt
python app.py
# Open http://localhost:5000
```

### Hugging Face Spaces
Already deployed at: `huggingface.co/spaces/mnoorchenar/scopus`

## How to Use

1. **Paste BibTeX** into the input box
2. **Choose options**:
   - 🌐 **Enrich**: Fetch latest data from Crossref API (~3-5 sec per reference)
   - πŸ“– **Abbreviate**: Shorten journal names (requires `ltwa.txt`)
   - πŸ›‘οΈ **Protect**: Wrap acronyms in braces for LaTeX (`{RNN}`, `{LSTM}`)
   - πŸ’Ύ **Save**: Store in database for later use
3. **Process** and view results in table, BibTeX, or JSON format
4. **Export** as CSV or .bib file

## Options Explained

| Option | What it does | Notes |
|--------|-------------|-------|
| Enrich with Crossref | Updates references from online database | Slower but most accurate |
| Journal Abbreviations | Converts "Nature" β†’ "Nature" using LTWA standard | Needs `ltwa.txt` file |
| Protect Acronyms | Wraps multi-uppercase words in braces | Prevents LaTeX from lowercasing |
| Save to Database | Stores all versions locally | SQLite - portable & persistent |

## File Structure

```
app.py                    # Main application
templates/index.html      # Web interface
requirements.txt          # Dependencies
refs_management.db        # Database (auto-created)
ltwa.txt                  # Journal abbreviations (optional)
```

## Database

All processed references saved to `refs_management.db`:
- Original BibTeX
- Enriched metadata from Crossref
- Abbreviated journal names
- Acronym-protected versions
- Import timestamp

## Notes

- **No files to upload**: Paste content directly
- **Crossref API**: Free but rate-limited (~3-5 sec per entry)
- **Journal abbreviations**: Optional, but requires `ltwa.txt` with tab-separated format
- **Database**: SQLite - runs locally, no internet needed after processing
- **Export**: Download as CSV or BibTeX anytime

## Example Input

```bibtex
@article{Smith2024,
  author = {Smith, John},
  title = {Machine Learning for NLP},
  journal = {IEEE Transactions on Pattern Analysis and Machine Intelligence},
  year = {2024}
}
```

## Troubleshooting

**App won't start**: Check `python app.py` runs on port 7860 (Hugging Face Spaces)

**"ltwa.txt not found"**: Optional file - app works without it (abbreviation feature just won't activate)

**Crossref slow**: Normal - API has rate limits. 10 references β‰ˆ 30-50 seconds

**Results not saving**: Ensure "Save to Database" checkbox is enabled

## Learn More

- Crossref API: https://crossref.org
- Journal abbreviations: https://www.nlm.nih.gov/bsd/ltwa_mainpage.html