Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the Python scripts for automating basic community management tasks

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly explains "what are the Python scripts for the automation of basic community management tasks". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn what are the Python scripts for basic community management task automation.

Tshirts.py

This simple tshirts.py script will tell you what the size distribution is based on the number of active T-shirts you want to customize. It distributes these sizes on a normal curve (also known as a "bell curve"), which, in my experience, is very consistent with the actual needs of a normal conference audience. If you use it in the United States, you may need to adjust the value in the script a little larger; if you use it in Europe, you may need to reduce the value in the script slightly. Your situation may be different.

Usage:

[rbowen@sasha:community-tools/scripts] $. / tshirts.py How many shirts? 300For a total of 300 shirts, order: 30.0 small72.0 medium96.0 large72.0 xl30.0 2xlfollowers.py

The followers.py script provides me with the number of followers of my Twitter account that I care about.

The script is only 14 lines and is not complicated, but it may save me ten minutes of loading web pages and finding numbers.

You need to edit the feed array to add the accounts you care about:

Feeds = ['centosproject',' centos']

Note: if you run it outside of English-speaking countries, it may not work because it is just a simple screen scraping script that reads HTML and looks for specific information it contains. Therefore, regular expressions may not match when the output is in another language.

Usage:

[rbowen@sasha:community-tools/scripts] $. / followers.py centosproject: 11479 Followerscentos: 18155 Followersget_meetups

Get_meetups script S another category of scripts-API scripts. This particular script uses the API of the meetup.com website to find parties on a specific topic in a specific area and time frame so that I can report it to my community. Many of the services you rely on provide API, so your script can find information without having to look up the web manually. Learning how to use these API is frustrating and time-consuming, but you will eventually acquire skills that can save a lot of time.

Disclaimer: meetup.com changed their API in August 2019, and I haven't updated this script to the new API yet, so it's not actually working right now. Please pay attention to the fixed version of this version in the next few weeks.

Centos-announcements.pl

Centos-announcements.pl scripts are much more complex and very special for my use case, but you might have a similar situation. In this example, the script looks at the mailing list archive (centos-announce mailing list), looks for messages with a specific format, and then generates reports on those messages. There are two different formats for reports: one for my monthly newsletter and the other for arranging Twitter messages (with the help of Hootsuite).

I use Hootsuite to arrange content for Twitter, and they have a convenient CSV (comma separated value) format, and you can schedule tweets for a whole week at a time. Automatically generating CSV formats from various data sources (such as mailing lists, blogs, other web pages) can save a lot of time. Note, however, that this may only be used for the first draft, and then you can check and edit it so that eventually you don't automatically post tweets that you don't want.

Reporting.pl

Reporting.pl scripts are also quite specific to meet my special needs, but the concept itself is generic. I send monthly emails to CentOS SIG (Special interest Group), which are scheduled to be reported in a given month. The script simply tells me which SIG I have this month and records the emails that need to be sent to them.

However, the email was not actually sent for two reasons. First, I want to edit the message before it is sent. Second, while e-mail scripts used to be effective, they are now likely to be filtered as spam.

Thank you for your reading, the above is the content of "what are the Python scripts for basic community management task automation". After the study of this article, I believe you have a deeper understanding of what the Python scripts for basic community management task automation have, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report