Skip to main content

Jupytercor

Jupytercor est un package python qui permet de convertir les cellules markdown d'un notebook jupyter avec pandoc.

Installation et utilisation

Pour installer jupytercor, vous devez avoir python3 et pandoc installés sur votre machine.

Vous pouvez ensuite installer jupytercor avec pip:

pip install --upgrade jupytercor

Pour utiliser jupytercor, vous devez exécuter le script jupytercor.py avec la commande suivante:

jupytercor input.ipynb [-o output.ipynb] [--clean] [--to FORMAT] [--images]

Où:

  • input.ipynb est le nom du fichier notebook d'entrée à convertir
  • -o output.ipynb est une option qui permet de spécifier le nom du fichier notebook de sortie (par défaut c'est output.ipynb)
  • --to FORMAT est une option pour préciser le format de sortie.
    • --to latex pour convertir en LaTeX.
    • --to pdfpour convertir en PDF.
  • --clean est une option qui permet d'effectuer les conversions avec pandoc (par défaut c'est False)
  • --images est une option qui permet de télécharger les images distantes dans un dossier images (par défaut c'est False)

Fonctionnalités et options

Jupytercor offre les fonctionnalités et options suivantes:

  • Il lit un fichier notebook au format ipynb et en extrait les cellules markdown
  • Il transforme chaque cellule markdown en html avec pandoc en utilisant l'option -f markdown -t html
  • Il transforme chaque cellule html en markdown avec pandoc en utilisant l'option -f html -t gfm-raw_html
  • Il remplace le contenu des cellules markdown par le texte transformé
  • Il écrit un nouveau fichier notebook au format ipynb avec les cellules converties
  • Il permet à l'utilisateur de choisir le nom du fichier notebook d'entrée et celui du fichier notebook de sortie
  • Il permet à l'utilisateur d'activer ou non les conversions avec pandoc grâce au drapeau --clean
  • Il permet à l'utilisateur de télécharger les images distantes avec une url grâce au drapeau --images

Licence et crédits

Jupytercor est distribué sous la licence MIT.

Jupytercor utilise nbformat pour lire et écrire des fichiers notebooks.

Jupytercor utilise subprocess pour exécuter des commandes pandoc.

Jupytercor utilise argparse pour analyser les arguments passés au script.

Jupytercor s'inspire du code trouvé sur cette page web: https://beautiful-soup-4.readthedocs.io/en/latest/#searching-the-tree

Metadata

Release files for jupytercor 0.2.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jupytercor 0.2.6
File Size Uploaded Provenance
jupytercor-0.2.6.tar.gz 20.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for jupytercor 0.2.6
File Interpreter ABI Platform
jupytercor-0.2.6-py3-none-any.whl Python 3 none any Details

Total release size: 44.6 kB

Release files / jupytercor-0.2.6.tar.gz

Download URL jupytercor-0.2.6.tar.gz
Size 20.6 kB
Tags Source
SHA-256 checksum
How to use checksums
afbde546abf6eaa3a12d57aff2b5855ccea2febe7f7f35d68e5e5f855f26c118
BLAKE2b-256 checksum
How to use checksums
d84ee80006d99ff0fead2213fc1d1f129741fcb1ffef297dbe0cb41611405118
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.9 Darwin/24.3.0

Release files / jupytercor-0.2.6-py3-none-any.whl

Download URL jupytercor-0.2.6-py3-none-any.whl
Size 23.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4dc55c61f9ac2fffb5ee0056d61cdb17d6a26785e6ff707909884de5a03f8a94
BLAKE2b-256 checksum
How to use checksums
af665f87e9b425757e5f2438edd39a2aedc1d84388129d6b71ecd00692855cd2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.9 Darwin/24.3.0

Security for jupytercor 0.2.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page