dshoreman/flaportum

Need a config command of some sort

Opened this issue · 1 comments

It's fine hard-coding the token for a localhost install, but that won't be the only variable needed further down the line.

Add a flaportum config command, or maybe a set of "service:*" commands to manage import/export configs. Could be handy to have a config/services.php file that holds it all in an array for simplicity.

Potential commands:

  • flaportum config - configure Flarum imports (assuming we don't add other importers)
  • flaportum service:list - list all export service configurations
  • flaportum service:config --service=<service> - configure a specific service
  • flaportum service:[add|remove] --service=<service> - add/purge a specific config

Maybe instead of service:* they could all be config:* to avoid ambiguity issues with actual service classes. Going this route it could have flaportum config[:[list|add|update|remove]] to provide a run-once "config all the things" option as well as fine-grained control for those that want it.

Another option I just thought of: Profiles, or connections. Although profiles is probably more descriptive seeing as not every exporter will use a "connection" as it were (think DOM).

One profile would be the equivalent of a database connection in Laravel etc..

Solves the ambiguity issue, and leaves config around for actual config should it be needed later.