• Resolved pierrick

    (@pierrick)


    Hi there,
    I am developing a PHP script for importing the meetings from the available JSON file created by this Plugin. (Not everyone is using WordPress … ;-))
    The JSON file does not necessarily contain all fields for any given meeting record. I see the code area contain a file called “template.csv” unfortunately the headings do not give the actual data field names.
    Is there a way of obtaining the complete data structure of the export?
    Many thanks,
    Pierrick

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter pierrick

    (@pierrick)

    Hi,
    Update…
    Looking into the actual code I see the file /includes/save.php seems to list what I’m looking for on line 443.
    Can anyone please confirm that this line:
    $fields = array('name', 'day', 'time', 'end_time', 'types', 'notes', 'location', 'formatted_address', 'region', 'location_notes', 'group', 'district', 'group_notes', 'website', 'website_2', 'email', 'phone', 'mailing_address', 'venmo', 'contact_1_name', 'contact_1_email', 'contact_1_phone', 'contact_2_name', 'contact_2_email', 'contact_2_phone', 'contact_3_name', 'contact_3_email', 'contact_3_phone', 'last_contact');
    contains all possible fields for any given meeting?
    Again, thanks.
    Pierrick

    Plugin Author tech2serve

    (@tech2serve)

    Hi @pierrick,

    Can you elaborate on what you’re trying to accomplish? Are you trying to write a PHP script to make the meetings in your database (MySql, Postgre, MariaDb, etc) available to the Meeting Guide app? If so, please follow the spec at GitHub. Generally, you should be able to simply adopt one of those scripts. If you have questions at that point, please open an issue over there.

    If you’re trying to do something else, the information over there is probably still helpful.

    Thread Starter pierrick

    (@pierrick)

    Hey thank you for the reply @tech2serve
    Yes I’m writing a script to import the meetings into a MySQL table from the JSON file produced by the 12 Step Meeting list plugin.
    And no it has nothing to do with the Meeting Guide App.
    And the link to the GitHub specs is exactly what I was looking for.
    Much appreciated.
    Many thanks, I can finish the script now.

    Thread Starter pierrick

    (@pierrick)

    Hi again @tech2serve
    Hmmm I may have spoken too soon…
    The word “optional” appears an alarming number of times around the JSON file structure. So much so that I am now wondering if it has any specific structure at all.
    I’m surprised there’s no data dictionary in the documentation.
    Oh well, I guess I’ll work with the JSON files I was given.
    Thanks anyway @tech2serve

    Plugin Author tech2serve

    (@tech2serve)

    The readme.md for the spec page has a list of descriptions and discusses what is required. But, you have to remember that is from the perspective of what goes into the Meeting Guide app, not necessarily the plugin.

    As you’re creating your database, you can pretty much choose whatever you want to include. If you’re writing a more generic tool to help groups migrate from WordPress to another platform, that is cool too. There has been discussion before about trying to support more outside of WordPress. Maybe come chat with us at code4recovery.slack.com?

    Thread Starter pierrick

    (@pierrick)

    The script I’m writing will serve to import meetings into a custom website (not WordPress) which you can visit here: https://www.buddhistrecovery.org/
    These meetings are imported from two separate WordPress sites which use the 12 Step Meeting plugin to generate their JSON export file.
    As for code4recovery.slack.com, I went to the site, but couldn’t see anywhere how to create an account. It says to “Contact the workspace administrator for an invitation” but how would one go about this? The Contact Us at the bottom doesn’t open up?
    Confused. ??

    Plugin Author tech2serve

    (@tech2serve)

    Thanks for letting me know about the #slack channel confusion. It is new for us, and I’m working the bugs out.

    You should be able to use this link to join for the next few days.

    Plugin Author brianwarea24

    (@brianwarea24)

    If I’m reading this thread correctly, then it sounds like what you’re trying to do is take information from 2 different WordPress sites that are using the 12 Step Meeting Plugin, and import their meeting information into your site, which is is not using WordPress.

    If you have access to one of those WordPress sites, you could add a new “test” meeting on that site. For this test meeting, add something in every field you think you may need. Then look at the JSON feed generated by the plugin, and find your test meeting. This would tell you the format you’ll receive from the plugin. Once you have that, you can delete the test meeting again.

    Thread Starter pierrick

    (@pierrick)

    @tech2serve
    Thanks for the link. I’ve joined and (I think) subscribed. Is there anything current that I can help with? It’s a rather ling list of posts and I’d rather not have to read the whole lot if I can avoid it.. ??

    @brianwarea24
    Thanks for the suggestion. I didn’t have access to the WordPress sites. So I created a test site of my own on my home server, installed the plugin and did what you mention: add a meeting (a few in fact) with everything I could fill in.
    More time spent than I anticipated… but I got there. Yay!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Structure of exported JSON file’ is closed to new replies.