Last active
August 15, 2024 18:43
-
-
Save vadimkantorov/fdb7c515faa6f4bfce6566749ce648d4 to your computer and use it in GitHub Desktop.
TexLive ISO file listing and extraction (Joliet)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# the texlive iso urls become unavailable as texlive replaces the releases | |
# this script also prints dd commands for extracting a file by offset | |
# docs at https://github.com/clalancette/pycdlib and https://clalancette.github.io/pycdlib/example-extracting-data-from-iso.html | |
# Usage: | |
# wget https://tug.ctan.org/systems/texlive/Images/texlive2024-20240312.iso | |
# python texliveiso.py texlive2024-20240312.iso > texliveiso.txt | |
import sys, io | |
import pycdlib | |
input_path = sys.argv[1] | |
iso = pycdlib.PyCdlib() | |
iso.open(input_path) | |
if iso.has_udf(): | |
pathname = 'udf_path' | |
elif iso.has_rock_ridge(): | |
pathname = 'rr_path' | |
elif iso.has_joliet(): | |
pathname = 'joliet_path' | |
else: | |
pathname = 'iso_path' | |
print(pathname) | |
for child in iso.list_children(joliet_path='/'): | |
offset = child.orig_extent_loc * iso.logical_block_size | |
fsize = child.data_length | |
fname = child.file_identifier().decode('utf-8') | |
print(fname, '\t', f'dd if="{input_path}" of="{fname}" bs=1 count={fsize} skip={offset}') | |
extracted = io.BytesIO() | |
iso.get_file_from_iso_fp(extracted, joliet_path='/README') | |
print(extracted.getvalue().decode('utf-8')) | |
iso.close() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rr_path | |
. dd if=../texlive2024-20240312.iso of=. bs=1 count=2048 skip=3395584 | |
.. dd if=../texlive2024-20240312.iso of=.. bs=1 count=2048 skip=3395584 | |
.mkisofsrc dd if=../texlive2024-20240312.iso of=.mkisofsrc bs=1 count=91 skip=6023270400 | |
LICENSE.CTAN dd if=../texlive2024-20240312.iso of=LICENSE.CTAN bs=1 count=2098 skip=5576114176 | |
LICENSE.TL dd if=../texlive2024-20240312.iso of=LICENSE.TL bs=1 count=5267 skip=5576118272 | |
README dd if=../texlive2024-20240312.iso of=README bs=1 count=182 skip=5576124416 | |
README.usergroups dd if=../texlive2024-20240312.iso of=README.usergroups bs=1 count=250 skip=5576126464 | |
archive dd if=../texlive2024-20240312.iso of=archive bs=1 count=1308672 skip=3397632 | |
autorun.inf dd if=../texlive2024-20240312.iso of=autorun.inf bs=1 count=40 skip=5574256640 | |
doc.html dd if=../texlive2024-20240312.iso of=doc.html bs=1 count=1719204 skip=5574258688 | |
index.html dd if=../texlive2024-20240312.iso of=index.html bs=1 count=1852 skip=5575979008 | |
install-tl dd if=../texlive2024-20240312.iso of=install-tl bs=1 count=125030 skip=5575981056 | |
install-tl-windows.bat dd if=../texlive2024-20240312.iso of=install-tl-windows.bat bs=1 count=5083 skip=5576108032 | |
readme-html.dir dd if=../texlive2024-20240312.iso of=readme-html.dir bs=1 count=2048 skip=4706304 | |
readme-txt.dir dd if=../texlive2024-20240312.iso of=readme-txt.dir bs=1 count=2048 skip=4708352 | |
release-texlive.txt dd if=../texlive2024-20240312.iso of=release-texlive.txt bs=1 count=368 skip=5576321024 | |
source dd if=../texlive2024-20240312.iso of=source bs=1 count=4096 skip=4710400 | |
texlive-doc dd if=../texlive2024-20240312.iso of=texlive-doc bs=1 count=2048 skip=4724736 | |
tl-tray-menu.exe dd if=../texlive2024-20240312.iso of=tl-tray-menu.exe bs=1 count=49664 skip=6023219200 | |
tlpkg dd if=../texlive2024-20240312.iso of=tlpkg bs=1 count=2048 skip=4753408 | |
For the introductory information to TeX Live, see the directories | |
readme-txt.dir (plain text files) or readme-html.dir/ (HTML files). | |
The material is available in several languages. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment