Skip to main content

Convert Anything Offline — a modular CLI tool for file format conversion.

Project description

CAO — Convert Anything Offline

CAO is a modular, offline-first command-line tool that lets you convert files between dozens (eventually hundreds) of formats — images, text, geospatial, and more. Designed to be clean, extensible, and completely offline, CAO also includes plugin support for community-driven converters.


Features

  • Convert files across many format families (image, text, geospatial, etc.)
  • Auto-discovery of sources and targets
  • Plugin system with install/remove/reload support
  • Built-in support for common geospatial formats (GeoJSON, Shapefile, GeoParquet, CSV with lat/lon)
  • Architecture designed for scale — clean interfaces and grouping
  • Easy to test and extend
  • Fully offline — no internet required to use

Installation

CAO is currently distributed via GitHub.

git clone https://github.com/jackmcnulty/cao.git
cd cao
pip install -e .

You’ll need:

  • Python 3.8+
  • pip
  • Basic packages: click, Pillow, geopandas, pandas, shapely, fiona, pyarrow (check setup.py for full list)

Usage

Convert files

cao convert input.png output.jpg
cao convert input.txt output.png
cao convert data.geojson output.csv

CAO will determine what type of content you're converting and route it to the right source and target.


See what a format can convert to

cao from png
cao from geojson
cao from csv

Outputs something like:

You can convert 'geojson' into:
- csv
- shp
- parquet

Plugin System

CAO supports installable converters and features via plugins.

List installed plugins

cao plugin list

Install a plugin

cao plugin install ./my_plugin.py
cao plugin install ./plugin_bundle.zip

Remove a plugin

cao plugin remove my_plugin

Reload all plugins (dev-time hotload)

cao plugin reload

Bundle all installed plugins into a ZIP

cao plugin bundle my_plugins.zip

Creating Your Own Converter

Create a Source

from cao.sources.base import BaseSource
from cao.registry import ConverterRegistry

class HelloSource(BaseSource):
    def extract(self, path):
        return {"type": "text", "data": "Hello from source"}

    @classmethod
    def supported_extensions(cls):
        return ["hello"]

    @classmethod
    def data_type(cls):
        return "text"

ConverterRegistry.register_source("hello", HelloSource)

Create a Target

from cao.targets.base import BaseTarget
from cao.registry import ConverterRegistry

class UpperTextTarget(BaseTarget):
    def write(self, data, path):
        with open(path, "w") as f:
            f.write(data["data"].upper())

    @staticmethod
    def accepts_type(data_type):
        return data_type == "text"

ConverterRegistry.register_target("txt", lambda ext: UpperTextTarget())

📁 Project Structure

cao/
├── cao/
│   ├── cli.py
│   ├── engine.py
│   ├── registry.py
│   ├── sources/
│   │   ├── image/
│   │   ├── geospatial/
│   ├── targets/
│   │   ├── text/
│   │   ├── image/
│   │   ├── geospatial/
│   ├── plugins/
├── README.md
├── setup.py
├── pyproject.toml

Contributing

Want to contribute?

  • See CONTRIBUTING.md for how to add new converters
  • Keep things modular — one class per source/target, grouped by format type
  • Follow naming conventions and interface expectations
  • PRs are welcome!

License

MIT License — free to use, modify, and share.


Roadmap

  • Lots of new converters

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

convert_offline-0.1.2.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

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

convert_offline-0.1.2-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file convert_offline-0.1.2.tar.gz.

File metadata

  • Download URL: convert_offline-0.1.2.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for convert_offline-0.1.2.tar.gz
Algorithm Hash digest
SHA256 fb96ae643b453046eadcb7657db388d17e1d985fb4a70f5fbe5a727029561560
MD5 5bf5607e97b5d6bc92c47c334baaa8aa
BLAKE2b-256 57daee36810da08b70297c167069e7f3ce8fe2c0320a15ae466a945412c0fd94

See more details on using hashes here.

File details

Details for the file convert_offline-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for convert_offline-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a7f5b5323999286ebfe0c54c1a40a992c2babc545c0d4c2be75060178055a5f8
MD5 966c74b5809abd49e2d59d0bd6c84b7d
BLAKE2b-256 f63be1132a873a17023c7a41b3725d8b0df3f05f18e666103aa2aaef41570796

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