Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert markdown content in LinkedIn #69

Closed
wants to merge 6 commits into from

Conversation

arash77
Copy link
Collaborator

@arash77 arash77 commented Jul 12, 2024

Same as #58

if len(images) > 20:
warnings = f"A maximum of 20 images, not {len(images)}, can be included in a single linkedin post."
images = images[:20]
else:
warnings = ""

# convert markdown formatting because Mastodon doesn't support it
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be a shared function in both classes?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I create a function in galaxy_social.py to be used by plugins?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about the new commit?

@wm75
Copy link
Member

wm75 commented Jul 12, 2024

I guess it's time for a client base class that ships as a default plugin and defines the method?

@wm75
Copy link
Member

wm75 commented Jul 12, 2024

That class could also raise NotImplemented for format_content and create_post, i.e. enforce that derived client classes define these methods.

@arash77
Copy link
Collaborator Author

arash77 commented Jul 15, 2024

So should I just revert the change to have a simple code for the conversion of LinkedIn content and work on the client base class later?

@wm75
Copy link
Member

wm75 commented Jul 15, 2024

Sounds good from my side, yes.

@arash77
Copy link
Collaborator Author

arash77 commented Jul 16, 2024

Ready for review @wm75

@wm75
Copy link
Member

wm75 commented Jul 16, 2024

Had an idea for a simpler implementation, but you've worked out everything that's required @arash77 !

@arash77 arash77 closed this Jul 19, 2024
@arash77 arash77 deleted the arash-linkedin-ignore-markdown branch September 5, 2024 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants