Skip to main content

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

Project description

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.5.tar.gz (18.8 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.5-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

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

Hashes for sourcefolio-1.0.5.tar.gz
Algorithm Hash digest
SHA256 95b1f82529c0a3af0ecad31460a9c8a577ce3201b913d2ace0d8583f52306afd
MD5 dc4eec7aa997ebcb474329a87222a1fd
BLAKE2b-256 68cadced23101f024f4c0c373a5d843321aa867a7e996b9b62c7d7a2231e96a0

See more details on using hashes here.

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

Hashes for sourcefolio-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 c3ef61490df29d73be285558d3b6a5fc4f378a61887177c30ea9bd89241e054c
MD5 0ab5e10a5ca3e041ee70eda3d8dc09fc
BLAKE2b-256 6ff6d39ecc2418b48ca890946666069b957feef18d4df4d93c603511c02f8618

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