Library and CLI tools to convert to/from RISC OS formats
Project description
riscos-conv
A Python utility to list, extract and create some RISC OS file formats.
Supported formats:
- ADFS disc images (list/extract)
- RISC OS ZIP/SparkFS (list/extract/create)
- Spark/ArcFS (list/extract)
- RISC OS Sprite files (list/extract)
Spark and ArcFS files require the nspark tool to be installed.
Currently only Sprite files created on RISC OS 3.1 and earlier are supported.
Usage
usage: riscos-conv [-h] [-d DIR] [-a] [{x,l,c,d2z}] file [files ...]
x- Extract archive/disc image/sprite filel- List archive/disc image/sprite filec- create a RISC OS-compatible ZIP filed2z- convert an ADF disc image to a RISC OS ZIP file
Listing
List a disc/archive file:
$ riscos-conv l riscos3-app2.adf
file type DISC_IMAGE
ADFS Disc - App2
Obey feb 132 1989-09-08 15:14:09 !65Host/!Boot
Text fff 157 1992-05-11 11:22:59 !65Host/!Help
Obey feb 1282 1992-05-18 15:03:14 !65Host/!Run
Module ffa 64968 1992-05-18 11:59:05 !65Host/!RunImage
Sprite ff9 1272 1991-06-12 12:21:21 !65Host/!Sprites
...
List sprites in a Sprite file:
$ riscos-conv l Sprites,ff9
file type RISC_OS_SPRITES
SpriteArea(num_sprites=110 next_free=0x85e8)
directory (34x17) mode 12
small_dir (18x9) mode 12
application (34x17) mode 12
small_app (18x9) mode 12
file_xxx (34x17) mode 4
...
Extracting files
For ADF disc images, this will create and extract into a directory with the name of the disc.
$ riscos-conv x ../archimedes-live/dlcache/riscos3-app2.adf
file type DISC_IMAGE
ADFS Disc - App2
Extracting to ./App2:
./App2/!65Host/!Boot,feb
./App2/!65Host/!Help,fff
./App2/!65Host/!Run,feb
./App2/!65Host/!RunImage,ffa
./App2/!65Host/!Sprites,ff9
...
Extracting sprites:
$ riscos-conv x \!Sprites22\,ff9
file type RISC_OS_SPRITES
SpriteArea(num_sprites=2 next_free=0x768)
Extracting to .
./!clock.png
./sm!clock.png
Creating a RISC OS ZIP file
Create a RISC OS ZIP from files on disc. Files must have a comma-extension with the RISC OS hex filetype (e.g. filename,abc)
$ riscos-conv c tube.zip \!65Tube/
!65Tube/!RunImage RiscOsFileMeta(type=ffa date=1992-05-18 12:24:32.070000 attr=3)
!65Tube/!Help RiscOsFileMeta(type=fff date=1992-05-11 11:28:41 attr=3)
!65Tube/!Sprites23 RiscOsFileMeta(type=ff9 date=1991-09-11 11:33:20 attr=3)
!65Tube/!Run RiscOsFileMeta(type=feb date=1992-05-18 15:04:48.590000 attr=3)
!65Tube/!Sprites22 RiscOsFileMeta(type=ff9 date=1989-11-10 13:21:06 attr=3)
!65Tube/!Sprites RiscOsFileMeta(type=ff9 date=1990-11-15 17:58:31 attr=3)
!65Tube/!Boot RiscOsFileMeta(type=feb date=1990-07-23 16:22:10.080000 attr=3)
Converting an ADFS disc image to RISC OS ZIP
This will convert a disc image to a ZIP file while retaining the file types and date stamps.
$ riscos-conv d2z ~/projects/archimedes-live/dlcache/riscos3-app1.adf app1.zip
file type DISC_IMAGE
ADFS Disc - App1
!FontPrint/!Help RiscOsFileMeta(type=fff date=1992-05-11 10:01:45 attr=3)
!FontPrint/!Run RiscOsFileMeta(type=feb date=1992-05-14 16:18:01 attr=3)
!FontPrint/!RunImage RiscOsFileMeta(type=ff8 date=1992-05-18 17:22:53.220000 attr=3)
!FontPrint/!Sprites RiscOsFileMeta(type=ff9 date=1991-05-31 14:04:57 attr=3)
!FontPrint/!Sprites22 RiscOsFileMeta(type=ff9 date=1991-05-31 14:10:06 attr=3)
!FontPrint/!Sprites23 RiscOsFileMeta(type=ff9 date=1991-05-31 14:20:40 attr=3)
If you only want to convert some of the contents of the disc to a ZIP, you can specify one or more paths from the disc image to archive:
$ riscos-conv d2z ~/projects/archimedes-live/dlcache/riscos3-app1.adf app1.zip \!Squash DrawDemo
file type DISC_IMAGE
ADFS Disc - App1
!Squash/!Boot RiscOsFileMeta(type=feb date=1991-05-29 09:57:02 attr=3)
!Squash/!Help RiscOsFileMeta(type=fff date=1992-05-19 15:25:35 attr=3)
!Squash/!Run RiscOsFileMeta(type=feb date=1992-05-14 16:44:00 attr=3)
!Squash/!RunImage RiscOsFileMeta(type=ff8 date=1992-05-19 15:55:22.800000 attr=3)
!Squash/!Sprites RiscOsFileMeta(type=ff9 date=1991-06-12 12:07:32 attr=3)
!Squash/!Sprites22 RiscOsFileMeta(type=ff9 date=1991-06-12 12:08:13 attr=3)
!Squash/!Sprites23 RiscOsFileMeta(type=ff9 date=1991-06-12 12:08:45 attr=3)
!Squash/Messages RiscOsFileMeta(type=fff date=1992-05-19 15:25:45 attr=3)
!Squash/Squash RiscOsFileMeta(type=ff8 date=1992-05-19 15:54:59.330000 attr=3)
!Squash/Templates RiscOsFileMeta(type=fec date=1992-05-14 18:46:04 attr=3)
DrawDemo RiscOsFileMeta(type=aff date=1991-09-06 16:19:36 attr=3)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file riscos_conv-0.0.1.tar.gz.
File metadata
- Download URL: riscos_conv-0.0.1.tar.gz
- Upload date:
- Size: 53.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb8c36a8c0b713aa7f5c51577815dcdbbcfb37dcaa3ac03016b800f230fab0aa
|
|
| MD5 |
c1d1ed4472cd0fa1aa201d90760ce743
|
|
| BLAKE2b-256 |
85aa1f0f4803c7b94838ad2e971aca8b7a1d0065ec56119b8fde07c12f8f2b78
|
File details
Details for the file riscos_conv-0.0.1-py3-none-any.whl.
File metadata
- Download URL: riscos_conv-0.0.1-py3-none-any.whl
- Upload date:
- Size: 55.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
acf3eaa200b4d8e759f0ac52b21520dc1714661fdd107405bef93d658190aded
|
|
| MD5 |
f3ac9b2934e569179f07064449789b12
|
|
| BLAKE2b-256 |
d93009956b73985c520603df811f7c293b0f759c5659ab36da604da299a6f854
|