Skip to main content

A CLI tool to automate research by fetching data from multiple sources and exporting to PDF/CSV.

Project description

SourceFolio Banner

SourceFolio

PyPI Version Python Versions License: MIT

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:

  1. You will be prompted to enter your NewsAPI key.
  2. The application will validate the key to ensure it's working.
  3. 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:

  1. Press the Windows Key, type env, and select "Edit the system environment variables".
  2. Click the "Environment Variables..." button.
  3. In the top "User variables" box, select the Path variable and click "Edit...".
  4. Click "New" and paste in the path to your Python Scripts folder.
    • You can find this path by running py -m site --user-site in your command prompt and replacing site-packages with Scripts.
    • It will look something like this: C:\Users\YourUsername\AppData\Roaming\Python\PythonXX\Scripts
  5. Click "OK" on all windows to save.
  6. Completely close and re-open your terminal. The sourcefolio command 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

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

sourcefolio-1.0.6.tar.gz (19.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sourcefolio-1.0.6-py3-none-any.whl (19.9 kB view details)

Uploaded Python 3

File details

Details for the file sourcefolio-1.0.6.tar.gz.

File metadata

  • Download URL: sourcefolio-1.0.6.tar.gz
  • Upload date:
  • Size: 19.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for sourcefolio-1.0.6.tar.gz
Algorithm Hash digest
SHA256 6ecf220b7d48e53ecce5c667b3adcf3fc410ab16a8b2c4f9fa608d4b17fbcbba
MD5 9afeee4f51ece8e380b4aeed7b63bc7f
BLAKE2b-256 499d97aaf8d96924c0a08804bc754285f6bd0282b52c80ea547a82e1eaa51fd1

See more details on using hashes here.

File details

Details for the file sourcefolio-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: sourcefolio-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 19.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for sourcefolio-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 a00b0b037b7577d748843fe8f61919691f6f7701259f3fdb7f2b1c69d4a6dfb3
MD5 da1dc220c2e1ec0fc8a86383f63623a1
BLAKE2b-256 04ec03b0d34e15d1d883a758bcc52f9d6caa852897ffcd6d24025b455b9f6829

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page