Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Thursday, February 6, 2014

Collection of Make Tutorials

Only 1 link so far.

Tuesday, March 20, 2012

Extracting Pages from PDF

First, install PDFTK on Linux.

Then, do this command:

pdftk foo.pdf cat 2-3 output abstract.pdf dont_ask

Where foo.pdf is the original PDF file, 2-3 is the range of pages (you can type 2-end to extract to EOF), and abstract.pdf is the output PDF file.

Wednesday, January 26, 2011

Minimal RAR in Ubuntu

RAR is a common file format used for files distributed through the Net. Here's how to install it in Ubuntu.

$ sudo apt-get install rar

Creating an archive:

$ rar a archivename.rar files...

Add as many files & directories as you want.

Creating an archive with password:

$ rar a -ppassword archivename.rar files...

There is no space between -p and the password itself.

To extract, click on the right-mouse-button and use Archive Manager to extract.

Of course, for more advanced uses, refer to the RAR in Ubuntu Manual.

Wednesday, October 20, 2010

Clean Up MP3 Filenames

import os

base = '/home/maczulu/Music'
os.chdir(base)
filelist = os.listdir(base)
for file in filelist:
  if '_' in file:
    newname = file.replace('_',' ')
    print file,newname
    os.rename(file, newname)

GNOME of course!

Thursday, January 7, 2010

How to install pyqt4 on ubuntu linux

Install and run "hello world" example
  • Install it
$ sudo apt-get install python-qt4
  • Create a file ~/tmp/helloworld.py
import sys
from PyQt4.QtGui import *
app = QApplication(sys.argv)
button = QPushButton("Hello World", None)
button.show()
app.exec_()

  • Run it:
$ python ~/tmp/helloworld.py



  • You should see a window with a single button pop up.








  • Install additional examples
    • For more examples, install the python-qt4-doc package: 

    $ sudo apt-get install python-qt4-doc

    • After installation, the examples are located at: 
    /usr/share/doc/python-qt4-doc/examples