Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
#21513: package rst-to-ipynb
Browse files Browse the repository at this point in the history
  • Loading branch information
Thierry Monteil committed Sep 29, 2016
1 parent e1ea92b commit 45e561a
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 0 deletions.
35 changes: 35 additions & 0 deletions build/pkgs/rst_to_ipynb/SPKG.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
= rst_to_ipynb =

== Description ==

This project converts between a standalone reStructuredText file and a
Jupyter Notebook file.

This is currently achieved by converting to markdown with pandoc and then
to Jupyter notebook using notedown, plus some configuration and tweaks.

We use a fork that is adapted for Sage.

== License ==

BSD 3-Clause License

== Upstream Contact ==

Authors: Scott Sievert
Home page: https://github.com/stsievert/rst-to-ipynb
Home page of the fork used: https://github.com/nthiery/rst-to-ipynb

== Dependencies ==

* notedown
* pandoc

== Special Update/Build Instructions ==

There are no release numbers, hence find the latest commit, download
https://github.com/nthiery/rst-to-ipynb/archive/${COMMIT}.zip and rename
it rst_to_ipynb-${COMMIT:0:8}.zip

As it is written in Haskell, pandoc must be installed from the distro.

4 changes: 4 additions & 0 deletions build/pkgs/rst_to_ipynb/checksums.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
tarball=rst_to_ipynb-VERSION.zip
sha1=3dc56818cb752d263aa87cb5dbd6565a930dcc73
md5=c9798ae87c4869e515bafb112a73922a
cksum=74019349
5 changes: 5 additions & 0 deletions build/pkgs/rst_to_ipynb/dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
notedown

----------
All lines of this file are ignored except the first.
It is copied by SAGE_ROOT/build/make/install into SAGE_ROOT/build/make/Makefile.
1 change: 1 addition & 0 deletions build/pkgs/rst_to_ipynb/package-version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fd58cd03
17 changes: 17 additions & 0 deletions build/pkgs/rst_to_ipynb/spkg-install
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

if [ -z "${SAGE_LOCAL}" ]; then
echo >&2 "SAGE_LOCAL undefined ... exiting"
echo >&2 "Maybe run 'sage --sh'?"
exit 1
fi

TARGET="${SAGE_LOCAL}/lib/rst_to_ipynb"
if [ ! -d "${TARGET}" ]; then
mkdir "${TARGET}"
fi

cp 'src/convert.py' "${TARGET}/"
cp 'src/sageblockfilter.py' "${TARGET}/"
chmod u+x "${TARGET}/sageblockfilter.py"

1 change: 1 addition & 0 deletions build/pkgs/rst_to_ipynb/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
optional

0 comments on commit 45e561a

Please sign in to comment.