Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPython Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 11th, 2012, 12:26 PM
klein5366 klein5366 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2012
Location: east coast
Posts: 20 klein5366 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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

Reply With Quote
  #2  
Old November 11th, 2012, 07:27 PM
b49P23TIvg's Avatar
b49P23TIvg b49P23TIvg is offline
Contributing User
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Aug 2011
Posts: 3,387 b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Month 2 Weeks 3 Days 14 h 10 m 30 sec
Reputation Power: 383
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!

Reply With Quote
  #3  
Old November 11th, 2012, 08:42 PM
klein5366 klein5366 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2012
Location: east coast
Posts: 20 klein5366 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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

Reply With Quote
  #4  
Old November 12th, 2012, 05:30 AM
b49P23TIvg's Avatar
b49P23TIvg b49P23TIvg is offline
Contributing User
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Aug 2011
Posts: 3,387 b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Month 2 Weeks 3 Days 14 h 10 m 30 sec
Reputation Power: 383
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.

Reply With Quote
  #5  
Old November 12th, 2012, 08:34 AM
klein5366 klein5366 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2012
Location: east coast
Posts: 20 klein5366 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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.

Quote:
written in python

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.

Reply With Quote
  #6  
Old November 12th, 2012, 09:57 AM
klein5366 klein5366 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2012
Location: east coast
Posts: 20 klein5366 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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

Reply With Quote
  #7  
Old November 12th, 2012, 10:58 AM
b49P23TIvg's Avatar
b49P23TIvg b49P23TIvg is offline
Contributing User
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Aug 2011
Posts: 3,387 b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Month 2 Weeks 3 Days 14 h 10 m 30 sec
Reputation Power: 383
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.

Reply With Quote
  #8  
Old November 12th, 2012, 12:37 PM
klein5366 klein5366 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2012
Location: east coast
Posts: 20 klein5366 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > Modifying a opensource program help linux python

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap