Feature #4664

Implement a command for opening and editing remote files with local applications

Added by Dionysis Grigoropoulos over 10 years ago. Updated over 10 years ago.

Status:Assigned Start date:11/27/2013
Priority:Medium Due date:12/13/2013
Assignee:Stavros Sachtouris % Done:

0%

Category:kamaki Spent time: -
Target version:v0.13 Estimated time:28.00 hours

Description

[kamaki] file open [/CONTAINER/]PATH [--with-application LOCAL_APPLICATION_LOCATION]

Semantics:
  1. download a remote file (create it, if not there) to a local temporary location
  2. open it with preferred application
  3. if changed, attempt to upload it back
Preferred application will be specified (whatever works first):
  1. by the user with a runtime argument,
  2. by configuration settings based on the mime type

The corresponding config file section could look like this:

[files]
application/octet-stream = /usr/bin/vi
image/jpeg = /usr/bin/gimp

An example: create a container for python scripts, write a simple script and run it

$ kamaki container create scripts

$ kamaki file open /scripts/hungarian_phrasebook.py
~ #  Scripting in python with vi
~ print 'my hovercraft is full of eels'
: wq
Remote file /scripts/hungarian_phrasebook.py has changed
Save changes? [y/N]: y

$ kamaki file open /scripts/hungarian_phrasebook.py --with-application=/usr/bin/python
my hovercraft is full of eels

History

#1 Updated by Stavros Sachtouris over 10 years ago

  • Subject changed from New command for "online" file editing to Implement a command for opening and editing remote files with local applications
  • Due date set to 12/13/2013
  • Status changed from New to Assigned
  • Estimated time set to 28.00

#2 Updated by Stavros Sachtouris over 10 years ago

  • Target version changed from v0.12 to v0.13

Also available in: Atom PDF