The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages
> Python Programming
|
Modifying a opensource program help linux python
Discuss Modifying a opensource program help linux python in the Python Programming forum on Dev Shed. Modifying a opensource program help linux python Python Programming forum discussing coding techniques, tips and tricks, and Zope related information. Python was designed from the ground up to be a completely object-oriented programming language.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

November 11th, 2012, 12:26 PM
|
|
Registered User
|
|
Join Date: Jun 2012
Location: east coast
Posts: 20
Time spent in forums: 8 h 28 m 21 sec
Reputation Power: 0
|
|
|
[solved] Modifying a opensource program help linux python
hi
i have found this really nice program for organising things, called keepnote written in python runs on win or Linux.
i would like to have one note book on a samba share and be able to work on it from different computers on my local net work, not all at the same time more for access, pdf's png's web pages url's
when everything is on a single computer you can have a folder with all your pdf files and make links to each one in your notebook in keepnote with a notation and description for the files same with png and text documents even with url's so if you say start to learn PIC18F4550 I/P you can create a folder and link to all your material you have collected on that subject in one place pdf files png files etc.
now trying to run keepnote noterbook from a samba share is easy as long as you have the share open or mounted, the problem is that keepnote isn't set up for dealing with a net work so it trys to open everything with firefox and then firefox tells you i don't know what to do with this.
what i would like to do is edit the right click menu so when you click on a link then right mouse click on it you can select send to terminal .
evince smb://192.168.1.35/p3compaq/pdf/2545s.pdf
gimp smb://192.168.1.35/p3compaq/pdf/384859674_o.jpg
eog smb://192.168.1.35/p3compaq/pdf/384859674_o.jpg
and if it is a url just double click on it and it will open in firefox
the guy that is building keepnote is going to collage and is involved in several different projects and right now is working on drag and drop i don't think networking is on his mind right now.
Last edited by klein5366 : November 12th, 2012 at 10:00 AM.
Reason: solved
|

November 11th, 2012, 07:27 PM
|
 |
Contributing User
|
|
|
|
Split file names based on
os.extsep .
Get a dictionary key from
filename.split(os.extsep)[-1]
Index into a dictionary of programs
{
'jpg': 'gimp',
'doc': 'libreoffice --writer',
'pdf': 'evince'
#blah blah blah
}
and fork these or use command lines that put them in the background,
Code:
os.system('nohup evince /autoMount/smb/lots-of-numbers/glork.pdf >&/dev/null &')
or use the subprocess module.
Hope this answer is related to your question!
__________________
[code] Code tags[/code] are essential for python code!
|

November 11th, 2012, 08:42 PM
|
|
Registered User
|
|
Join Date: Jun 2012
Location: east coast
Posts: 20
Time spent in forums: 8 h 28 m 21 sec
Reputation Power: 0
|
|
|
hi
what i don't understand it sends everything to firefox there is a place in the program that says file launcher: xdg-open but i'm thinking it isn't working yet
you can make links to files but it trys to open them with firefox if i could make the link in keepnote and right click it and send it to terminal that would solve my problem i'm just not that good at programming
|

November 12th, 2012, 05:30 AM
|
 |
Contributing User
|
|
|
|
|
Find the xdg-open documentation, read it, understand it, configure it to meet your needs. You're way ahead of me. I never before this heard of xdg-open or of keepnote or why your question is related to python.
|

November 12th, 2012, 08:34 AM
|
|
Registered User
|
|
Join Date: Jun 2012
Location: east coast
Posts: 20
Time spent in forums: 8 h 28 m 21 sec
Reputation Power: 0
|
|
b49P23TIvg
Quote: | i have found this really nice program for organising things, called keepnote written in python runs on win or Linux. |
xdg-open is the program that opens double clicked files in ubuntu and it works fine.
keepnote
the problem really lies in keepnote and being it isn't a completed work it should not be call a problem.
i just need some help modifying the code to add send to terminal to the right click menu in keepnote, so right clicking on a hyper link in keepnote select send to terminal sends that hyper link to terminal.
i think just modifying the code in the right click menu would be the least evasive change , to the program it's self.
|

November 12th, 2012, 09:57 AM
|
|
Registered User
|
|
Join Date: Jun 2012
Location: east coast
Posts: 20
Time spent in forums: 8 h 28 m 21 sec
Reputation Power: 0
|
|
|
[solved] Modifying a opensource program help linux python
b49P23TIvg
sometimes it just helps to talk to some one lol
all i had to do was move xdg-open to the command line for open web browser that way on linux it uses xdg for everything instead of firefox now the appropit link to a file will use xdg to open it :
png
pdf
jpg
url
i guess any file that is xdg-open file
Last edited by klein5366 : November 12th, 2012 at 09:59 AM.
Reason: solved
|

November 12th, 2012, 10:58 AM
|
 |
Contributing User
|
|
|
|
I installed keepnote and haven't yet figured out how to make a new notebook.
Before that I grabbed keepnote source and ended up filing this bug report.
I'm happy you found a solution and I'm removing keepnote from my computer.
|

November 12th, 2012, 12:37 PM
|
|
Registered User
|
|
Join Date: Jun 2012
Location: east coast
Posts: 20
Time spent in forums: 8 h 28 m 21 sec
Reputation Power: 0
|
|
|
open keepnote
topleft open file
in the drop down menu chose new notebook
give that notebook a name and place it any ware you wont and close or ok
that should give you a folder in the left column with the name you picked,
right clicking on that folder you can add more pages and name those pages if you create a folder or child page for dog and click on dog in the lower right box you can type anything you wont or add links to dog url or if you have a pdf file you can drag that file from where ever it is to that page in the lower right and it will create a link to that file. so insted of going and hunting for that file in a bunch of pdf file you just click there you can add links to pic's you have on your computer too as for me i have a lot of pdf files and png files
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|