GithubHelp home page GithubHelp logo

mmlc-api's Introduction

MathMLCloud

MathMLCloud is an open-source tool to help content developers and technology developers deliver accessible math. It converts math expressions from AsciiMath or LaTex to accessible MathML, text descriptions, SVGs and PNGs.

For more background on the project, visit the Benetech site.

Getting Started

MathMLCloud API is a Sails app that runs in a Docker-defined environment.

Dependencies:

Installation

git clone https://github.com/openstax/mathmlcloud.git yourProjectName
cd yourProjectName

# Download the latest image on our github releases page, e.g. v6.0.0
curl -L -o mathmlcloud_api.tar.gz https://github.com/openstax/mathmlcloud/releases/download/v6.0.0/mathmlcloud_api.tar.gz

docker load --input mathmlcloud_api.tar.gz

# If your directory is not called mathmlcloud, you need to add a tag for the
# image
docker tag mathmlcloud_api yourProjectName_api

docker-compose up

# Test to make sure it works:
curl -X POST -d "math=a*b" -d "mathType=AsciiMath" -d "png=true" -d "description=true" http://localhost:1337/equation

This will start the containers that make up the app. The application container runs "sails lift" as its command.

The API should be running at http://localhost:1337.

Users

The app can be used to convert equations from anonymous users, but also supports creating registered users, and has administrative features available to users with an admin role.

Anonymous Users

Anyone can use the API to convert individual equations or upload HTML files of equations, but the results are only available at the time of the conversion. To be able to retrieve past conversions, you must be a registered user.

Registered Users

Anyone can register with the app by providing their username and a password, along with optional information about their organization and its role. The organization information is intended to be available for hosting sites to better understand the population they are serving with the app.

Registered users are able to retrieve past conversions that they have done.

Admin Users

Registered users who have been given the admin role are able to perform some other functions:

  • Retrieve a list of all equations converted
  • Retrieve a list of all feedback entered
  • Retrieve a list of all HTML files uploaded for conversion

Hosting

An instance of the application is hosted by Benetech in Microsoft Azure:

If you wish to run the application in your own environment, feel free to clone or fork this repository. The Vagrantfile in the project has a provider definition that allows you to provision an instance in Microsoft Azure, but you are free to host it wherever you like. Documentation on provisioning in other virtual machine environments, like Docker, Hyper-V or AWS, is available on the Vagrant site.

License

See the LICENSE.txt file for use information.

mmlc-api's People

Contributors

jbrugge avatar johnhbenetech avatar karenc avatar martinq avatar meghanmcowart avatar mohit-agarwal avatar nirupa-kumar avatar philschatz avatar reedstrm avatar saqibs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mmlc-api's Issues

Docker-Compose up Error

Instead of Docker i am installing boot2docker & Docker tools.

I am not able to proceed further .Anyone help me to overcome this one.
This error i got this..

C:\Users\priya.rk\AppData\Roaming\npm\node_modules\sails\A1>docker-compose up
Traceback (most recent call last):
File "docker-compose", line 3, in
File "compose\cli\main.py", line 64, in main
File "compose\cli\main.py", line 116, in perform_command
File "compose\cli\main.py", line 876, in up
File "compose\project.py", line 385, in up
File "compose\project.py", line 590, in warn_for_swarm_mode
File "site-packages\docker\api\daemon.py", line 73, in info
File "site-packages\docker\utils\decorators.py", line 47, in inner
File "site-packages\docker\api\client.py", line 183, in _get
File "site-packages\requests\sessions.py", line 488, in get
File "site-packages\requests\sessions.py", line 475, in request
File "site-packages\requests\sessions.py", line 596, in send
File "site-packages\requests\adapters.py", line 423, in send
File "site-packages\requests\packages\urllib3\connectionpool.py", line 595, in
urlopen
File "site-packages\requests\packages\urllib3\connectionpool.py", line 363, in
_make_request
File "httplib.py", line 1042, in request
File "httplib.py", line 1082, in _send_request
File "httplib.py", line 1038, in endheaders
File "httplib.py", line 882, in _send_output
File "httplib.py", line 844, in send
File "site-packages\docker\transport\npipeconn.py", line 31, in connect
File "site-packages\docker\transport\npipesocket.py", line 22, in wrapped
File "site-packages\docker\transport\npipesocket.py", line 50, in connect
pywintypes.error: (2, 'WaitNamedPipe', 'The system cannot find the file specifie
d.')
Failed to execute script docker-compose

twitter etc

I'm not sure this is the right place but it might be nice to provide metadata on equation 'landing' pages like https://mathmlcloud.org/#/equation/558bcc198dee8d7c38635a03 so that social media can pick them out as preview. E.g., by using twitter cards, a tweet could "attach" equations by just including the link -- and twitter will pick up the image in its preview.

CORS support

add CORS headers to allow the mathmlcloud.org API to be called from JavaScript on a webpage hosted on another site

provide system level info

provide a top level api (/extras, /config, something) that will provide a list of the formats provided by this instance of mathmlcloud.

Lack of results

Lastime I used mathcloud it worked beautifully, several months ago.

Now when I press the process button it frequently fails to produce results, even with simple equations, but sometimes it does.

Is there a backend server not worker?

I input in MathML to get SVG results I can use in ePub where many viewers still do not render MathML.

Sometimes telling it my input is ascii and then switching back to mathml works but that may have been coincidence.

Example of simplicity it sometimes chokes producing no output or errors but sometimes renders:

<math>
    <mi>L</mi>
    <mo>=</mo>
    <mfrac>
      <mi>c</mi>
      <mi>f</mi>
    </mfrac>
</math>

tag "canonical" format

The original source format should be tagged, so when fetching various formats from mathcloud, the user will know which is the "correct" canonical representation of the equation in question.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.