Metadata-Version: 2.4
Name: Rgenerator
Version: 1.2.0
Summary: A Tkinter GUI application to fetch bibliographies from Crossref and generate perfectly formatted APA Word documents.
Author-email: Alok Kumar Maurya <akmaurya.iitkgp@gmail.com>
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: requests
Requires-Dist: python-docx
Dynamic: license-file

# Reference Generator (APA)

Welcome to the **Reference Generator**, a lightweight, visually intuitive desktop application designed to eliminate the headache of formatting academic citations. 

Developed with ❤️ by **Alok Kumar Maurya** (HydroClimate Lab IITKGP), this tool uses the powerful Crossref API to take your rough notes, partial citations, or simple article titles and instantly transform them into a perfectly formatted APA reference list.

---

## 🎯 What Does It Do?

Researchers often have messy lists of references—sometimes just a paper title, sometimes a badly formatted citation from a PDF. 

**With this tool, you can paste or upload *just the title* or *any messy type of reference* into the app, and it will fetch the exact metadata to generate a flawless 7th Edition APA citation, complete with the DOI link.**

### Example: The Transformation

**Your Input (Messy or incomplete):**
> *Leveraging the use of digital agriculture and machine learning for accurate prediction of Leaf Area Index (LAI)*
> *Maurya, Alok Kumar, and Amey Pathak. "Leveraging the use of digital agriculture and machine learning for accurate prediction of Leaf Area Index (LAI)."*

**The App's Output (Perfect APA Word Document):**
> Maurya, A. K., & Pathak, A. (2025). Leveraging the use of digital agriculture and machine learning for accurate prediction of Leaf Area Index (LAI). Computers and Electronics in Agriculture, 239, 110947. https://doi.org/10.1016/j.compag.2025.110947

---

## ✨ Key Features

* **Smart Fetching:** Powered by Crossref, the tool searches the web for the exact paper using whatever text you provide.
* **Automatic APA Formatting:** Generates citations with proper Author initials, publication year, article title, italicized journal names, volume/issue numbers, and correct page ranges.
* **Always Includes DOI:** Automatically fetches and appends the `https://doi.org/...` link to every reference.
* **Alphabetical Sorting:** Your final reference list is automatically sorted from A to Z.
* **Perfect Word Document Export:** Creates a ready-to-print `.docx` file complete with standard APA hanging indents (0.5 inches).
* **Flexible Inputs:** Paste text directly, or upload your existing `.txt` or `.docx` files.

---

## 🚀 Installation

You can install this package globally on your computer using Python's package manager, `pip`.

Open your terminal or command prompt and run:

```bash

pip install Rgenerator


## 🛠️ Step-by-Step Usage Guide
## Step 1: Launch the App
##Once installed, you don't need to write any Python code. Simply open your terminal/command prompt and type:

RefGenerator

## If path error then used:  

python -c "from reference_generator import app; app.main()"

## The Graphical User Interface (GUI) will immediately pop up on your screen.

## Step 2: Input Your ReferencesYou have two easy ways to provide your references:Type or Paste: Simply copy your list of article titles or rough citations and paste them directly into the large text box in the app. Put one reference/title per line.  Upload a File: Click the "📁 Upload File" button to load a .txt or .docx file from your computer. The app will automatically extract the text for you. 

## Step 3: Set Working Directory (Optional)
Click "⚙️ Set Working Directory" to choose the default folder where you want your final Word document saved.

## Step 4: Generate!
Click the green "🚀 Export to Word (.docx)" button.

