Skip to main content

Tools for converting Synapse RTP JSON to spreadsheet and back.

Project description

synapseconvert

A simple two-way converter for Synapse-style libraries (collections → categories → items) using Excel and JSON. This is intended for developers working with Synapse, a research transport protocol designed for structured academic resources.


📦 Installation

The recommended way to install is:

pip install synapseconvert

If that doesn’t work, try:

python3 -m pip install synapseconvert

⚠️ On macOS or Linux, you may need sudo for a global install:

sudo python3 -m pip install synapseconvert

Alternatively, to avoid permission issues and keep things clean, use a virtual environment:

python3 -m venv venv
source venv/bin/activate
pip install synapseconvert

🔍 Confirm it installed correctly:

which synapse-upconvert
synapse-upconvert --help

If the command isn’t found, try running it as a module:

python3 -m synapseconvert.upconvert path/to/input.xlsx path/to/output.json

Or install from source:

git clone https://github.com/BiblicalStory/synapseconvert.git
cd synapseconvert
pip install -e .

🛠 Usage

Convert from Excel to JSON (Upconvert)

synapse-upconvert path/to/input.xlsx path/to/output.json

This reads a spreadsheet and produces a properly nested Synapse metadata file.

Convert from JSON to Excel (Downconvert)

synapse-downconvert path/to/input.json path/to/output.xlsx

This flattens a Synapse-style JSON file into a spreadsheet for editing or review.


📄 Spreadsheet Format

The spreadsheet must contain at least the following columns:

✅ Required Columns

  • collection – the name of the collection (uniform across all rows)
  • category – the name of the group the item belongs to

✅ Optional Item Fields

  • title, description, author, url, date, etc. – all other metadata fields are treated as item fields

✅ Optional Collection-Level Fields

These are only read from the first row and apply to the whole collection:

  • designator – short tag used to identify the collection (e.g., "BST")
  • collection_url – base URL for the collection homepage or API

If these are omitted, the following defaults apply:

  • designator: "UNK"
  • collection_url: "https://substrate.biblicalstory.org"

⚠️ Tags Field (Special Case)

  • If included, tags must be valid JSON (not comma-separated strings).
  • Example:
["Genesis", "Luke"]

If the tags field contains malformed JSON (e.g., Genesis, Luke), the script will skip it and print a warning.


📁 Sample Templates

  • sample.xlsx
  • sample.json

These are included in the installed package and available from the GitHub repo.


🧠 Why This Exists

Synapse is designed to bring remote research libraries directly into Obsidian. Since BiblicalStory.org cannot create Synapse files for every research repository in existence, this tool allows developers to build and maintain their own Synapse libraries using spreadsheets or JSON. These libraries can then be added to Synapse in Obsidian to allow live query and navigation.


🔧 Developer Tools

For advanced usage, clone this repo and run locally:

git clone https://github.com/BiblicalStory/synapseconvert.git
cd synapseconvert
pip install -e .

This allows you to edit the source code and extend it for your own domains or institutions.


© 2025 BiblicalStory Incorporated. MIT License.

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

synapseconvert-1.0.0.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

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

synapseconvert-1.0.0-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file synapseconvert-1.0.0.tar.gz.

File metadata

  • Download URL: synapseconvert-1.0.0.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for synapseconvert-1.0.0.tar.gz
Algorithm Hash digest
SHA256 beaf86bc1714926d5ca5529b1b5a8467f528c0f39e8ee50a398a5a8f6d738cd7
MD5 73f3a35fa3fb305f4e28a40f6256df82
BLAKE2b-256 4347417db78ebc7b3626d82f13aee86503b35433d7fba4785af82b99cf5aec03

See more details on using hashes here.

File details

Details for the file synapseconvert-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: synapseconvert-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for synapseconvert-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7a6df6c3c9d0621d2a47b9890dccf9f1fe8088455fbee40645525885a0b025bf
MD5 9acedf24c27e915b2c3c30672c8e17ea
BLAKE2b-256 16dae1d87bee67e6ba61f9da1d8a4c0599770ad4ffc6c3bc09660b028b05045a

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