Coder Social home page Coder Social logo

ronen25 / nautilus-copypath Goto Github PK

View Code? Open in Web Editor NEW
46.0 8.0 14.0 898 KB

A small Nautilus extension for quickly copying file/Samba paths

License: GNU General Public License v3.0

Python 100.00%
nautilus-extension python samba python3 gnome

nautilus-copypath's Introduction

Top Langs

nautilus-copypath's People

Contributors

elijahlynn avatar fynnfreyer avatar ronen25 avatar vredesbyyrd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nautilus-copypath's Issues

Add configuration via environment variables

Configuration variables I can think of ATM are:
NAUTILUS_COPYPATH_QUOTE_PATHS - 1 to put quotes around all copied paths; otherwise 0. Default is 0.
NAUTILUS_COPYPATH_WINPATH - 1 to display and extra option to convert Samba paths to Windows paths on-the-fly; otherwise 0. Default is 0.

NameError: global name 'items' is not defined

Thanks for the extension. Though I cant seem to get it working. This is the error I am seeing. Thoughts?

Thanks for your time.

Traceback (most recent call last):
  File "/home/clu/.local/share/nautilus-python/extensions/nautilus-copypath.py", line 49, in get_background_items
    return self.get_file_items(window, files)
  File "/home/clu/.local/share/nautilus-python/extensions/nautilus-copypath.py", line 44, in get_file_items
    items.append(item_copy_path)
NameError: global name 'items' is not defined

Python 3.7.0-4
Python-gobject 3.30.1-3
Python2-nautilus 1.2.2-2
Nautilus 3.30.0-1

Properly escape parenthesis

Not sure if this is fixable, but thought I should make the issue known. In order to 'cd' into a directory with parenthesis, they need to be escaped. This is how a path with () is currently copied:

/Music/Albums/Wolfmother/WOLFMOTHER\ Wolfmother\ (PBTHAL\ vinyl)

When it should be...

/Music/Albums/Wolfmother/WOLFMOTHER\ Wolfmother\ \(PBTHAL\ vinyl\)

In short, each parenthesis requires a backslash in front of it.

Thanks again for your work.

Support GTK4

When trying to run this in a recent distro with GTK4 installed, the extension fails with the following error:

Traceback (most recent call last):
  File "/home/fynn/.local/share/nautilus-python/extensions/nautilus-copypath.py", line 9, in <module>
    gi.require_version('Nautilus', '3.0')
  File "/usr/lib64/python3.11/site-packages/gi/__init__.py", line 117, in require_version
    raise ValueError('Namespace %s is already loaded with version %s' %
ValueError: Namespace Nautilus is already loaded with version 4.0

Tested this on Fedora 38.

Handling spaces in paths

Thua extension is a saving-life thing for the present version of Nautilus.
One drawback for me is that it escapes spaces in filenames / pathnames when I paste them
Would it be a way to avoid this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.