ePub mimetype - anyone encountered a situation where it's needed? - mime-types

I'm wondering if anyone has ever encountered a situation where it was necessary that the mimetype file be put into the zip file first (and uncompressed) to make the ePub work. And I'm not talking about the ability to pass an ePub validation.
I've been trying to write a script to create ePubs and it's not working. I tried several variations of the 7zip flags and every time the validation complains about the mimetype file.
I got fed up and just opened one of the files in Digital Editions and it worked fine. Then opened it in Calibre, dropped it into Chrome (ePub Reader), in iBooks, and even made a Kindle file. Everything worked as expected without throwing up an error.
Is there any situation where this matters...apart from the OCD part of me wanting an error-free file?

The answer appears to be "no"...
But here are a sampling of posts fighting with the Mimetype file error:
Make MIMETYPE file the first file in an EPUB ZIP file?
Creating an Epub file with a Zip library
creating *.epub with perl Archive::Zip -- epubchecker error
How to create ePub with System.IO.Compression.ZipArchive?
The mimetype file has an extra field of length n. The use of the extra field feature of the ZIP format is not permitted for the mimetype file

Related

File Format and Extension doesn't match

I wrote a code to export the data from a VF page. However, when i try to open download the exported page i get a warning message saying the File Format & extension doesn't match. Please help me resolve this warning message.
Is that MS Excel complaining about file that pretends to be real *.xslx file but actual payload is CSV or even a HTML with <table> in it? Well, not much you can do about it.
Excel can try to parse unexpected content, no idea if you can disable that warning somehow. I doubt you'll be able to really please Excel gods. If you tell it it's *.xslx it'll expect a directory full of xml documents, zipped (make a "real" Excel file, force rename it to *.zip, try to open and you'll see what I mean). You won't be able to make a zip file with pure VF and Apex, maybe with some crazy JavaScript libraries...
Just dismiss the warning and move on? Or generate CSV?

Edit File During it is processing in Unity

I am making a unity app in which it read data from a text file and
take actions accordingly and I want to update this file after regular intervals.
When I tried to update my file it says file is in process you can't edit it.
I have also tried .xml file extension for editing it but it didn't work
Which file format can be edited during processing?
We we can’t help without code. But Unity can process any file format like .txt .xml etc but you need to give read/write permission and also you need to check, is the process done before writing the file. This is the whole how read/write works in any platforms. I hope you get idea.

Flink batch ReadCSV - zip file

I am writing a batch based on
https://github.com/dataArtisans/flink-training-exercises/blob/master/src/main/java/com/dataartisans/flinktraining/exercises/dataset_java/mail_count/MailCount.java
In the following code, input has to be .csv, otherwise I get error. I tried a .zip file with a csv in it. In the MailCount.java, I see that the readCsvFile accepts .gz file as input and works fine. Could you please help?
env.readCsvFile(input)
.ignoreFirstLine()
.includeFields(fields)
.types(String.class,String.class);
Thanks
Aruna
Flink supports reading compressed files out of the box, if the files have a proper extension. However, not all types of compression are supported. You can find the list of supported compression types in [1].
For example, .gz is supported, that's why the example works, but .zip isn't, so you get an error.
Best regards,
Konstantin
[1] https://ci.apache.org/projects/flink/flink-docs-release-1.2/dev/batch/index.html#read-compressed-files

extract .bin files

So I have an old dictionary on my pc, pretty old that I cannot find
any track of it's developer or the website (I guess it hasnt even been released
as an official software). I have a personal project of mine and I might need some
of this words translated (about 200-300) and I see that inside the data folder that
contains the database/list of files but Im unable to extract or read this files.
Is there any way to extract or convert these .bin files to a text format or something
readable. I've used some tools like (alcohol 120%, isobuster, magiciso, Izarc) but with
no luck. I keep getting and error message saying it is not a valid cd image file.
So I'm thinking maybe this type of .bin files are not like .bin or .iso cd files that
you can mount and read and something else might be in this case.
If you have any information kindly reply with
your suggestions.
Thank you alot.
You can try using the strings utility to extract the strings out of the file. It comes with any Linux distribution and if you are on Windows, you can get it from Windows Sysinternals.
If you are lucky and the words are not encoded, you may be able to get at the data you are looking for.
.bin is one of those extensions that has been way overused, and could be anything... What did the file come from originally? Do you need to convert these words and store them back in the original file (in their transformed form), and then expect the original app to work correctly?

Exporting silverlight datagrid to excel file without warning message

The xls file opens fine and the data is correct but each time I open the file, the warning:
"The file you are trying to open, [filename] is in a different format... Verify that the file is not corrupted..."
pops up. I've read that there is no cleaner workaround to this except tweaking the registry/group policy to 'suppress' the message. But then, this doesn't appear on real xls files made from excel.
So is there a way/format that excel will open the file without this warning message? Should exporting the datagrid to xml/csv work?
found the answer same day, forgot to post the answer as soon as I got it working.
Here's a handy library to help create and read excel files properly. Works on SL4 but you could just tweak the source code to make it usable in SL3
http://excellite.codeplex.com/

Resources