file-conversion

How to know file type without extension

十年热恋 提交于 2019-12-08 00:47:54
问题 While trying to come-up with a servlet based application to read files and manipulate them (image type conversion) here is a question that came up to me: Is it possible to inspect a file content and know the filetype? Is there a standard that specifies that each file MUST provide some type of marker in their content so that the application will not have to rely on the file extension constraints? Consider an application scenario: I am creating an application that will be able to convert

Which is the best import / export LaTeX tool?

折月煮酒 提交于 2019-12-06 12:27:15
问题 Working in academia publishing CS/math, you sooner or later find yourself trying to publish in a journal that will only accept .doc/.rtf. This means tedious, boring hours of translating line after line, especially equations, from LaTeX to an inferior format. Over the years I have tried a number of export tools for LaTeX, but none, at least of the free ones, that I have been very satisfied with. I'd like this page to collect and monitor the best import/export tools for LaTeX, to .doc/.rtf, or

How to know file type without extension

风流意气都作罢 提交于 2019-12-06 09:23:57
While trying to come-up with a servlet based application to read files and manipulate them (image type conversion) here is a question that came up to me: Is it possible to inspect a file content and know the filetype? Is there a standard that specifies that each file MUST provide some type of marker in their content so that the application will not have to rely on the file extension constraints? Consider an application scenario: I am creating an application that will be able to convert different file formats to a set of output formats. Say user uploads an PDF, my application can suggest that

convert a tsv file to xls/xlsx using python

非 Y 不嫁゛ 提交于 2019-12-06 04:39:25
问题 I want to convert a file in tsv format to xls/xlsx.. I tried using os.rename("sample.tsv","sample.xlsx") But the file getting converted is corrupted. Is there any other method of doing it? 回答1: Here is a simple example of converting TSV to XLSX using XlsxWriter and the core csv module: import csv from xlsxwriter.workbook import Workbook # Add some command-line logic to read the file names. tsv_file = 'sample.tsv' xlsx_file = 'sample.xlsx' # Create an XlsxWriter workbook object and add a

Convert IBM Lotus Notes file to text

◇◆丶佛笑我妖孽 提交于 2019-12-05 18:52:37
How can I convert an .nsf lotus file to a text file? i want to write a java program to read .nsf file which is on my system. i have tried it simply but it is showing non english character is their any way to get access them normaly. EDIT: That code is in .net and using any server's session, I just want to read .nsf file by java without creating any server's session in fact i have .nsf database. i just want to read as a text file.if there a way to parse .nsf with javacc,it would be better enough...... lotus notes database is full of proprietary design components. Assuming you just want to

convert a tsv file to xls/xlsx using python

余生长醉 提交于 2019-12-05 10:25:00
I want to convert a file in tsv format to xls/xlsx.. I tried using os.rename("sample.tsv","sample.xlsx") But the file getting converted is corrupted. Is there any other method of doing it? Here is a simple example of converting TSV to XLSX using XlsxWriter and the core csv module: import csv from xlsxwriter.workbook import Workbook # Add some command-line logic to read the file names. tsv_file = 'sample.tsv' xlsx_file = 'sample.xlsx' # Create an XlsxWriter workbook object and add a worksheet. workbook = Workbook(xlsx_file) worksheet = workbook.add_worksheet() # Create a TSV file reader. tsv

Which is the best import / export LaTeX tool?

孤人 提交于 2019-12-04 15:45:21
Working in academia publishing CS/math, you sooner or later find yourself trying to publish in a journal that will only accept .doc/.rtf. This means tedious, boring hours of translating line after line, especially equations, from LaTeX to an inferior format. Over the years I have tried a number of export tools for LaTeX, but none, at least of the free ones, that I have been very satisfied with. I'd like this page to collect and monitor the best import/export tools for LaTeX, to .doc/.rtf, or to other useful (e.g. HTML, MATHML) formats. Thus, what is your one favorite import or export LaTeX

Is it possible to batch convert csv to xls using a macro?

点点圈 提交于 2019-12-04 13:43:59
I have a large amount of csv files that I need in .xls format. Is it possible to run a batch conversion with a macro or best done with another language? I have used this code http://www.ozgrid.com/forum/showthread.php?t=71409&p=369573#post369573 to reference my directory but I'm not sure of the command to open each file and save them. Here's what I have: Sub batchconvertcsvxls() Dim wb As Workbook Dim CSVCount As Integer Dim myVar As String myVar = FileList("C:\Documents and Settings\alistairw\My Documents\csvxlstest") For i = LBound(myVar) To UBound(myVar) With wb Application.Workbooks

Stream as html5 audio or convert .amr to .ogg

别等时光非礼了梦想. 提交于 2019-12-04 11:04:10
I want to stream .amr audio files on my server. After spending a couple hours of research, it's clear to me that this is not feasible under the current state of html5 audio. Following this disappointing finding, I spent several additional hours looking for a simple way to convert .amr files to .ogg, with similarly disappointing results. I'm shocked that after well over 10 years of use, there is no simple way to play/convert files encoded under this standard, but can someone please help me to find a usable solution? The closest viable options seem to be sox and ffmpeg . I'm ideally looking for

Converting correctly pdf to ps and vice-versa

两盒软妹~` 提交于 2019-12-04 09:41:23
问题 I'm using "pdftops" to convert .pdf files to .ps files and then "ps2pdf" for the reverse process (poppler-utils). The problem is that when creating the .pdf files from the .ps files, the text looks ok, but when i try to copy it, the characters are very strange (it's like they are corrupted). I used these tools on other files for a long time and it worked fine. I also tried "pdftohtml -xml" to create an .xml file, and the text is ok (the characters are extracted correctly). What problem could