How to write nautilus extensions with nautilus-python

How to write Nautilus extensions with nautilus-python

Nautilus, also known as “Files”, is the default file manager of the GNOME desktop environment. In a previous tutorial we saw how to create and call custom scripts from the Nautilus context-menu: this feature can be really useful but is somehow limited. By installing the nautilus-python package in our favorite Linux distribution, and writing just few lines of Python code, we can overcome such limitations and create proper Nautilus extensions.

Read more

Rename/Replace white space in files in entire directory recursively

Rename/Replace white space in files in entire directory recursively

The purpose of this tutorial is to show various methods on how to rename or replace white space in multiple files. Some tools on a Linux system may not work properly with files that contain white spaces, which would give some users motivation to replace the white space with underscores, for example. Manipulating files without white space is much easier, as you do not have to worry about escaping the file name each time.

Read more

How to extract a number from a string using Bash example

How to extract a number from a string using Bash example

The purpose of this tutorial is to show how to extract a number from a string using Bash – that is, either in a Bash script or from the Linux command line. It is common to use Bash as a utility to process strings or other textual data, so it is well equipped for the task of separating numbers out of a string. There are numerous ways to achieve this; see some of the examples below to get started.

Read more

article-main

How to manage git repositories with Python

Neither Python nor Git need presentations: the former is one of the most used general-purpose programming language; the latter is probably the most used version control system in the world, created by Linus Torvalds himself. Normally, we interact with git repositories using the git binary; when we need to work with them using Python, instead, we can use the GitPython library.

Read more

C++ : Understanding pointers

C++ : Understanding pointers

This tutorial is intended for all programing enthusiasts on all levels that wish to understand pointers in the C++ language. All code presented here is not compiler-specific, and all examples will be written in plain ANSI C++. Debates about pointers can stretch for miles, and you would need to go really far to master it all.

Read more