1. 21 Mar, 2019 4 commits
    • Michael Droettboom's avatar
      Merge pull request #355 from msabramo/run_docker-configurable · f1b2d3bf
      Michael Droettboom authored
      Allow configuring run_docker ports using env vars
      f1b2d3bf
    • Michael Droettboom's avatar
      Merge pull request #354 from msabramo/html5lib · b3d48aa5
      Michael Droettboom authored
      Add html5lib
      b3d48aa5
    • Marc Abramowitz's avatar
      Allow configuring run_docker ports using env vars · 30b69116
      Marc Abramowitz authored
      This allows changing various `run_docker` settings using env vars. The
      primary one that I wanted was the ability to easily set the system port
      used so that I could run two pyodide containers.
      
      Before when running a second instance of `./run_docker`:
      
      ```
      $ ./run_docker
      docker: Error response from daemon: driver failed programming external connectivity on endpoint quirky_banach (45f5dd12606ac5d732a311ef3f3c378e359bbbd406a1c65915a300ec413eaf25): Bind for 0.0.0.0:8000 failed: port is already allocated.
      ```
      
      With this PR:
      
      ```
      $ PYODIDE_SYSTEM_PORT=8001 ./run_docker
      root@29308e720856:/src#
      ```
      
      I also broke the `docker run` command on to multiple lines (which I find
      more readable; hopefully others agree) and added an `exec` to the
      command, so the shell process on the host doesn't have to hang around
      waiting for the container to exit.
      30b69116
    • Marc Abramowitz's avatar
      Add html5lib · 9402c8bd
      Marc Abramowitz authored
      9402c8bd
  2. 19 Mar, 2019 2 commits
  3. 18 Mar, 2019 3 commits
  4. 15 Mar, 2019 6 commits
    • Marc Abramowitz's avatar
      Add beautifulsoup4 (w/ soupsieve) · c4e1a414
      Marc Abramowitz authored
      Example:
      
      If you do:
      
      ```js
      languagePluginLoader.then(() => {
        // pyodide is now ready to use...
        pyodide.loadPackage('beautifulsoup4').then(() => {
          pyodide.runPython(`
      text = """
      <div>
        <!-- These are animals -->
        <p class="a">Cat</p>
        <p class="b">Dog</p>
        <p class="c">Mouse</p>
      </div>
      """
      
      from bs4 import BeautifulSoup
      import soupsieve
      soup = BeautifulSoup(text, 'html.parser')
      
      print(soup.select('p:is(.a, .c)'))
          `);
        });
      });
      ```
      
      then the output is:
      
      ```
      [<p class="a">Cat</p>, <p class="c">Mouse</p>]
      ```
      c4e1a414
    • Marc Abramowitz's avatar
      Add pygments package · ea09d500
      Marc Abramowitz authored
      ea09d500
    • Michael Droettboom's avatar
      Merge pull request #340 from msabramo/bleach · 0a92640d
      Michael Droettboom authored
      Add bleach
      0a92640d
    • Marc Abramowitz's avatar
      Add docutils · d14eee11
      Marc Abramowitz authored
      Example: If you do this:
      
      ```js
      languagePluginLoader.then(() => {
        // pyodide is now ready to use...
        pyodide.loadPackage('docutils').then(() => {
          pyodide.runPython(`
      import docutils.core
      
      print(docutils.core.publish_string("\`Python <http://www.python.org/>\`_ is **cool**!", writer_name='html5', settings_overrides={'embed_stylesheet': False}).decode('utf-8'))
          `);
        });
      });
      ```
      
      then the output is:
      
      ```
      <!DOCTYPE html>
      <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
      <head>
      <meta charset="utf-8"/>
      <meta name="generator" content="Docutils 0.14: http://docutils.sourceforge.net/" />
      <title>&lt;string&gt;</title>
      <link rel="stylesheet" href="/lib/python3.7/site-packages/docutils/writers/html5_polyglot/minimal.css" type="text/css" />
      <link rel="stylesheet" href="/lib/python3.7/site-packages/docutils/writers/html5_polyglot/plain.css" type="text/css" />
      </head>
      <body>
      <div class="document">
      <p><a class="reference external" href="http://www.python.org/">Python</a> is <strong>cool</strong>!</p>
      </div>
      </body>
      </html>
      ```
      d14eee11
    • Michael Droettboom's avatar
      Bump version: 0.8.2 → 0.9.0 · 89eca5f5
      Michael Droettboom authored
      89eca5f5
    • Marc Abramowitz's avatar
      Add bleach · e92ba1c9
      Marc Abramowitz authored
      for sanitizing HTML. Example:
      
      ```js
      languagePluginLoader.then(() => {
        // pyodide is now ready to use...
        pyodide.loadPackage('bleach').then(() => {
          pyodide.runPython(`
      import bleach
      
      print(bleach.clean('There is good stuff <script>and bad stuff</script> in here.'))
          `);
        });
      });
      ```
      
      leads to the output:
      
      ```
      There is good stuff &lt;script&gt;and bad stuff&lt;/script&gt; in here.
      ```
      e92ba1c9
  5. 14 Mar, 2019 3 commits
  6. 13 Mar, 2019 4 commits
  7. 12 Mar, 2019 3 commits
  8. 01 Mar, 2019 1 commit
  9. 28 Feb, 2019 4 commits
  10. 25 Feb, 2019 2 commits
  11. 22 Feb, 2019 2 commits
  12. 21 Feb, 2019 6 commits