Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 22 Dec 2014, 01:12
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
MIME-Editor Alpha
Moderators: deshlab, Flash, GuestToo, Ian, JohnMurga, Lobster
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
MU


Joined: 24 Aug 2005
Posts: 13644
Location: Karlsruhe, Germany

PostPosted: Sat 09 Feb 2008, 11:36    Post_subject:  MIME-Editor Alpha  

The MIME-Editor will try to make Puppy compatible with all those external filemanagers, that support the freedesktop.org specifications.
For Rox-Filer, please create a new thread.
It works completely different.

This thread shall deal only deal with MIME-Types following the freedesktop.org specifications to avoid confusion.

The editor analyzes and modifies .desktop files in
/usr/share/applications
and
~/.local/share/applications

And in their subfolders.

The .desktop-files contain information, about what program shall be used to open a specific "MIME-Type".

Imagine like in Windows:
you click on "test.doc", and Word opens it.

But MIME-Types are more complex.
In Linux, a file is not recognized (directly) by the extension (.doc), but by a set of rules.
This allows to associate it with more than one program.

If you use the filemanager PCManFM, you can right-click a .doc, then it offers to open it with OpenOffice, Kword, Abiword or others.
You can get PCManFM here:
http://murga-linux.com/puppy/viewtopic.php?t=25699


This flexibility makes it also difficult, to handle these associations.
My program tries to make it a bit easier by a grafical interface.

NOTE: this actually does NOT affect Rox-filer, Puppys default filemanager.
It has an own system to manage Mime-types.
I included a converter, that reads Puppys Rox-MIME-Types and converts them to the way of using Desktop-files.

So you can manage everything for programs that use this way of organizing file-assosiations.

NOTE2:
I'm no expert in this.
Maybe my program does things wrong, not following recommended specifications.
I will learn and try to enhance it in that direction, but for this release PLEASE BACKUP YOUR pup_save.2fs FIRST!

Download:
see attachment at bottom of this message.
Requires GtkBasic:
http://dotpups.de/puppy3/dotpups/Programming/GtkBasic003/Gtkbasic-003.pup
Mirror:
http://puppyfiles.ca/dotpupsde/puppy3/dotpups/Programming/GtkBasic003/Gtkbasic-003.pup

Screenshot:



Full size:
http://noforum.de/pics/MIME-Editor.jpg

Mark
MIME-Editor.pup
Description 
pup

 Download 
Filename  MIME-Editor.pup 
Filesize  25.22 KB 
Downloaded  738 Time(s) 

_________________
my recommended links

Edited_times_total
Back to top
View user's profile Send_private_message Visit_website 
MU


Joined: 24 Aug 2005
Posts: 13644
Location: Karlsruhe, Germany

PostPosted: Sat 09 Feb 2008, 22:00    Post_subject:  

Made some speed-improvements and slightly re-arranged the layout.
You can install the new over the old dotpup.
Attached in first message.
Mark

_________________
my recommended links
Back to top
View user's profile Send_private_message Visit_website 
Dingo


Joined: 11 Dec 2007
Posts: 1425
Location: somewhere at the end of rainbow...

PostPosted: Sun 10 Feb 2008, 14:06    Post_subject:  

two newbie questions (excuse me)

fist= I need Pcmanfm or not to use this mime editor?
second= with this editor, assuming i want create a new extensions for files containing using how-to (i wolud create a .use extension), can I do this?)

_________________
replace .co.cc with .info to get access to stuff I posted in forum
dropbox 2GB free
OpenOffice for Puppy Linux
Back to top
View user's profile Send_private_message Visit_website 
ttuuxxx


Joined: 05 May 2007
Posts: 10847
Location: Ontario Canada,Sydney Australia

PostPosted: Sun 10 Feb 2008, 14:31    Post_subject:  

Hey Mu

I figured why not give it a shot on puppy 2.17 since i'm running it live anyways, couldn't hurt.Smile
this is what i got
# MIME-Editor
/usr/local/MIME-Editor/MIME-Editor: line 15: export: `/tmp/en-MIME-Editor.mo': not a valid identifier
/usr/local/MIME-Editor/MIME-Editor: ./MIME-Editor.gtb: /usr/bin/gtkbasic003: bad interpreter: No such file or directory
so it didn't work,
well thanks anyways
ttuuxxx

_________________
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games Smile
Back to top
View user's profile Send_private_message Visit_website 
MU


Joined: 24 Aug 2005
Posts: 13644
Location: Karlsruhe, Germany

PostPosted: Mon 11 Feb 2008, 02:50    Post_subject:  

ttuuxxx wrote:

# MIME-Editor
/usr/local/MIME-Editor/MIME-Editor: line 15: export: `/tmp/en-MIME-Editor.mo': not a valid identifier


That can be ignored.


ttuuxxx wrote:

/usr/local/MIME-Editor/MIME-Editor: ./MIME-Editor.gtb: /usr/bin/gtkbasic003: bad interpreter: No such file or directory
so it didn't work,


Have you installed gtkbasic mentioned in the first message?
Mark

_________________
my recommended links
Back to top
View user's profile Send_private_message Visit_website 
MU


Joined: 24 Aug 2005
Posts: 13644
Location: Karlsruhe, Germany

PostPosted: Mon 11 Feb 2008, 03:04    Post_subject:  

Dingo wrote:
fist= I need Pcmanfm or not to use this mime editor?
second= with this editor, assuming i want create a new extensions for files containing using how-to (i wolud create a .use extension), can I do this?)


first: No. But you need a filemanager, that can use these MIME-Types, as Rox-Filer will not use them!
The MIME-Editor will try to make Puppy compatible with all those external filemanagers, that support the freedesktop.org specifications.
For Rox-Filer, please create a new thread.
It works completely different.
This thread shall deal only deal with MIME-Types following the freedesktop.org specifications to avoid confusion.

second: you cannot yet.
It currently just lets you assign an existing mime-type to any program.

To assign a new file-extension to a mime-type, you had to do it by hand.
NOTE. that will not work in Puppys Rox. See first answer.
But this would require to have "update-mime-database".
There is a dotpup, but attention: it could overwrite puppys existing database.

WARNING: backup pup_save.2fs first !!!

http://dotpups.de/dotpups/Libraries/Gtk-2.8.20/optional/Shared-mime-info-0.18.pup
You also should install:
http://dotpups.de/dotpups/Libraries/Gtk-2.8.20/optional/desktop-file-utils-0.11.pup

Now you can look at
/usr/share/mime/packages/
Create there a file: mymimetype.xml

Code:
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>

    <mime-type type="text/plain">
        <glob pattern="*.ini"/>
        <glob pattern="*.inf"/>
    </mime-type> 
    <mime-type type="application/x-ms-dos-executable">
      <glob pattern="*.com" />
    </mime-type>


</mime-info>


After you saved it, type in a console:
update-mime-database /usr/share/mime

This will rebuild a new mime-database.
It now has will recognize, that "ini" and "inf" will be assigned to the mime-type "text/plain".

You could add definitions for other mime-types.

I want to test in detail, how this can be done without the full shared-mime-info dotpup.
If I found out how to reduce it, I would add it to the MIME-Editor with an optional simple to use dialog to add your own filetypes.

NOTE: like this you just can assign file-extensions to existing mime-types.
To create a completely new mime-type, I must analyse how that can be done.
I cannot tell you that yet.

Mark

_________________
my recommended links
Back to top
View user's profile Send_private_message Visit_website 
john biles


Joined: 17 Sep 2006
Posts: 1409
Location: Australia

PostPosted: Mon 11 Feb 2008, 22:47    Post_subject:  

Hello MU,
Thank you for creating this Application. I look forward to experimenting with it. If it works as it appears in the screenshot, It will make life alot easier for the average User who's not into experimenting with their system files etc to get something to work.

_________________
Legacy OS 2.1 LTS Released! Install me on a new! EXT2 Partition with 500Mb of swap and I'll be happy. Razz
Legacy OS 4 Released! Install to newer legacy hardware / early EeePC's Very Happy
Back to top
View user's profile Send_private_message Visit_website 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0709s ][ Queries: 13 (0.0048s) ][ GZIP on ]