Command line tool to edit mp3 ID3 tags - mp3

I want a simple command line tool running on Windows Xp(or even cross platform) similar in functionality to Mp3tag to edit mp3 ID3 tags. I mostly want to organize my music according to artist , genre etc so a lightweight tool which can ask the user which tag to edit and then change all the mp3 files' tags in a directory will be good. Can I use perl to do this?

use http://eyed3.nicfit.net/ . it's in python. python works on windows.

yes indeed, you can use Perl to do it. (as well as other languages with such modules support). Search CPAN for ID3 tag modules.

Sure you can; see Is there a Perl or Python library for ID3 metadata?.

I use mpgtx in my Debian, but I see they have a Windows version at http://mpgtx.sourceforge.net/#Download
The commands I use are as follows:
# Read Tag information from mp3
mpginfo 05\ Fatty\ Boom\ Boom.mp3
# Writes album information in mp3
tagmp3 set "%a:Tension" 05\ Fatty\ Boom\ Boom.mp3

I just found the most powerful combination for doing this kind of work from a console: PowerShell and TagLib#.
Found it at http://huddledmasses.org/editing-media-tags-from-powershell/
It works like a charm!

I use BulkID3 for this. http://sourceforge.net/projects/bulkid3
I don't think it works on Windows, but it's open source.

Related

How to set label ID3 tag via automated process - kid3 or mp3tag

I am using DJ software that doesn't let me filter by path/directory.
To get around that, I would like to add the directory to an id3 tag that the software recognizes. I never use label, so that would be a good one. However, I edit label in Serato DJ Pro and don't see it show up in kid3 or mp3tag.
I would like to set the label id3 tag, hopefully for all files under a given directory and subdirectories via command line, however if it's in a UI, that's fine too.
Does anyone know how to set the label id3 tag via kid3-cli? Or via some other automated means?
If it doesn't have to be a command line tool, I recommend Mp3tag. Very easy to use, free Mp3 tagger with a GUI. Available for Windows and Mac.
You can add whatever "label" you want to the metadata in your songs. The big problem you will run into: You have to find a tag which is compatible to your Serate DJ Pro software. It is known, that this software only supports a few official id3 tags. IMHO it would be the best way to write as many tags as you can in Serato and then see in Mp3tag which one you could use for your purposes.
If you need further support, I suggest to ask in the community for Mp3tag.

Office Template - Embedded VB Script Inactive/Unspported?

First off, this might be the simplest questions on this site depending on the answer.
Question: Is Embedded VB scripts supported in Office Word templates (.dot/.dotx)?
If not, thank you!
If it is, why is this not working:
http://postimage.org/image/2uubobv38/
It works flawlessly in a .doc format but not when i try to save it as a template.
I'm running Office 2007 but 2003 doesn't work either, is there something special you need to enable for using embedded scripts in a .dot file?
I don't know if this is the proper forum for questions like this, but i really don't know anywhere else to turn regarding programming in general so.. help?
Ok so after some logical debugging (read: days), i found out that it IS supported, just not in the "traditional" way of thinking.
In a normal document, you apparently use the Open() function to load things when opening the document, because that's what you do, you open the document.
When using embedded scripts in a .dot file, you're not opening the file.. you are creating a new instance of the .dot file so the function you should be using is New():
Private Sub Document_New()
UserForm1.Show
End Sub
This should show you form from "opening" a .dot file.

RTF / doc / docx text extraction in program written in C++/Qt

I am writing some program in Qt/C++, and I need to read text from Microsoft Word/RTF/docx files.
And I am looking for some command-line program that can make that extraction. It may be several programs.
The closest thing I found is DocToText, but it has several bugs, so I can't use it.
I have also Microsoft Word installed on the PC. Maybe there is some way to read text using it (have no idea how to use COM)?
Now, this is pretty ugly and pretty hacky, but it seems to work for me for basic text extraction. Obviously to use this in a Qt program you'd have to spawn a process for it etc, but the command line I've hacked together is:
unzip -p file.docx | grep '<w:t' | sed 's/<[^<]*>//g' | grep -v '^[[:space:]]*$'
So that's:
unzip -p file.docx: -p == "unzip to stdout"
grep '<w:t': Grab just the lines containing '<w:t' (<w:t> is the Word 2007 XML element for "text", as far as I can tell)
sed 's/<[^<]>//g'*: Remove everything inside tags
grep -v '^[[:space:]]$'*: Remove blank lines
There is likely a more efficient way to do this, but it seems to work for me on the few docs I've tested it with.
As far as I'm aware, unzip, grep and sed all have ports for Windows and any of the Unixes, so it should be reasonably cross-platform. Despit being a bit of an ugly hack ;)
Try Apache Tika
I recommend not to use COM as this would defeat the usage of a portable library like Qt in the first place.
You might want to use the classic catdoc or a similar tool such as wvWare.
Note that although the catdoc author claims that catdoc doesn't work under Windows, there is a posting of 2001 which states the opposite.
To read .doc files you can use the structured storage API. A .doc is basically a structured storage repository with various streams corresponding to the various parts of the document.
Be warned that it is quite a hairy API and that even using this API, a .doc file can be quite messy to look at.
Ofcouse this is still windows only but atleast it's not COM. just a plain old C API.
This might help. It is cross-platform and has an API http://www.winfield.demon.nl/
Otherwise the iFilter methods are the way to go if this is windows only. It will allow you to parse anything that has an iFilter on your system. Here is examples of this http://the-lazy-programmer.com/blog/?p=8 . I have used iFilter from the C# end of things quite a bit.

Convert .odt .doc .ods files to .txt files

I want to convert all the .odt .doc .xls .pdf files to .txt files.
I want to convert these files to text files using a shell script or a perl script
There's a program for odt files and alikes:
odt2txt - avaliable in repos.
$ unoconv --format=txt document1.odt
Should produce document1.txt.
OpenOffice has a built-in document converter capable of handling a bunch of formats- take a look at unoconv: http://dag.wieers.com/home-made/unoconv/
That being said, I have had some troubles getting that to work in the past- If you're having trouble, take a look at similar programs for AbiWord (another open source word processor).
For word documents, you can try antiword, at least on linux. It's a command line utility that takes a word document as an argument, and spits out the text from that document (as best as it can figure) to Standard Output. Maybe you can specify an ouput file too. I can't remember the details of how it works. I haven't used it in a while. Not sure if it can handle OO documents.
It's certainly possible to do this, though there is something strange and impenetrable about the OO project and its documentation that makes things like this hard to research and follow. However, OO has the capability to convert all of those types, not just the OO native ones, and it can do it via two different forms of automatic control.
These are the two general approaches.
You can start OO and tell it to execute a macro which does this job for you for a given file. You then just have to write the macro and a script to loop over your files. The syntax is something like
$ oowriter -headless filename macro://dir/Standard.Module1.sMySub
The other thing OO has is a network API. This is based on something called UNO.
$ oowriter -accept=accept-string
Notifies the OpenOffice.org software that upon the creation of
"UNO Acceptor Threads", a "UNO Accept String" will be used.
You will need some sort of client library. I think they have one for Python at least. Using this technology a Python program or some other scripting language with an OO client library could drive the program and convert all the files. Since OO reads MSO, it should be able to do all of them.
Open the file in LibreOffice. Click on "File", "Save-as" scroll down to find the text option. Click that and it will be saved as a text file.
FYI, I had an *.ODT file that was 339.2 KB in size. When I save-as text the size of the file shrunk to ONLY 5.0 KB. Another reason for saving your files as text files.
For the Microsoft formats, look into the wvWare tools.
Open .ods file normally in libre office
Highlight text to be converted
Open a terminal
Run vi
Press "i" to get insert mode
Press ctrl-shift-v
Done!
Need some formatting?
Save the file as
Get out of vi
Run:
$cat | column >filename2
This worked in opensuse running KDE
Substitute "kwrite" for "vi", if you want

Load Excel data into Linux / wxWidgets C++ application?

I'm using wxWidgets to write cross-plafrom applications. In one of applications I need to be able to load data from Microsoft Excel (.xls) files, but I need this to work on Linux as well, so I assume I cannot use OLE or whatever technology is available on Windows.
I see that there are many open source programs that can read excel files (OpenOffice, KOffice, etc.), so I wonder if there is some library that I could use?
Excel files it needs to support are very simple, straight tabular data. I don't need to extract any formatting except column/row position and the data itself.
Suggestedd reference: What is a simple and reliable C library for working with Excel files?
I came across other libraries (chicago on sf.net, xlsLib) but they seem to be outdated.
jrh
I can say that I know of a wxWidgets application that reads Excel .xls and .xlsx files on any platform. For the .xlsx files we used an XML parser and zip stream reader and grab the data we need, pretty easy to get going. For the .xls files we used: ExcelFormat, which works well and we found the author to be very generous with his support.
Maybe just some encouragement to give it a go? It was a couple of days work to get working.
Maybe http://www.libxl.com/ can help ?
I think that it is not something easy to do. xls files are quite complex and it is a proprietary format.
Maybe this is a stupid idea but why don't you upload and access your doc with Google docs. There are some apis to access your doc.
2 potential problems:
- Your app needs internet access
- Currently there is no C++ api.
But there are api for several languages including python see http://code.google.com/intl/fr/apis/gdata/articles/python_client_lib.html