Giter Site home page Giter Site logo

serlo-bot's Introduction

serlo-bot's People

Contributors

kulla avatar hugotiburtino avatar kellyshor avatar moehome avatar eliflores avatar

Stargazers

Mikey Stengel avatar

Watchers

Botho avatar  avatar hackerman avatar Valentin Roland avatar Richard Mörbitz avatar Wayne avatar  avatar

serlo-bot's Issues

Convert assets.serlo.org injections

Converts injections to assets.serlo.org to image plugins, like:

{
  plugin: {
    plugin: 'injection',
    state: 'https://assets.serlo.org/legacy/54554bb009de8_a6939af75e1532d9027d2bc2e7a8d6721f73beeb.jpg'
  }
}

Canonicalize links

Each link to an UUID should have the form /<uuid> like /1815. Links like /ref/<uuid> or /mathe/id/hhh should be changed to the canonical form.

Remove "related content" from backend

I had a talk to @yolo-bird: In the current P Convo for converting the content to edtr-io the related content is still needed since the semantic article plugin will hold an area at the end where further content might be linked. The current related content is a good indication which entities might be linked there.

However, afterwards the related content can be removed from the legacy system.

Some entity revisions have content without field 'caption'

Reported by Anne

What's wrong?

Some 'empty' revisions happen, i.e. unrevised revisions that do not actually have any change for the end user.

Steps to reproduce:

  1. Choose an exercise part with solutions.
  2. Edit only the solution, not the exercise. Save.
  3. In the unrevised changes you are going to see two new entries, the one for the exercise, the other for the solution. It was expected to see only the one for the solution.
  4. Click to see changes of the exercise. Both will be almost same, the newest one may have a minor layout difference.

Reason

Some entity revisions have content without field 'caption'. After comparing the last and the newest revision we se some difference like the following in the content field:

"{\"plugin\":\"exercise\",\"state\":{\"content\":{\"plugin\":\"rows\",\"state\":[{\"plugin\":\"rows\",\"state\":[{\"plugin\":\"text\",\"state\":[{\"type\":\"p\",\"children\":[{\"type\":\"math\",\"src\":\"\\\\gamma = 90^\\\\circ\",\"inline\":false,\"children\":[{\"text\":\"\\\\gamma = 90^\\\\circ\"}]},{\"type\":\"math\",\"src\":\"a=12{,}7\\\\,\\\\mathrm{cm}\",\"inline\":false,\"children\":[{\"text\":\"a=12{,}7\\\\,\\\\mathrm{cm}\"}]},{\"type\":\"math\",\"src\":\"c= 24{,}9\\\\,\\\\mathrm{cm}\",\"inline\":false,\"children\":[{\"text\":\"c= 24{,}9\\\\,\\\\mathrm{cm}\"}]}]}]},{\"plugin\":\"image\",\"state\":{\"src\":\"https://assets.serlo.org/legacy/5735b83f60173_4ead02dfd1a6f94e22fd9953d367fe7d7f0d15c4.png\",\"alt\":\"\"}}]}]}}}"

"{\"plugin\":\"exercise\",\"state\":{\"content\":{\"plugin\":\"rows\",\"state\":[{\"plugin\":\"rows\",\"state\":[{\"plugin\":\"text\",\"state\":[{\"type\":\"p\",\"children\":[{\"type\":\"math\",\"src\":\"\\\\gamma = 90^\\\\circ\",\"inline\":false,\"children\":[{\"text\":\"\\\\gamma = 90^\\\\circ\"}]},{\"type\":\"math\",\"src\":\"a=12{,}7\\\\,\\\\mathrm{cm}\",\"inline\":false,\"children\":[{\"text\":\"a=12{,}7\\\\,\\\\mathrm{cm}\"}]},{\"type\":\"math\",\"src\":\"c= 24{,}9\\\\,\\\\mathrm{cm}\",\"inline\":false,\"children\":[{\"text\":\"c= 24{,}9\\\\,\\\\mathrm{cm}\"}]}]}]},{\"plugin\":\"image\",\"state\":{\"src\":\"https://assets.serlo.org/legacy/5735b83f60173_4ead02dfd1a6f94e22fd9953d367fe7d7f0d15c4.png\",\"alt\":\"\",\"caption\":{\"plugin\":\"text\",\"state\":[{\"type\":\"p\",\"children\":[{}]}]}}}]}]}}}"

References
serlo/serlo.org-legacy#720
serlo/serlo.org-legacy#721

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.