docs + fs start
This commit is contained in:
@@ -1,18 +1,11 @@
|
||||
# A simple line-oriented text editor for MicroPython/CircuitPython
|
||||
# implementing the POSIX 'ed' subset
|
||||
# Usage: from app.ed import edit, view, unlock_rootfs, lock_rootfs
|
||||
# implementing a POSIX 'ed' subset
|
||||
# Usage: from app.ed import edit, view
|
||||
# Created by Luxferre in 2025, released into public domain
|
||||
|
||||
from deck.input import input
|
||||
from deck.pager import print_paged
|
||||
|
||||
MCU_STORAGE = False
|
||||
try:
|
||||
import storage
|
||||
MCU_STORAGE = True
|
||||
except:
|
||||
pass
|
||||
|
||||
class Ed:
|
||||
def __init__(self, filename=None):
|
||||
self.filename = filename
|
||||
@@ -204,14 +197,6 @@ class Ed:
|
||||
except Exception as e:
|
||||
print(f"Exception occurred: {e}")
|
||||
|
||||
def unlock_rootfs():
|
||||
if MCU_STORAGE:
|
||||
storage.remount("/", readonly=False)
|
||||
|
||||
def lock_rootfs():
|
||||
if MCU_STORAGE:
|
||||
storage.remount("/", readonly=True)
|
||||
|
||||
def edit(fname):
|
||||
editor = Ed(fname)
|
||||
editor.run()
|
||||
|
||||
Reference in New Issue
Block a user