Skip to main content

Conversão e transformação de textos entre múltiplos formatos (Markdown, LinkedIn, HTML, etc) de forma simples e extensível. Com amor da família Mori!

Project description

formatpilot

PyPI version Python versions License: MIT Build Status Downloads

Conversion and transformation of texts between multiple formats (Markdown, LinkedIn, HTML, etc) in a simple and extensible way. With love from the Mori family!


✨ Overview

formatpilot is a Python package for converting and transforming texts between various formats, such as Markdown, HTML, and LinkedIn-optimized formats. Ideal for developers, content creators, and automations.

  • Convert Markdown to LinkedIn
  • Convert Markdown to HTML
  • Convert HTML to Markdown
  • Automatic conversion of links and emojis
  • Convert Markdown tables to formatted text
  • LinkedIn character limit warning
  • Easily extensible for new formats
  • Simple and intuitive API

🚀 Installation

pip install formatpilot

🛠️ Usage Examples

Markdown to LinkedIn

from formatpilot import markdown_to_linkedin, FormatPilot

markdown = """
**Bold text** and *italic*
- Item 1
- Item 2
See more at [GitHub](https://github.com)
:rocket:
"""

linkedin_text = markdown_to_linkedin(markdown)
print(linkedin_text)

# Or using the main class
fp = FormatPilot()
print(fp.convert_markdown_to_linkedin(markdown))

Markdown Table Conversion

from formatpilot import FormatPilot
markdown = """
| Name   | Age |
|--------|-----|
| Ana    | 30  |
| Bruno  | 25  |
"""
print(FormatPilot().convert_markdown_to_linkedin(markdown))
# Output:
# Name | Age
# Ana | 30
# Bruno | 25

LinkedIn Character Limit Warning

from formatpilot import FormatPilot
long_text = "A" * 3100
print(FormatPilot().convert_markdown_to_linkedin(long_text))
# Output includes limit warning

Markdown Emojis to Unicode

from formatpilot import FormatPilot
markdown = "Congratulations on the project! :tada:"
print(FormatPilot().convert_markdown_to_linkedin(markdown))
# Output: Congratulations on the project! 🎉

📚 Features

  • markdown_to_linkedin(markdown_text: str) -> str: Converts Markdown to LinkedIn format.
  • FormatPilot class: Methods for converting between Markdown, HTML, and LinkedIn.

🧩 Extensibility

You can create your own converters or extend the existing classes to support new text formats.

🧪 Testing

pytest tests/

🤝 Contributing

Contributions are welcome! Feel free to open issues or pull requests.

  1. Fork this repository
  2. Create your branch (git checkout -b feature/new-feature)
  3. Commit your changes (git commit -am 'Add new feature')
  4. Push to the branch (git push origin feature/new-feature)
  5. Open a Pull Request

📄 License

MIT © Rafael Mori

💌 Contact


Made with love by the Mori family! ❤️

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

formatpilot-0.1.0-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file formatpilot-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: formatpilot-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for formatpilot-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a0cd238c5451f9de018c2b67614802b97f0ea72bcefa0b4bc48dfb0b689fece1
MD5 1f36b8acbcd3bd3b87577e693eea8725
BLAKE2b-256 bdb76b9b28a90ef010b2186b8874d8f48df551f407bb30f55efd4828f54ffc24

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