iftechfoundation / babel-tool Goto Github PK
View Code? Open in Web Editor NEWTreaty of Babel analysis tool
License: Other
Treaty of Babel analysis tool
License: Other
In this function, buff is filled by fread and i is treated as the number of bytes read,
i=fread(buf,1023,1,f);
so that
buf[i]=0;
adds a null to the end. However, fread's return value is the number of items read, not the number of bytes read. Since fread is told to read one item of 1023 bytes, this means that i=1 and the null is placed in the second byte of buff, instead of at the end. This causes the test to fail for all ifiction files.
Temporarily replacing
buff[i]=0
with
buf[1023]=0;
lets it work for now.
This is on Kubuntu 20.10
I ran into this when using babel-marry.pl
At least the font files in this folder:
https://github.com/garglk/garglk/tree/master/garglk
They are all detected as a Hugo game with IFID HUGO-117-6E-73-igned-ch
I also tried other random files with a .hex suffix, but those were rejected.
Maybe it's out of scope here but:
I know the glksave has the route and game that created it. Would it be possible to get that info from babel?
Or, is there a tool that already does that?
According to https://babel.ifarchive.org/babel_rev10.html#format, there are 13 valid <format>
values:
zcode, glulx, tads2, tads3, hugo, alan, adrift, level9, agt, magscrolls, advsys, html, executable
But try running babel
on a Twine file, e.g. ./babel -format test/twine/Test-Game.html
Expected: Format: html
Actual: Format: twine
, which isn't on this list.
I'm crosscompiling babel (in addition to other tools) targeting amd64, arm64 and armhf architectures.
While the rest of the tools (remglk, various interpreters, blorblib) compiles with no issues, Babel ends up compiling into a x86-64 binary (the arch of my host machine).
Is babel forced to build for x86? Am I doing something wrong?
Now the workaround I found is add by hand the specific gcc compiler to the target arch. Is there a better workaround?
When running babel-infocom.pl with the blorbs from here, the script fails to work on a case sensitive file system since it is looking for the file babel-iFiction (note the capital F) but the supplied file is named babel.ifiction (lower case F).
This is a follow-up to #19. It is easy enough to patch the code to accept all Alan 3 games as valid, and then use the tool to generate IFIDs for them (they will usually come out with lower-case letters, for some reason.)
However, many of these games already have IFIDs entered at IFDB which do not match those generated by the Babel tool. For example, The Ngah Angah School of Forbidden Wisdom has the IFID ALAN-8D8EA8FF9CA7691AF8A0E5946E5AA34B listed on its IFDB page, but the Babel tool will report its IFID as 35fbe332-27d0-ac42-efcd-f2f19cdad66e.
Enter the Dark has IFID ALAN-C9DF1732494399694D3B8260F982DAA6 on IFDB, but the Babel tool will report it without the ALAN prefix (C9DF1732494399694D3B8260F982DAA6).
Is this to be considered bugs that will have to be fixed in the Babel tool source, or should we accept the tool as authoritative and add the IFIDs it generates to IFDB?
Doing babel -format GAMEDAT1.DAT
on Scapeghost for PC returns:
Format: executable (non-authoritative)
I have two copies of the game (only GAMEDAT1.DAT are different) md5sum:
a8375aa2ca595694c315cb95e92b0ced GAMEDAT1.DAT - Identified by terp as (PC/ST)
139d1f07b33b3178ab9a93d5dc61cfac GAMEDAT1.DAT - Identified by terp as (amiga)
6d86951023236d8a417663fb8dd1d94c GAMEDAT2.DAT
f109218800ce4d9cd03c6b3d90e30010 GAMEDAT3.DAT
How can I get the hex code to detect them?
The following Alan 3 games (about half of the Alan 3 games on IFDB) are not recognized as such by the current Babel tool:
The Christmas Party
Enter the Dark
IN-D-I-GO SOUL
The Ngah Angah School of Forbidden Wisdom
Room 206
A Very Hairy Fish-Mess
Waldo's Pie
% ./babel -ifid test/alan/valid.a3c
IFID: c065a752-a476-a252-731f-e9fe96fcdc6d
The IFID should be upper-case to be consistent with other cases.
If you type, for example:
./babel -story test/bronze/Bronze.zblorb
...you get the .z8 file out of the blorb, but it winds up with the filename 1810847C-0DC7-44D5-94EF-313A3E7AF257.blorb. It should be 1810847C-0DC7-44D5-94EF-313A3E7AF257.z8.
The relevant function is babel_story_story(), which calls babel_treaty(GET_STORY_FILE_EXTENSION_SEL, ...). This gets the extension for the currently loaded file, which is ".blorb", which is not what we want.
Not sure if we should update GET_STORY_FILE_EXTENSION_SEL to extract the inner game file's extension, or call something else.
Adrift 5 story files contain an embedded iFiction record, which includes their IFID (and other details).
When I set up this repository, I started with the 0.2b at babel.ifarchive.org. I then bumped the version number to 0.3 However, I forgot that there was an older "0.4b" update:
https://ifarchive.org/if-archive/utilities/babel.zip
I should merge the changes from both versions into an 0.5.
See angstsmurf/spatterlight#24
suspended-r5-sXXXXXX.z3
and zork1-r5-sXXXXXX.z1
both have IFID ZCODE-5-------
, which makes things confusing.
The strange blorb file downloadable from here will crash Babel:
https://inform-fiction.org/zmachine/standards/blorb/index.html#nine
EXC_BAD_ACCESS at this line, with j set to 944924012 (on my machine):
https://github.com/iftechfoundation/babel-tool/blob/master/blorb.c#L123
The -format command sometimes outputs a warning, such as if the file doesn't have an extension. This broke Parchment's sitegen service as I wasn't accounting for that possibility.
What if the warning was moved to the end, so that the first three lines of the command are always the same? That would make tools which automatically parse it more reliable.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.