Modify

Opened 2 years ago

Last modified 7 months ago

#10431 new defect

xfig fig show in trac

Reported by: ghuang Owned by: anybody
Priority: normal Component: Request-a-Hack
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description (last modified by rjollos)

We usually use xfig edit block diagram or some other figures The format of that .fig does not support by Image ...? natively. But xfig have a function called fig2dev can convert the fig to other format. So I write this simple python code to do the conversion on the fly, that means I don't have to edit then convert then upload, just edit and upload. Another important part is the uploaded file is the source file, which we can still edit it later.

to deal with the image input format wiki:something:filename, I copied the source code from macros.py. but I don't understand the get_resource_url, it always return with 'attachment' instead of 'attachments', the later exist in my file structure. so I change it manually.

Somebody please correct it for me.

attached is the source for the plugin

Attachments (1)

xfig.py (4.4 KB) - added by ghuang 2 years ago.

Download all attachments as: .zip

Change History (4)

Changed 2 years ago by ghuang

comment:1 Changed 2 years ago by rjollos

  • Description modified (diff)

comment:2 in reply to: ↑ description Changed 7 months ago by hasienda

Replying to ghuang:

We usually use xfig edit block diagram or some other figures The format of that .fig does not support by Image ...? natively. But xfig have a function called fig2dev can convert the fig to other format.

This is really outside the scope of this plugin.

So I write this simple python code to do the conversion on the fly, that means I don't have to edit then convert then upload, just edit and upload. Another important part is the uploaded file is the source file, which we can still edit it later. ... attached is the source for the plugin

Fine, but this is just a new macro and should rather go into a separate plugin, something like XfigImageMacro instead of being buried in this ticket.

comment:3 Changed 7 months ago by hasienda

  • Component changed from ImageTracPlugin to Request-a-Hack
  • Owner changed from k0s to anybody

This might be a better intermediate component.

Add Comment

Modify Ticket

Action
as new The owner will remain anybody.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.