Commit graph

91 commits

Author SHA1 Message Date
Le Philousophe
886743872b DEVTOOLS: COMPANION: Fix needs_punyencoding function
When using non-ascii characters, the filename needs punyencoding.
2024-09-02 16:00:00 +02:00
Darkhood148
2e9862863c DEVTOOLS: COMPANION: Add version checker pycdlib module
The pycdlib module does not implement the encoding parameter that is required for decoding Japanese filenames. A PR has been made to acknowledge this issue: https://github.com/clalancette/pycdlib/pull/124 . For the time, the PR is not merged, we need a temporary pycdlib version checker. Once the pycdlib PR has been merged, this commit can be removed
2024-04-25 00:28:42 +02:00
Darkhood148
15efeac016 DEVTOOLS: COMPANION: Add enums for file systems and extensions 2024-04-25 00:28:42 +02:00
Darkhood148
7e4da992ca DEVTOOLS: COMPANION: Add probe parser and --silent flag in ISO parser
Add new parser probe which detects the file system, extension and presence of japanese of a provided ISO; Add a silent flag that disables all print and log messages
2024-04-25 00:28:42 +02:00
Darkhood148
37b9bbb32f DEVTOOLS: COMPANION: Add autodetection of file system and extensions if unspecified
Add functions which detect the file system (which was provided on discord thanks to eintei) and extensions if not specified by the user; combine iso9660, hfs and hybrid parsers into one common iso parser
2024-04-25 00:28:42 +02:00
Darkhood148
4aa571b95f DEVTOOLS: DUMPERCOMPANION: support puny encoding, japanese and dry run for iso9660
Add optional arguments '--japanese', '--no-punyencode' and '--dryrun' for dealing with 'shift_jis' encoded filenames, disregarding puny encoding and dry running the script respectively
2024-04-25 00:28:42 +02:00
Darkhood148
11279cd07a DEVTOOLS: DUMPERCOMPANION: support Joliet, Rock Ridge and UDF extensions
Add '--extension' argument to handle different iso9660 extensions
2024-04-25 00:28:42 +02:00
Darkhood148
90ab5bfa5a DEVTOOLS: DUMPERCOMPANION: support iso9660 and hybrid disk images
Add parsers to handle iso9660 and hybrid disk images

Add functions for extracting iso9660 and hybrid disk images
2024-04-25 00:28:42 +02:00
eientei
cc8f2d69ef DEVTOOLS: dumper-companion: Support images with multiple partitions; don't warn about missing deps when not running mac mode
Additionally fix a copy/paste error and remove an unused variable.
2023-11-11 22:57:01 +01:00
eientei
0954fc3dfa DUMPER-COMPANION: JANITORIAL: Remove unneeded indent 2023-10-27 01:19:43 +02:00
Misty De Meo
34dcb43a4f
DEVTOOLS: correct typo leading to dupe definitions
This was introduced by ce6a9d8e8e. That
commit accidentally placed the second definition on parser_iso instead
of parser_macbinary, leading argparse to raise an error at runtime.
2023-05-31 14:40:21 -07:00
Vladimir Serbinenko
ce6a9d8e8e DEVTOOLS: Allow to add .bin extension in dumper-companion.
This allows to easily simulate behaviour of other dumping tools.
It's very useful in tests wven if not so much for end users
2023-05-14 22:57:57 +02:00
Vladimir Serbinenko
86bceeeb63 DUMPER-COMANION: Fix compatibility with python 3.8 2023-05-07 02:41:26 +02:00
eientei
e2928dfb1a DEVTOOLS: COMPANION: formatting cleanup 2023-02-12 12:03:05 +01:00
eientei
479510bac1 DEVTOOLS: COMPANION: print path when doing --dryrun 2023-02-12 12:03:05 +01:00
eientei
848c7fa296 DEVTOOLS: COMPANION: Fix bug with absolute paths as the output directory
The script would start trying to set the last-modified date for each
part of the output directory path (e.g. /home/). The previous code was
getting too complex so just do a simpler method.
2023-02-12 12:03:05 +01:00
Roland van Laar
e5cf05a1fa DEVTOOLS: COMPANION: ease logic inside forloop
Continue early when in dryrun mode to have less checks on dryrun
and less indentation.
2023-02-11 22:13:11 +01:00
Roland van Laar
85e95e465f DEVTOOLS: COMPANION: make variable names explicit
Rename variable names to have a name that means what it's for.
2023-02-11 22:13:11 +01:00
Roland van Laar
e2029f6d16 DEVTOOLS: COMPANION: Improve python typing
Main changes:
- use bytes instead of ByteString
    ByteString lacks a `decode` which we do call
- use newer python syntax `|` to not use Optional
- use newer python syntax to use lowercase list and tuple instead of
  List and Tuple
- typing fixes where the incorrect type was used
2023-02-11 22:13:11 +01:00
antoniou79
3044a8dd0b DEVTOOLS: COMPANION: Fix python error for createmacfonts
Error was in line 686: NameError: name 'io' is not defined. Did you mean: 'id'?
2023-02-05 23:09:11 +01:00
eientei
32af1f2d2b DEVTOOLS: dumper-companion.py: better handle removing null bytes from partition type
This handles an edge case with a disc that has a partition type of `Apple_HFS\x00ition_map`
2023-01-11 08:38:34 +01:00
eientei
82f636f793 DEVTOOLS: COMPANION: Format using black 2022-11-22 13:28:03 +01:00
elasota
6d0dbafb79 DEVTOOLS: COMPANION: Add --forcemacbinary switch. Reduce memory usage by 2/3. Fix missing encoding. 2022-11-18 16:49:46 +01:00
eientei
eaac8fe7fe DEVTOOLS: COMPANION: Format using black 2022-08-29 22:10:23 +02:00
eientei
e2cb16d8d0 DEVTOOLS: COMPANION: Catch errors if filename can't be decoded as MacJapanese; Remove unused function 2022-08-29 22:10:23 +02:00
eientei
42cd8ba9ce DEVTOOLS: COMPANION: Finish integrating create_classicmacfonts as createmacfonts 2022-07-12 16:19:37 +02:00
Eugene Sandulenko
ca960c61c2
DEVTOOLS: COMPANION: Initial code for extracting classic mac fonts 2022-07-12 14:08:04 +02:00
eientei
7bb5a26329 DEVTOOLS: COMPANION: Add warning when possible JP string is found, punycode by default 2022-07-05 17:31:45 +02:00
eientei
fa3e3025bf DEVTOOLS: COMPANION, COMMON: Add DEL character to be punycoded 2022-06-24 13:45:34 +02:00
eientei
41a8c4765d DEVTOOLS: COMPANION: MacJapanese mapping of SHIFT-JIS range, log levels, typo fixes 2022-06-23 00:19:52 +02:00
Eugene Sandulenko
d2c524bbfa DEVTOOLS: COMPANION: Fix 'mac' mode without encoding specified 2022-06-17 14:24:04 +02:00
eientei
e43224c4d9 DEVTOOLS: Format with black 2022-06-16 13:59:50 +02:00
eientei
9bd355e9ad DEVTOOLS: Simplify data/rsrc padding 2022-06-16 13:59:50 +02:00
eientei
2583c5ea71 DEVTOOLS: Add flags to mac mode 2022-06-16 13:59:50 +02:00
eientei
9c5f3065b0 DEVTOOLS: Add basic Apple partition parsing, recursively set folder modtimes 2022-06-16 13:59:50 +02:00
eientei
004ab05ebb DEVTOOLS: Set the modified time for folders in dumper_companion 2021-11-13 11:32:19 -05:00
Misty De Meo
1e82f0760d DEVTOOLS: allow correcting filenames when punycoding 2021-11-12 16:31:31 +01:00
eientei
cb06b8ce2e DEVTOOLS: Return string encoded in Mac-Roman on error 2021-11-12 00:23:06 +01:00
Misty De Meo
954e1d61db DEVTOOLS: add a new filename to test_decode_name 2021-11-12 00:18:41 +01:00
Misty De Meo
915826fda5 DEVTOOLS: mac mode operates on raw byte paths 2021-11-12 00:18:41 +01:00
Misty De Meo
0a3af55866 DEVTOOLS: fix overeager ArgumentError catch 2021-11-12 00:18:41 +01:00
eientei
ad6125955b DEVTOOLS: Add test for previous dumpercompanion workaround; correctly use "MacJapanese" 2021-11-03 09:03:15 +02:00
Eugene Sandulenko
cbc14ac558
DEVTOOLS: COMPANION: Fix typo in error message 2021-11-02 18:58:31 +02:00
eientei
7fcad50f71 DEVTOOLS: Work around Mac-Japanese sequences missing low byte 2021-11-02 17:57:01 +01:00
Eugene Sandulenko
55a171867e
DEVTOOLS: COMPANION: Added test for higher Unicode characters 2021-10-31 23:00:35 +02:00
Eugene Sandulenko
e1804df203
DEVTOOLS: COMPANION: Fix punycode tests 2021-10-31 21:51:55 +02:00
Eugene Sandulenko
7fa0d97e32
DEVTOOLS: Added more tests for punycode 2021-10-31 19:27:34 +02:00
Eugene Sandulenko
dfd34fc163
DEVTOOLS: COMPANION: Added one more test for encoding 2021-10-31 16:37:11 +02:00
eientei
34e58d9abb DEVTOOLS: simplify macbinary packing a bit 2021-10-22 13:05:46 +02:00
Misty De Meo
7def925d9c DEVTOOLS: dumper-companion: work around bug 2021-10-22 13:04:54 +02:00