A CLI tool to automate research by fetching data from multiple sources and exporting to PDF/CSV.
Project description
SourceFolio
SourceFolio is a CLI tool that automates research by fetching information from multiple sources like Wikipedia, OpenLibrary, and NewsAPI based on user-provided keywords. It provides a seamless experience for collecting and exporting data into clean, readable formats.
Features
- Interactive Session: A guided, step-by-step process for users who prefer a prompted workflow.
- Multiple Data Sources: Gathers data from:
- Wikipedia: Summary or full-page content.
- OpenLibrary: Related books and authors.
- NewsAPI: Recent news articles.
- Smart API Key Handling: Automatically prompts for and securely stores your NewsAPI key on the first run.
- Data Preview: Displays a summary of collected data directly in the terminal before export.
- Multiple Export Formats: Exports comprehensive reports to PDF (with clickable links) and CSV.
- Rich Terminal UI: Uses modern, interactive prompts and progress bars for a better user experience.
๐ฆ Installation
SourceFolio is available on the Python Package Index (PyPI). You can install it directly using pip:
pip install sourcefolio
To upgrade to the latest version, run:
pip install --upgrade sourcefolio
๐ ๏ธ Configuration
SourceFolio requires a free API key from newsapi.org to fetch news articles.
The first time you run the application, it will automatically guide you through a one-time setup:
- You will be prompted to enter your NewsAPI key.
- The application will validate the key to ensure it's working.
- Your key will be securely saved in a configuration file in your home directory (
~/.sourcefolio/config.json) for all future sessions.
On subsequent runs, the application will confirm your saved key and give you the option to continue using it, change it, or remove it.
Usage
Once installed, you can run the tool directly from your terminal.
To start the guided, interactive session, simply run:
sourcefolio
Follow the on-screen prompts to enter keywords, choose the level of detail, and export your research report.
Tip: You can exit the application at any point by pressing Ctrl+C.
โ๏ธ Troubleshooting
Windows: 'sourcefolio' is not recognized as an internal or external command...
This error typically happens on Windows if your Python installer was not configured to "Add Python to PATH". This means the system doesn't know where to find the sourcefolio command.
Newer Python installers or distributions like Anaconda often handle this automatically, but the fix is simple:
- Press the Windows Key, type
env, and select "Edit the system environment variables". - Click the "Environment Variables..." button.
- In the top "User variables" box, select the
Pathvariable and click "Edit...". - Click "New" and paste in the path to your Python
Scriptsfolder.- You can find this path by running
py -m site --user-sitein your command prompt and replacingsite-packageswithScripts. - It will look something like this:
C:\Users\YourUsername\AppData\Roaming\Python\PythonXX\Scripts
- You can find this path by running
- Click "OK" on all windows to save.
- Completely close and re-open your terminal. The
sourcefoliocommand will now work.
๐ Project Structure
SourceFolio/
โโโ fetchers/ # Data fetching functions
โ โโโ news_api.py
โ โโโ openlibrary_api.py
โ โโโ wikipedia_function.py
โโโ processing/ # Supporting functions
โ โโโ config.py
โ โโโ csv_exporter.py
โ โโโ pdf_exporter.py
โ โโโ ui.py
โ โโโ utils.py
โโโ tests/ # Test files
โโโ CHANGELOG.md # Log of all version changes
โโโ LICENSE # MIT License file
โโโ main.py # Main application script
โโโ pyproject.toml # Project metadata and dependencies
โโโ README.md # This file
Tech Stack
- Python 3
- rich
- InquirerPy
- ReportLab
- wikipedia
- requests
Project Roadmap
This is the first public version of SourceFolio. I am planning on continuing to include more features in the future. Some of the planned enhancements include:
- More Data Sources: Integration with additional data sources such as academic journals and social media.
- Selective Data Output: Users will be able to choose which data sources to include in the final output.
- Command-Line Flags: The ability to use the tool directly from the command line with flags, bypassing the interactive mode.
Contributing
SourceFolio is an open-source project, and contributions are always welcome! Whether you're interested in fixing bugs, adding new features, or improving documentation, your help is appreciated.
If you'd like to contribute, please feel free to:
- Fork the repository and submit a pull request.
- Open an issue to report bugs or suggest improvements.
Every contribution, no matter how small, helps make this project better.
Acknowledgements
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sourcefolio-1.0.5.tar.gz.
File metadata
- Download URL: sourcefolio-1.0.5.tar.gz
- Upload date:
- Size: 18.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95b1f82529c0a3af0ecad31460a9c8a577ce3201b913d2ace0d8583f52306afd
|
|
| MD5 |
dc4eec7aa997ebcb474329a87222a1fd
|
|
| BLAKE2b-256 |
68cadced23101f024f4c0c373a5d843321aa867a7e996b9b62c7d7a2231e96a0
|
File details
Details for the file sourcefolio-1.0.5-py3-none-any.whl.
File metadata
- Download URL: sourcefolio-1.0.5-py3-none-any.whl
- Upload date:
- Size: 19.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3ef61490df29d73be285558d3b6a5fc4f378a61887177c30ea9bd89241e054c
|
|
| MD5 |
0ab5e10a5ca3e041ee70eda3d8dc09fc
|
|
| BLAKE2b-256 |
6ff6d39ecc2418b48ca890946666069b957feef18d4df4d93c603511c02f8618
|