Simple Machines Community Forum

Customizing SMF => Bridges and Integrations => Topic started by: bithon on April 19, 2019, 10:31:58 AM

Title: python-simplemachines
Post by: bithon on April 19, 2019, 10:31:58 AM
Hello!

I have a non public SMF and I had the need for some automated posts from 3rd party systems written in python.

So i wrote this small python module to send a new_topic to a simplemachines forum:
h**ps://github.com/bithon/python-simplemachinesforum

Best regards,
Bithon

PS. I am not allowed to post external links, i hope this way is ok?
Title: Re: python-simplemachines
Post by: vbgamer45 on April 19, 2019, 12:43:14 PM
Nice, links are allowed after you post a certain number of times done to cut down on link spammers.
Title: Re: python-simplemachines
Post by: bithon on April 19, 2019, 06:41:53 PM
thanks! :)

so i have to spam with posts before i can post my link :D (trying my best)
Title: Re: python-simplemachines
Post by: Aleksi "Lex" Kilpinen on April 20, 2019, 02:28:42 AM
No, not spam - but interact with other users on the forum, preferably by taking part in some meaningful discussions like support topics.
Title: Re: python-simplemachines
Post by: bithon on April 20, 2019, 05:15:06 AM
No, not spam - but interact with other users on the forum, preferably by taking part in some meaningful discussions like support topics.

Yes, it was a joke :)

I asked a mod to change the link in OP, it seems i am not able to change the post if its to old.
Title: Re: python-simplemachines
Post by: njtweb on April 20, 2019, 04:55:40 PM
What does this mean? Sounds like RSS auto-poster?
Title: Re: python-simplemachines
Post by: bithon on April 21, 2019, 01:21:34 PM
What does this mean? Sounds like RSS auto-poster?
It is a library / package / module that you can use if you are a python developer, then you can create a new topic on a remote SMF with this lines of code:
Code: [Select]
from simplemachinesforum.simplemachinesforum import SimpleMachinesForum

smf_url = "https://www.any-simplemachinesforum.com"
smf_user = "user_name"
smf_pass = "password"
smf = SimpleMachinesForum(smf_url, smf_user, smf_pass)

# 1 = board id:
smf.new_topic(1, "subject", "This is the message to post!")