LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-11-2016, 04:46 AM   #1
deleted23
Member
 
Registered: Nov 2015
Distribution: Arch, Ubuntu Studio
Posts: 43

Rep: Reputation: 1
Lightbulb detox - sanitize filenames


Hi folks

I'm stuck here with a little program I don't want to reverse-engineer.
It's called DETOX.

Links to the (few old) manpages:

http://topics-of-interest.com/man1/detox
(command and switches)

http://topics-of-interest.com/man5/detoxrc
(configs)

Has anyone got it working (or a working copy of it)?
I am stuck in applying modified translation-tables.
The parser always falls back to it's internal tables BUT DOES parse the config-file (rc).

Is there any other free (non-script) solution out there?

Basically I want to sanitize a lot of files and as such a compiled program does a better job.
Not to mention the tremendous opportunities this little program opens. :-)

I reached already a point where I assume that the whole thing is whacked.

Greets
Gee

Last edited by deleted23; 11-12-2016 at 02:07 AM.
 
Old 11-12-2016, 01:33 AM   #2
deleted23
Member
 
Registered: Nov 2015
Distribution: Arch, Ubuntu Studio
Posts: 43

Original Poster
Rep: Reputation: 1
almost 300 hits and counting

Almost 300 hits (okay a lot bots) and no reply?

I mistakenly thought I found the answer but I didn't.
Does anyone have a clue how to configure the sequences/filters and/or modify/create new tables to get this working?

Please consider this link too:

http://topics-of-interest.com/man5/detox.tbl

The main problem I have is, I can't translate minuses and commas into underscores.
Which way ever I try to modify an existing or creating a new table (or modifying the configuration-file rc) I don't get any satisfying result.
The only conversion done seems to be 'hard-coded' into the binary itself and if so I'd not like to dig into that because it's quite a big project
with many weird naming-conventions in it's c-code (if ever the present code is legit).

There must be an answer because this program/project is into the repositories of a few distros.
Can't imagine that I am right with the consideration of the possibility that the project is whacked or somehow restricted (as it claims to be open source).


Thanks for your consideration.

Last edited by deleted23; 11-12-2016 at 02:21 AM.
 
Old 11-12-2016, 04:09 AM   #3
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 16,611

Rep: Reputation: 5606Reputation: 5606Reputation: 5606Reputation: 5606Reputation: 5606Reputation: 5606Reputation: 5606Reputation: 5606Reputation: 5606Reputation: 5606Reputation: 5606
Quote:
The main problem I have is, I can't translate minuses and commas into underscores.
look for the command rename:
Code:
rename 'y/-,/__/' <filelist>
 
1 members found this post helpful.
Old 11-12-2016, 04:30 AM   #4
deleted23
Member
 
Registered: Nov 2015
Distribution: Arch, Ubuntu Studio
Posts: 43

Original Poster
Rep: Reputation: 1
solved

works as not expected.
totally misleading manpage.
if you want to know more PM me.

Greets
Gee


@ pan64:

Thank's for the hint towards rename - I know the one-liner.
But it's not even POSIX, it's perl if I remember right don't I?

Last edited by deleted23; 11-12-2016 at 05:04 AM.
 
Old 11-12-2016, 06:45 AM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594
Quote:
Originally Posted by bluntroller View Post
if you want to know more PM me.
No, that's not how LQ works. If you have relevant information do share it here without us having to ask for it.
 
Old 11-12-2016, 08:35 AM   #6
deleted23
Member
 
Registered: Nov 2015
Distribution: Arch, Ubuntu Studio
Posts: 43

Original Poster
Rep: Reputation: 1
Troll

@unSpawn:

troll woke up :-)
always the same story with you folks.
 
Old 11-12-2016, 09:46 AM   #7
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 17,413
Blog Entries: 10

Rep: Reputation: 5227Reputation: 5227Reputation: 5227Reputation: 5227Reputation: 5227Reputation: 5227Reputation: 5227Reputation: 5227Reputation: 5227Reputation: 5227Reputation: 5227
Quote:
Originally Posted by bluntroller View Post
works as not expected.
totally misleading manpage.
if you want to know more PM me.
please share the information and insight you found, and describe the problem better.

also it has a project page: http://detox.sourceforge.net/
and compiles nicely on my system.

Last edited by ondoho; 11-12-2016 at 09:48 AM.
 
Old 11-12-2016, 09:50 AM   #8
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,354
Blog Entries: 13

Rep: Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411
Member Response

I think the command you posted is just very old and had limited exposure.

I also thought of the rename command, however what you're using clearly has more capabilities.

If you feel it has worth to keep, why not try to find the source and make a newer version which suits your current day needs?
 
Old 11-12-2016, 11:06 AM   #9
deleted23
Member
 
Registered: Nov 2015
Distribution: Arch, Ubuntu Studio
Posts: 43

Original Poster
Rep: Reputation: 1
time

Nice proposal and usually my reply should be much shorter because ... time
I took a look into it already yesterday.
The whole project has more than 10000 lines of hard to read and old fashion structured c-code.
The naming-convention the inventor choosed seems strange to me and my experience with C/Cpp.
However, IT is a very wide topic and my interests in it are very widespread.
You can see it reflected already in the Distros I use etcetera.

However, the program is indeed very old, the manpage is misleading and the program has not the capabilities you and me assumed it had.
You can of course alter the tables and the sequence of the filters and cleaners.
But to back-engineer it is out of question to me.
I am living in one of if not the country with the highest living-standard on earth.
I can't effort that much time (any more).
I leave that to some younger one in India or where ever.

Topic closed for me.
Thanks for your comments, I'm out.
 
Old 11-12-2016, 06:26 PM   #10
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,354
Blog Entries: 13

Rep: Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411
Member Response

May I suggest then that you mark the thread as Solved.
 
  


Reply

Tags
parsing


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[Bash] Rename filenames with corresponding filenames Power2All Linux - Software 4 12-02-2009 04:15 AM
Want to sanitize a virus ridden windows machine.. ciden General 18 05-07-2008 12:57 AM
* after filenames neocontrol Linux - General 11 07-24-2006 09:00 AM
Filenames eponymous Linux - Software 3 05-25-2005 06:36 AM
The Beaver is in Detox: 2.6.0-test11 TheOneKEA General 7 11-27-2003 05:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration