#131 Control networking using Python and NetworkManager
Closed: scheduled 2 years ago by rlengland. Opened 2 years ago by rlengland.

Article Summary:
I’d like to propose an article about using Python and NetworkManager to control the network configuration.

Article Description:
The article will talk about libnm, the NetworkManager library, and how to use it via GObject introspection in Python.

It will then show some basic examples, as how to list devices, add an address, or connect to a Wi-Fi network programmatically.

https://discussion.fedoraproject.org/t/article-proposal-control-networking-using-python-and-networkmanager/40716


Metadata Update from @rlengland:
- Issue assigned to bengal
- Issue tagged with: article, needs-image

2 years ago

Hello, @bengal. Have you had an opportunity to start writing this article? We could use your contribution if you are still interested in writing it.

Hi @rlengland, I'm working on it in these days; I plan to have it ready in a couple of weeks. My current status is: https://people.redhat.com/bgalvani/nm-python-draft.html

Looks like you are making good progress. Thanks for the update.

You can get started editing in the Fedora WordPress Dashboard, when you are ready, by selecting + New at the top of the page.

When you have the article ready for review, please let us know by leaving a link to the WordPress preview in a comment on this issue. That will alert the editors and we will review and edit as necessary.

Thanks for your contribution

Comments on #137 are also the best way to contact us if you have questions of any kind.

Hi, I have finished writing the draft for the article.

The preview is available at https://fedoramagazine.org/?p=37063&preview=1&_ppp=9affe43962

Any review is appreciated. In particular I have some questions:

  • any suggestion for a better title?

  • is the article too long?

  • code blocks don't expand to the full width, is there a way to change that?

  • it would be nice to have syntax highlighting of the code blocks, does wordpress support it? I don't mean necessarily that it should be automatic, it would be enough that wordpress supported colors, and I could set them manually.

Thanks!

Metadata Update from @rlengland:
- Custom field preview-link adjusted to https://fedoramagazine.org/?p=37063&preview=1&_ppp=9affe43962

2 years ago

Hi @bengal

Your article looks pretty good. I have made a few languages tweaks but nothing major.

  • I believe the title is descriptive and is fine.
  • The length is good for the amount of data you present.
  • I don't know how, if there is a way, to control the width of the code (preformatted text). Sorry.
  • You can highlight the text by selecting the text and in the popup menu select the "downward arrow" or caret the the right of the link icon. The select "Highlight" and then the color for the selected text.

One improvement might be to collect links to the documentation at the end of the article for easier reference. Having them in the body of the article is good but for reference it is easier find them in one place.

If you have suggestions for a feature image to accompany the article, let us know.

Metadata Update from @rlengland:
- Custom field editor adjusted to rlengland
- Custom field image-editor adjusted to rlengland

2 years ago

Hi, thanks for the review.

I tried to use manual syntax highlighting via "Highlight" but when I assign a color to a text, it appears with a yellow background in the preview. I found out it's because the text is wrapped into a <mark> tag in the HTML. So, I edited the resulting HTML changing <mark> with <span> and the result looks acceptable. The disadvantage is that the block must be left as HTML in the edit page: if it's converted to "visual mode" then the changes are lost.

I changed only the first 3 code snippet, how do they look? BTW, it would be great to have a plugin for syntax highlighting installed in Wordpress.

The width of preformatted text looks correct now.

I also added a "References" section at the end with some useful links.

If you have suggestions for a feature image to accompany the article, let us know.

I don't.

The highlighting certainly looks good but it sounds like a bit of work to generate it. I leave it up to you whether you want to do the manual highlighting or not. Let me know your decision and when you believe the article is ready. We will publish when it's ready.

A syntax highlighting plugin would certainly be something we can consider but unless it is pretty simple to use it may be be a "hard sell" since many of the authors are not WordPress adepts and we aren't "staffed" to train everyone one on each capability that might be added.

The References section looks good.

I'll try to be creative and come up with a good image for your article.

2 years ago

Hi, I added the coloring to other code snippets, and I consider the article ready now.

The image looks good, thanks!

Metadata Update from @rlengland:
- Custom field publish adjusted to 2022-09-16
- Issue untagged with: needs-image

2 years ago

Looks good, @bengal
Scheduled for tomorrow, Friday 16 Sept

Issue status updated to: Closed (was: Open)
Issue close_status updated to: scheduled

2 years ago

Login to comment on this ticket.

Metadata