Skip to main content
eliminated useless crap
Source Link
Raven
  • 1.4k
  • 4
  • 16
  • 26

I'm trying to create a command line note manager that is a bit fancy.

I want a command line task manager that more or less functions likeIs there an offline Jira. Taskseasy way to have titles and descriptions, various metadata, attached files, and comments. I would like if each task wasarbitrary text editors call special logic based on a self contained file on the system, but I still need to be able to open a plain text editor to modify the description.extension?

For example, let's say I currently solve this with my special fancy program extracting the editable parts of the task intohad a temporaryzip file and calling an editor on that, but I think it would just be slick if I could just use vi on it and the text parts would automatically know how to format themselves.

Is there had a way to make it so I could do an action similar to the following example?collection of files.

# Using my program to edit the file, which calls vi after extracting the text $ myprog edit myfile.zip txt # vi should automatically extract the title and descriptionimage. # This is what I need help withjpg $ vi myfileothercrap.zipcrap 

Also is this possible in suchIs there a way on a Linux system to include arbitrary editors, or would I have to add individual support for each onetext editors automatically run commands when opening the file via something like vi myarchive.zip based on the file extension?

I'm trying to create a command line note manager that is a bit fancy.

I want a command line task manager that more or less functions like an offline Jira. Tasks have titles and descriptions, various metadata, attached files, and comments. I would like if each task was a self contained file on the system, but I still need to be able to open a plain text editor to modify the description.

I currently solve this with my special fancy program extracting the editable parts of the task into a temporary file and calling an editor on that, but I think it would just be slick if I could just use vi on it and the text parts would automatically know how to format themselves.

Is there a way to make it so I could do an action similar to the following example?

# Using my program to edit the file, which calls vi after extracting the text $ myprog edit myfile.zip  # vi should automatically extract the title and description. # This is what I need help with $ vi myfile.zip 

Also is this possible in such a way on a Linux system to include arbitrary editors, or would I have to add individual support for each one?

Is there an easy way to have arbitrary text editors call special logic based on a file extension?

For example, let's say I had a zip file that had a collection of files.

text.txt image.jpg othercrap.crap 

Is there a way to have text editors automatically run commands when opening the file via something like vi myarchive.zip based on the file extension?

Source Link
Raven
  • 1.4k
  • 4
  • 16
  • 26

How can I associate special logic with file extensions?

I'm trying to create a command line note manager that is a bit fancy.

I want a command line task manager that more or less functions like an offline Jira. Tasks have titles and descriptions, various metadata, attached files, and comments. I would like if each task was a self contained file on the system, but I still need to be able to open a plain text editor to modify the description.

I currently solve this with my special fancy program extracting the editable parts of the task into a temporary file and calling an editor on that, but I think it would just be slick if I could just use vi on it and the text parts would automatically know how to format themselves.

Is there a way to make it so I could do an action similar to the following example?

# Using my program to edit the file, which calls vi after extracting the text $ myprog edit myfile.zip # vi should automatically extract the title and description. # This is what I need help with $ vi myfile.zip 

Also is this possible in such a way on a Linux system to include arbitrary editors, or would I have to add individual support for each one?