Convert Notepad++ user defined language to html - html

I have created a user defined language using Notepad++. Now I want to convert this into html format. There are many free source tools available which can convert lets say rtf file to html but how can i convert this user defined language file into html?
Notepad++ allows me to save this file which is in user-defined language with any extension but the formatted text can only be viewed in notepad++.
Like if I save the file as draft.rtf, open the file in notepad++ the changes (formated text of user defined language) will stay but when I open the same file in Word the changes are lost!
A simple copy paste from notepad++ to Word also causes the text to lose its user-defined language specifications. Kindly help.

Check the NppExport plugin, it will export your file with the syntax highlighted as html (i think) and then you can use that somewhere else
http://www.addictivetips.com/windows-tips/nppexport-for-notepad-export-highlighted-code-in-html-rtf-format/

Related

How to convert Html to PostScript using GhostScript?

I want to convert html to PDF in order to converting it i found that direct conversion is not possible so i choose a method html-->PS-->PDF i have successfully convert PS to PDF but cant convert html to PS through ghost script now can anyone please tell me is it actually possible or not and if it is then how ?
Platform - Windows
note - No thirt pary/paid/dll tools plesae
Ghostscript does not interpret HTML, so no you cannot take HTML and create a PostScript (or PDF) file using Ghostscript directly. Since you can't convert HTML to PDF using Ghostscript, why would you think you could convert HTML to PostScript with it ?
You can (in general) print from a browser window to a virtual PostScript printer in order to create PostScript.
If that isn't acceptable then you will need to use some other means to create PostScript from HTML, in which case you may as well just go straight to PDF. wkhtmltopdf is open source, you could try that.

Why do we use file extensions if the content is just plain text?

From what I can see, a browser will display the information found both in .txt files or .html files, properly displaying html tags inside them. My g++ compiler won't stop segnaling errors in a .lua file containing lua code, but it will still try compiling it without caring about the extension, while the lua interpreter won't even open a .cpp file, even if I wrote a perfectly working lua program inside.
So why do we need file extensions if the content is in all cases text? As I said, I could write a C++ program in a file with an arbitrary extension and it will properly compile it, so what are extensions even for?
On many systems you can associate extensions with certain applications. For example a double click on a .cpp file will open it in a C++ IDE while a double click on a .txt file will open it in the default text editor.
Another example: Most text editors have syntax highlighting that depends on the extension.
There are probably many more cases where the extension is useful as an indicator for the file type. Of course this is nothing but a convention, but one that has been established for decades.

latex input to html and pdf output

Is there a ruby gem that can parse latex formatted string to html string and pdf binary string including bibtex bibliography?
I'm using textile (redcloth) right now in my rails app to get formated html, but I'd like to use latex to do it. I also would like to use *.bib file for references. And having latex it should also be easy to build a pdf file, in order to provide a pdf version of the same article (nice to have)...
I also could do it with the system call and e.g. texlive, but then I've to save the user input to file and manage these files and put it back to database and that all would take some time. I don't like this approach...
Is there a nice way to do it?
You could try runtex, although I do not know if it will do exactly what you want, I have not tested it.

CSV File creation affected by regionnal setting

I create csv file from my web app and when the web app runs in my system with browser language set to English the file gets downloaded and on open shows the expected format. But when i change my language to Danish it shows like below !
Wrong csv file format
The correct format should be like this
How do i correct this so that irrespective of the language the language the file csv file gets downloded properly ?
Thanks in Advance
I'm not sure about the components you use to create, download, and display the .csv; so this may not help.
In general, language settings may specify the separator used for .csv files. If you can generate the .csv using tab as separator (TabDelimited), there is a chance that the .csv is parsed correctly regardless of the language settings.
Some .csv drivers/providers look into a schema.ini file in the folder containing the .csv file. By specifying the format (Format=Delimited()), you may help the driver to do the right thing.

What's the best way to automate text replacing?

Here's the situation:
I have a lot of HTML files, and these HTML files link to a lot of documents. The documents have ALL been renamed. I have an excel sheet which has the old name of the file and the new name of the file.
What would be the quickest way to change the links inside the HTML files to accommodate the new names?
The method I'm using now:
Have all the HTML files opened in Notepad++
Use Notepad++'s 'Replace in All Opened Documents' function to replace all occurrences of a certain link with the new file name.
Is there a quicker, better way?
Perl's regular expressions.
elaboration:
pseudocode
open up each file for read-only and read them into a list.
close the files
foreach element in the list
#do the desired text replacement
`s/$oldtext/$newtext/g`;
open each file once more now for writing
write out the new text.
It's not hard, but requires some testing. If you have a lot of edits(and more may happen later), this is more efficient.
There are several free and open-source tools that replace text in several files, one of the open-source ones is FART
If you prefer something with a GUI, try the free Text Crawler
First save the excel to somethine nice and simple like a csv file so its easy to read in you favourite language eg perl. Iterate over each file and do the search and replace. One gotcha though is to do it all in one pass otherwise you could create problems if there are links that have changed in complex ways. Ie if file a.html changed to b.html and b.html changed to a.html you can mess up the links if you do it in multiple passes. So load all the changes into memory then cycle through each file and replace all links in it simultaneously.
Because it is specifically html search and replace a tool like this would be ideal:
http://www.aliassoftware.com/
Finds and Replaces multiple text strings in multiple files at once !