Results 1 to 6 of 6

Thread: Using pyrenamer in linux

  1. #1
    Join Date
    Jul 2009
    Posts
    127

    Using pyrenamer in linux

    Hello,
    According to a source, I was advised to install pyrenamer to rename packages of photos done and the software suits my needs but I can access them from the file browser. I read the documentation enough to add a script in "nautilus-scripts', make it executable: I went in ownership / permission and I checked" allow executing the file. I expected to have the "mass renaming" via right click but I did not. My file is. "Odt" is what's embarrassing? I have done something wrong here? Thank you in advance for your answer.
    Last edited by Xmen; 11-01-2010 at 09:50 AM.

  2. #2
    Join Date
    Apr 2008
    Posts
    4,642

    Re: Using pyrenamer in linux

    Hello,
    To have access to pyrenamer Nautilus since it requires:
    1) in your home/.gnome2/nautilus-script (attention to point ahead gnome2: it is a hidden directory), you create a new text document that you call eg "mass renaming"
    2) with the text editor you open this document "mass renaming" and you paste this:
    Code:
    / bin / bash
    # Open pyrenamer with the currentDir of nautilus as workdir.
    # Do not need to select any file in the currentDir.
    # Nautilus "Rename mass" Script #
    if [ "$ 1" = ""] then
    WDIR = $ (NAUTILUS_SCRIPT_CURRENT_URI # file: / /)
    WDIR = $ (WDIR / /% 20 /)
    else
    filetype = $ (file "$ 1")
    $ filetype = filetype (# # *:)
    if [ "$ filetype" = "directory"] then
    WDIR = $ (NAUTILUS_SCRIPT_SELECTED_FILE_PATHS%% $ 1 *)
    WDIR = $ WDIR / $ 1
    else
    WDIR = $ (NAUTILUS_SCRIPT_SELECTED_FILE_PATHS%% $ 1 *)
    fi
    fi
    pyrenamer "$ WDIR"
    3) you save and then you change its properties to make it executable. If all went well, your little text file "mass renaming" (for example) should now appear with an icon in Nautilus executable. To use it, when you are on a picture right click and select "Scripts" and there you will have a new entry for "mass renaming" (the name of the script actually!) By selecting, pyrenamer opens.
    Note, however, if you select a single file it will be well accepted by pyrenamer ... by cons if you selected multiple files ... this is not true pyrenamer has selected the entire folder (well that's what happens in my case ... as it is written in the header of the script for that matter).

  3. #3
    Join Date
    Jul 2009
    Posts
    127

    Re: Using pyrenamer in linux

    Hi,
    It does not works. I still need your help. I had made the points 1 and 2 cited by 21ch181 and checked the script I had recovered in the documentation is the same as copied above. I think I did correctly point 3 via "ownership / permission" and I checked "allow executing the file" but the icon before the name of my file remains the same as for a file "odt" classical ( I do not know what the icon looks like an executable in Nautilus!) And when I'm on a photo and I right click I do not have the "scripts" and suddenly I have a terrible doubt! Is the browser the default with Ubuntu (9.04 and 9.10) is Nautilus because I never installed Nautilus.

  4. #4
    Join Date
    Apr 2008
    Posts
    4,642

    Re: Using pyrenamer in linux

    Hi,
    Have you made an extension to your file? Are you sure you do not have the name "quelquechose.odt" if you opened with OO and that you saved in text format from OO Writter possible. limier extension if present or replace it with sh: in the example I gave you would give this, Rename mass.sh. I am under Ubuntu 8.04 for Nautilus which is the default browser and is installed as a base for all versions of ubuntu so far, are you good with Ubuntu or Kubuntu? Do you have Gnome or KDE as desktop manager? What I've said is valid for gnome and nautilus: KDE and dolphin (I think) I do not know. Note: If you can not have a right click, pyrenamer is available in the Applications menu, accessories, If you are under ubuntu.

  5. #5
    Join Date
    Jul 2009
    Posts
    127

    Re: Using pyrenamer in linux

    Hello
    My file was actually. "Odt", I have put the extension. "Sh", hence, it is well recognized as an executable and have the "script" when I right click but if I select "rename mass" it nothing happens. While "pyrenamer" runs without concern for "Applications". My problem is not blocked because I have a workaround but I'd like to finish his resolution because it is the 1st time I created a script and would like to be more independent at future. Other information, I can not see the script (when it is. Sh) if I'm open, I get the message, gedit has not been able to detect the character encoding. Make sure you do not try to open a binary file. Select a character coding from the menu and try again. If I open it with OpenOffice.org, I have a blank page whereas if I put the extension. "odt", I found lines of code. In fact, I am under Ubuntu 9.10. You see any solutions for this?

  6. #6
    Join Date
    Apr 2008
    Posts
    4,642

    Re: Using pyrenamer in linux

    Hi,
    If all you did was change the extension odt sh. Normally, what happens to you your file. Indeed odt format is a "container" (an archive like a zip) that is not text. For that, redo your script as I had indicated in creating a file with gedit and everything works. Hope this works with you. Just give it a try and if you have any more problems regarding this topic then post back.

Similar Threads

  1. Best Friendly Linux Distribution For Biggest Linux System
    By Aniela in forum Operating Systems
    Replies: 3
    Last Post: 13-12-2010, 07:42 AM
  2. Replies: 5
    Last Post: 09-11-2010, 03:50 PM
  3. Replies: 5
    Last Post: 16-12-2009, 09:20 PM
  4. Replies: 2
    Last Post: 25-04-2008, 09:18 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,578,578.23054 seconds with 17 queries