Skip to content

Dataset Editing for Curriculum Development

Flynn Duniho edited this page May 30, 2024 · 1 revision

Congratulations, you're creating dataset for use in the classroom! But how do you do it? These instructions will give you a starting place.

Each app is its own self-contained world, with its own datasets to initialize from and its own meme.loki database.

CURRENT REQUIREMENTS

  • You must have the MEME development environment installed
  • Use Visual Studio Code (VSC)
  • If you want to run the pacakged Electron app on another computer, you will have to get an Apple Developer ID and set up code signing. (But you can still use the Electron app if you disable the security feature.)

I recommend using Visual Studio Code and its built-in terminal.

  • Run Visual Studio Code
  • FILE->OPEN WORKSPACE meme-boilerplate.code-workspace in the repo
  • type CTRL ~ (tilde) to open the terminal, which will have a working path in the root level of the repo

Prepare Electron Distribution Files

Here's what you need to do to prepare the combined package of the Electron app and project data for sharing to other sites.

Overview

  1. Decide on a template
  2. Prepare resources
  3. Customize starting project
  4. Package and Sign
  5. Fix Quarantine Flag
  6. Test Other Computers
  7. Zip, Copy, and Distribute

1. Decide on a Template

Generally you would start with the __blank template. If you want to use another template, see II. Prepare Default Template for more information.

2. Customize Starting Project

Do an initial compile to build the meme.loki file to review the starting setup.

npm run electron
http://localhost/#/admin

Add any classrooms, teachers, student groups, and students you want to share across all copies.
Add any ratings definitions, criteria for a good model, sentence starters, and resource definitions.

If you want to add a starting demo project, login and create a model.

3. Prepare Resources

If you start with the _blank template, any resources already defined in /<repodir>/templates/_blank/resources/*.* will be copied over.

If you want to add additional resources add them to /<repodir>/dist/MEME macOS/resources/*.*.

Edit the resource definitions in admin interface.

4. Create the Distribution Package

npm run electron   # build the `meme.loki` file from `*.db.js` files and run Electron locally (if you haven't already run this)
npm run package    # build the the distribution files for `meme.app` Electron app

This will populate the <repodir>/dist/MEME macOS/ folder with the electron app, database files, and resources.

5. Code Sign

Code sign the app so that you can start the app without having to disable security.

npm run appsign    # code sign the `meme.app`
npm run app        # or double click on `meme.app`

Run the app to make sure it looks right.

6. Fix Quarantine Flag (macOS)

In addition to codesigning, if you want to copy the Electron app to another machine, you need to run a install.sh script.

  1. Build the electron app (npm run package) and copy the /dist/MEME macOS folder to your new computer/new location, e.g. to ~/Desktop/MEME macOS.
  2. Open a terminal.
  3. cd ~/Desktop/MEME macOS
  4. ./install.sh
  5. The quarantine flag should now be fixed.
  6. Double click the meme.app Electron application to start the server to make sure it works.
  7. If you see javascript error, then the quarantine flag was probably not removed successfully. Try typing xattr meme.app -- you should NOT see the line com.apple.quarantine If you copy the app to another computer you may have to run ./install.sh again.

7. Test Other Computers

Make sure everything works. Make sure you test:

  • Intel Macs
  • Apple Silicon Macs (M1, M2)
  • Older macOS versions that you might be running on

7. Zip, Copy, and Distribute

Once everything is set you can zip the <repodir>/dist/MEME macOS/ folder and copy the zip file to another computer.

Unzip it to run it.

Technical Reference

See Dataset Management

Clone this wiki locally