Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
runs-on: ubuntu-latest
env:
TEST_DATABASE_URL: mysql2://root:mysql@127.0.0.1:3306/intercode_import_test
EVENTLITE_TEST_DATABASE_URL: postgres://postgres:postgres@127.0.0.1:5432/eventlite_test
services:
mysql:
image: mysql:8
Expand All @@ -30,6 +31,18 @@ jobs:
--health-retries 5
ports:
- 3306:3306
postgres:
image: postgres:16
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: eventlite_test
options: >-
--health-cmd "pg_isready"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v6
- name: Set up Ruby
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ ruby File.read(File.expand_path('.ruby-version', __dir__)).strip
gem 'activesupport'
gem 'bcrypt'
gem 'mysql2', '~> 0.5.3'
gem 'pg'
gem 'nokogiri'
gem 'parallel'
gem 'rake'
Expand Down
15 changes: 15 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ GEM
nokogiri (1.19.3-x86_64-linux-musl)
racc (~> 1.4)
parallel (2.1.0)
pg (1.6.3)
pg (1.6.3-aarch64-linux)
pg (1.6.3-aarch64-linux-musl)
pg (1.6.3-arm64-darwin)
pg (1.6.3-x86_64-darwin)
pg (1.6.3-x86_64-linux)
pg (1.6.3-x86_64-linux-musl)
prism (1.9.0)
racc (1.8.1)
rake (13.4.2)
Expand Down Expand Up @@ -84,6 +91,7 @@ DEPENDENCIES
mysql2 (~> 0.5.3)
nokogiri
parallel
pg
rake
reverse_markdown
sequel
Expand Down Expand Up @@ -113,6 +121,13 @@ CHECKSUMS
nokogiri (1.19.3-x86_64-linux-gnu) sha256=2f5078620fe12e83669b5b17311b32532a8153d02eee7ad06948b926d6080976
nokogiri (1.19.3-x86_64-linux-musl) sha256=248c906d2166eca5efb56d52fdee5f9a1f51d69a72e2b64fdac647b4ce39ea3f
parallel (2.1.0) sha256=b35258865c2e31134c5ecb708beaaf6772adf9d5efae28e93e99260877b09356
pg (1.6.3) sha256=1388d0563e13d2758c1089e35e973a3249e955c659592d10e5b77c468f628a99
pg (1.6.3-aarch64-linux) sha256=0698ad563e02383c27510b76bf7d4cd2de19cd1d16a5013f375dd473e4be72ea
pg (1.6.3-aarch64-linux-musl) sha256=06a75f4ea04b05140146f2a10550b8e0d9f006a79cdaf8b5b130cde40e3ecc2c
pg (1.6.3-arm64-darwin) sha256=7240330b572e6355d7c75a7de535edb5dfcbd6295d9c7777df4d9dddfb8c0e5f
pg (1.6.3-x86_64-darwin) sha256=ee2e04a17c0627225054ffeb43e31a95be9d7e93abda2737ea3ce4a62f2729d6
pg (1.6.3-x86_64-linux) sha256=5d9e188c8f7a0295d162b7b88a768d8452a899977d44f3274d1946d67920ae8d
pg (1.6.3-x86_64-linux-musl) sha256=9c9c90d98c72f78eb04c0f55e9618fe55d1512128e411035fe229ff427864009
prism (1.9.0) sha256=7b530c6a9f92c24300014919c9dcbc055bf4cdf51ec30aed099b06cd6674ef85
racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f
rake (13.4.2) sha256=cb825b2bd5f1f8e91ca37bddb4b9aaf345551b4731da62949be002fa89283701
Expand Down
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

A Ruby toolkit for exporting legacy convention management system data into the [Intercode](https://github.com/neinteractiveliterature/intercode) convention import format.

Three source systems are supported: **Intercode 1** (PHP/MySQL), **ProCon** (MySQL), and **Illyan** (the user authentication database used alongside ProCon).
Four source systems are supported: **Intercode 1** (PHP/MySQL), **ProCon** (MySQL), **Illyan** (the user authentication database used alongside ProCon), and **Eventlite** (Rails/PostgreSQL).

## Output format

Expand Down Expand Up @@ -66,6 +66,27 @@ ORGANIZATION_NAME='Arisia' \
| `ORGANIZATION_NAME` | Yes | Organization name written into each export file. |
| `OUTPUT_FILE` | No | Output path. Only used when exactly one convention matches; otherwise files are named `convention-export-<domain>.json`. Pass `-` to print to stdout. |

### Eventlite

Exports one JSON file per event from an Eventlite PostgreSQL database. Each event becomes a separate single-event Intercode convention.

```sh
EVENTLITE_DB_URL=postgres://user:pass@host/eventlite_db \
DOMAIN_SUFFIX=example.com \
TIMEZONE=America/New_York \
bundle exec rake export:eventlite
```

| Variable | Required | Description |
|---|---|---|
| `EVENTLITE_DB_URL` | Yes | Sequel-compatible connection URL for the Eventlite PostgreSQL database. |
| `DOMAIN_SUFFIX` | No | Domain suffix appended to each event's slug to form the convention domain (default: `example.com`). |
| `TIMEZONE` | No | IANA timezone name applied to all conventions (default: `UTC`). |
| `FILE_BASE_URL` | No | Base URL for CMS file attachments stored in S3 (e.g. `https://my-bucket.s3.amazonaws.com/`). |
| `OUTPUT_FILE` | No | Output path. Only used when exactly one event is found; otherwise files are named `convention-export-<domain>.json`. Pass `-` to print to stdout. |

Each Eventlite event is exported as a `single_event` Intercode convention using the `ticket_per_event` ticket mode. Ticket types become Intercode ticket types and store items; users who purchased multiple ticket types get one ticket (the type with the most available slots wins) and additional store order entries for the rest. Pages containing Eventlite-specific Liquid tags (e.g. `{% ticket_form %}`) are omitted, as is any navigation pointing to those pages.

### Illyan (standalone user export)

Exports a set of users from the Illyan database by email address. Useful for migrating user accounts without a full convention export.
Expand Down
24 changes: 20 additions & 4 deletions convention-export.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"additionalProperties": false,
"properties": {
"version": { "type": "string", "const": "1" },
"source_system": { "type": "string", "enum": ["intercode1", "procon", "other"] },
"source_system": { "type": "string", "enum": ["intercode1", "procon", "eventlite", "other"] },
"organization_name": { "type": ["string", "null"] },
"cms_content_set": {
"type": ["string", "null"],
Expand All @@ -28,7 +28,8 @@
"cms_files": { "type": "array", "items": { "$ref": "#/$defs/cms_file" } },
"cms_pages": { "type": "array", "items": { "$ref": "#/$defs/cms_page" } },
"cms_partials": { "type": "array", "items": { "$ref": "#/$defs/cms_partial" } },
"cms_navigation_items": { "type": "array", "items": { "$ref": "#/$defs/cms_navigation_section" } }
"cms_navigation_items": { "type": "array", "items": { "$ref": "#/$defs/cms_navigation_section" } },
"cms_layouts": { "type": "array", "items": { "$ref": "#/$defs/cms_layout" } }
},

"$defs": {
Expand Down Expand Up @@ -296,7 +297,11 @@
"name": { "type": "string" },
"description": { "type": ["string", "null"] },
"available": { "type": "boolean" },
"price": { "$ref": "#/$defs/money" }
"price": { "$ref": "#/$defs/money" },
"provides_ticket_type_name": {
"type": ["string", "null"],
"description": "Name of the ticket_type this product provides when purchased"
}
}
},

Expand Down Expand Up @@ -379,7 +384,18 @@
"properties": {
"name": { "type": "string" },
"slug": { "type": "string" },
"content": { "type": "string", "description": "Liquid template content" }
"content": { "type": "string", "description": "Liquid template content" },
"cms_layout_name": { "type": ["string", "null"], "description": "Name of the cms_layout to use for this page" }
}
},

"cms_layout": {
"type": "object",
"required": ["name", "content"],
"additionalProperties": false,
"properties": {
"name": { "type": "string" },
"content": { "type": "string", "description": "Liquid template for the layout" }
}
},

Expand Down
13 changes: 13 additions & 0 deletions lib/intercode_import/eventlite.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# frozen_string_literal: true

require_relative 'eventlite/table'
require_relative 'eventlite/tables'
require_relative 'eventlite/exporter'

module IntercodeImport
module Eventlite
def self.logger
IntercodeImport::Logger.instance
end
end
end
Loading