docs + fs start

This commit is contained in:
Luxferre
2025-12-22 09:05:35 +02:00
parent 6f01d3752b
commit 8fec507cae
4 changed files with 253 additions and 19 deletions
+2 -17
View File
@@ -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()