Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature pipe stdout from execution cell #13

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

mdtrooper
Copy link

I change a lot of code to add the pipe feature.

This example shows the new feature (and argument -i or --pipe):

{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import iplantuml"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "TEMPLATE = \"\"\"\n",
    "@startuml\n",
    "\"{person1}\" -> \"{person2}\": \"{send}\"\n",
    "\"{person1}\" <- \"{person2}\": \"{receive}\"\n",
    "@enduml\n",
    "\"\"\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "%%plantuml --pipe\n",
    "\n",
    "print(TEMPLATE.format(person1='Me', person2='Trump',\n",
    "                     send='Give me a 1 billion dolars.',\n",
    "                     receive='I send you 10 billions dolars.'))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}

@mdtrooper
Copy link
Author

The last ❌ in Travis is for it cannot download 3.3 python.

Added a example:
Untitled.ipynb.txt

Untitled.html.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants