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 Distribution

formatpilot-0.2.0.tar.gz (7.4 kB view details)

Uploaded Source

File details

Details for the file formatpilot-0.2.0.tar.gz.

File metadata

  • Download URL: formatpilot-0.2.0.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for formatpilot-0.2.0.tar.gz
Algorithm Hash digest
SHA256 8871c7e029027e9bd2bebf2b936cd8419fde3a3233098e760b562f44266c6f6b
MD5 4764007dd9de783a881ffa83fed6cffb
BLAKE2b-256 d1ce0485e30bb8a8ec3b2812b0b9c9667d1386daa5c0c12de933f28d7c2df2e7

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