This project contains two Python scripts:
search.py
: Fetches all pages' ID and URL pairs from the Omnivore API and saves them as a JSON file.json2csv.py
: Converts the JSON data to CSV format, ensuring each cell is limited to a maximum of 30,000 characters to prevent data truncation when importing to Microsoft Excel.
- Python 3.x
requests
library for making API calls
You can install the required libraries using pip:
pip install requests
-
Generate an API Key: Log in to your Omnivore account and navigate to Omnivore API Settings. Generate a new API key.
-
Execute the Script: Run the script from the command line using the following command:
python query_all.py --apikey your-api-key
If the
--apikey
option is not provided, the script will search for theOMNIVORE_API_KEY
environment variable. Thequery_all.py
script retrieves all pages' ID and URL pairs from the Omnivore API and saves them as a JSON file.
Run the json2csv.py
script to convert the JSON data to CSV format. Each cell in the CSV file will be limited to a maximum of 30,000 characters.
python json2csv.py
This project is licensed under the AGPL-3.0 License. See the LICENSE file for details.
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.