Skip to main content

mdfy plugin for esa.

Project description

mdfy-esa

pypi python release & publish workflow test status codecov

mdfy plugin for esa

Pre-requirement

You need set esa.io API token and set it to environment veriable ESA_ACCESS_TOKEN.

export ESA_ACCESS_TOKEN=YOUR_ACCESS_TOKEN

Usage

The mdfy-esa feature supports uploading of local images and files. With the EsaMdfier, images or files designated with MdImage or MdLink are uploaded automatically. Simply pass the MdImage with the local image path, and voila - it’s done!"

from mdfy import MdImage, MdLink, MdText
from mdfy_esa import EsaMdfier

esa_team = "your esa team name"
post_fullname = "post name as you like"
contents = [
    MdText("This is a test article."),
    MdImage(src="examples/test_image.png"),
    MdLink(url="examples/dummy.pdf"),
]

mdfier = EsaMdfier(post_fullname=post_fullname, esa_team=esa_team)
created_post_info = mdfier.write(contents=contents)

# created_post_info = {'number': 4418, 'name': 'My Test Article', 'full_name': 'note/me/My Test Article', 'wip': True, 'body_md': 'This is a test article.\n', 'body_html': '<p data- ...}
# see esa.io api document for detail
# https://docs.esa.io/posts/102#POST%20/v1/teams/:team_name/posts

You can also update an existing post using its post number!

from mdfy import MdImage, MdLink, MdText
from mdfy_esa import EsaMdfier

esa_team = "your esa team name"
post_number = 4930
contents = [
    MdText("NEW! This post is updated!"),
    MdText("This is a test article."),
    MdImage(src="examples/test_image.png"),
    MdLink(url="examples/dummy.pdf"),
]

mdfier = EsaMdfier(post_number=post_number, esa_team=esa_team)
updated_post_info = mdfier.write(contents=contents)

Features

  • TODO

Credits

This package was created with Cookiecutter and the waynerv/cookiecutter-pypackage project template.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mdfy_esa-0.4.0.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mdfy_esa-0.4.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file mdfy_esa-0.4.0.tar.gz.

File metadata

  • Download URL: mdfy_esa-0.4.0.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for mdfy_esa-0.4.0.tar.gz
Algorithm Hash digest
SHA256 bbba05b3f49cd1ea14d3dbf6f1965a8bfc5efcd50658c1435cb88473285f08fc
MD5 0bab89e389dec8bebdce2db5425c3060
BLAKE2b-256 0be928c90b5ebe57b41d5227937e67ebc59bf2731e677a4adc954a20b944e8a8

See more details on using hashes here.

File details

Details for the file mdfy_esa-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: mdfy_esa-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for mdfy_esa-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 73234cd4cc013ac4541f9e6068a78510453dac9b4d3a89d44ece457edbacab48
MD5 2f11738c9d26aa5fb3814747bf8ae5eb
BLAKE2b-256 7f75ea0b280ff6bfd71197b3e0dcdd00760b1679ff1208dcd65740c50dfd763b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page