Rocksolid Light

Welcome to novaBBS

register   nodelist   faq  

Your account also provides newsreader access to all groups at news.i2pn2.org port 119 or 563 (TLS)


rocksolid / Linux / Re: Bash script to rename mp3/ogg files

SubjectAuthor
* Bash script to rename mp3/ogg filesAnonUser
`* Re: Bash script to rename mp3/ogg filesAnonUser
 +- Re: Bash script to rename mp3/ogg filesAnonUser
 `* Re: Bash script to rename mp3?ogg filesGuest
  `- Re: Bash script to rename mp3?ogg filesanonymous

1
Subject: Bash script to rename mp3/ogg files
From: AnonU...@rslight.i2p (AnonUser)
Newsgroups: rocksolid.shared.linux
Organization: Rocksolid Light
Date: Sun, 17 Nov 2019 15:56 UTC
Attachments: tag2name.sh.txt (text/x-shellscript)
Path: i2pn2.org!rocksolid2!.POSTED.localhost!not-for-mail
From: AnonU...@rslight.i2p (AnonUser)
Newsgroups: rocksolid.shared.linux
Subject: Bash script to rename mp3/ogg files
Date: Sun, 17 Nov 2019 15:56:16 -0000 (UTC)
Organization: Rocksolid Light
Message-ID: <f187c449ef1658147b4a8f515337ce64$1@rslight.i2p>
Mime-Version: 1.0
Content-Type: multipart/mixed;boundary="------------5dd16da08472a1.09222706"
Injection-Date: Sun, 17 Nov 2019 15:56:16 -0000 (UTC)
Injection-Info: novabbs.com; posting-account="retrobbs1"; posting-host="localhost:127.0.0.1";
logging-data="10173"; mail-complaints-to="usenet@novabbs.com"
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on novabbs.com
X-Spam-Level: *
X-Rslight-Site: $2y$10$3kzI.q83pBLfrOppbYvtMugSlxSsEhSGatI94KeFw6Krr2leTbLs.
View all headers
Had to bring some organizing to my 15k files music collection. Finally
decided
to use a very specific setup that would allow to use the resulting files on
many different devices. Did not find a proper tool for the purpose for the
cli,
so I made one.
What it does:

-reads all files ending in mp3 or ogg from a source directory, one by one
-extracts the tag information with the help of ffprobe
-generates a new name with this information, and if successful copies or
moves
the original file to a target directory
-the names generated follow this scheme:
Artist-Year-Album-Disc-Track-Title.ext
so that you dump all files in one big directory and still have the correct
order in the files.
-all charcters that are not alnum,- or _ are substituted so that stupid
devices
and systems will be able to read all names
-if there are no tags (at least for artist and title), the file is left
alone
-all actions are logged in a textfile so that everything can be reversed
if need be

it is not very elegant or performant, but so far it has worked pretty well
for
me, only on some files the tags contain linefeeds (hex 0A) and this messes
up
the naming. use with care, and back up your files.
the links below go the first version of the script, the second version is
attached to this message as a text file.

http://boxs.i2p/?NbslzEoyxM8QZdD6ArDhNXcVLdf
http://ana5icnp3au4qy5i.onion/?NbslzEoyxM8QZdD6ArDhNXcVLdf




Attachments: tag2name.sh.txt (text/x-shellscript)
Subject: Re: Bash script to rename mp3/ogg files
From: AnonU...@rslight.i2p (AnonUser)
Newsgroups: rocksolid.shared.linux
Organization: Rocksolid Light
Date: Sun, 17 Nov 2019 22:59 UTC
Path: i2pn2.org!rocksolid2!.POSTED.localhost!not-for-mail
From: AnonU...@rslight.i2p (AnonUser)
Newsgroups: rocksolid.shared.linux
Subject: Re: Bash script to rename mp3/ogg files
Date: Sun, 17 Nov 2019 22:59:22 -0000 (UTC)
Organization: Rocksolid Light
Message-ID: <430f686b291737866dff2d448ccd9c55$1@novabbs.com>
References: <f187c449ef1658147b4a8f515337ce64$1@rslight.i2p>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 17 Nov 2019 22:59:22 -0000 (UTC)
Injection-Info: novabbs.com; posting-account="retrobbs1"; posting-host="localhost:127.0.0.1";
logging-data="3939"; mail-complaints-to="usenet@novabbs.com"
User-Agent: rslight (http://news.novabbs.com)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on novabbs.com
X-Rslight-Site: $2y$10$ar8mEMqww16Y1holKNo82eq9LSkSpx49sFttcyETbakF6kbIjoVzi
View all headers
this little sed line should resolve the new line problems:
sed ':a;N;$!ba;s/n//g'
--
Posted on Rocksolid Light



Subject: Re: Bash script to rename mp3/ogg files
From: AnonU...@rslight.i2p (AnonUser)
Newsgroups: rocksolid.shared.linux
Organization: Rocksolid Light
Date: Sun, 17 Nov 2019 23:28 UTC
Path: i2pn2.org!i2pn.org!rocksolid2!.POSTED.localhost!not-for-mail
From: AnonU...@rslight.i2p (AnonUser)
Newsgroups: rocksolid.shared.linux
Subject: Re: Bash script to rename mp3/ogg files
Date: Sun, 17 Nov 2019 23:28:09 -0000 (UTC)
Organization: Rocksolid Light
Message-ID: <2720158f790e3122bdd53e2a82ead3ee$1@novabbs.com>
References: <f187c449ef1658147b4a8f515337ce64$1@rslight.i2p> <430f686b291737866dff2d448ccd9c55$1@novabbs.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 17 Nov 2019 23:28:09 -0000 (UTC)
Injection-Info: novabbs.com; posting-account="retrobbs1"; posting-host="localhost:127.0.0.1";
logging-data="14688"; mail-complaints-to="usenet@novabbs.com"
User-Agent: rslight (http://news.novabbs.com)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on novabbs.com
X-Rslight-Site: $2y$10$mtkulZuGL8Vdsoa7gmRSbuuaPeAz/riMuYnQuJTbS7yFIKgbUl33y
View all headers
wrong. that is sed ':a;N;$!ba;s/n//g')

with an  before the n
--
Posted on Rocksolid Light



Subject: Re: Bash script to rename mp3?ogg files
From: gue...@retrobbs.rocksolidbbs.com (Guest)
Newsgroups: rocksolid.shared.linux
Organization: Dancing elephants
Date: Sun, 17 Nov 2019 23:29 UTC
Path: i2pn2.org!.POSTED!not-for-mail
From: gue...@retrobbs.rocksolidbbs.com (Guest)
Newsgroups: rocksolid.shared.linux
Subject: Re: Bash script to rename mp3?ogg files
Date: Sun, 17 Nov 2019 18:29:18 -0500
Organization: Dancing elephants
Lines: 0
Message-ID: <qqsl4e$fet$1@i2pn2.org>
References: <430f686b291737866dff2d448ccd9c55$1@novabbs.com>
Reply-To: Guest <guest@retrobbs.rocksolidbbs.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 17 Nov 2019 23:29:19 -0000 (UTC)
Injection-Info: i2pn2.org; posting-account="def.i2p";
logging-data="15837"; mail-complaints-to="usenet@i2pn2.org"
User-Agent: FUDforum 3.0.7
X-FUDforum: 6666cd76f96956469e7be39d750cc7d9 <139478>
View all headers
sed ':a;N;$!ba;s/\n//g'
Posted on def3


Subject: Re: Bash script to rename mp3?ogg files
From: anonym...@def2.anon (anonymous)
Newsgroups: rocksolid.shared.linux
Organization: def2org
Date: Sat, 23 Nov 2019 21:50 UTC
Attachments: tag2name.sh.txt (text/x-shellscript)
Path: i2pn2.org!rocksolid2!def2!.POSTED.localhost!not-for-mail
From: anonym...@def2.anon (anonymous)
Newsgroups: rocksolid.shared.linux
Subject: Re: Bash script to rename mp3?ogg files
Date: Sat, 23 Nov 2019 21:50:47 -0000 (UTC)
Organization: def2org
Message-ID: <2194646d7e7af5d80aba2f41870748d1$1@def2.i2p>
References: <430f686b291737866dff2d448ccd9c55$1@novabbs.com> <qqsl4e$fet$1@i2pn2.org>
Mime-Version: 1.0
Content-Type: multipart/mixed;boundary="------------2D7B91D89218F6D0182BBE7B"
Injection-Date: Sat, 23 Nov 2019 21:50:47 -0000 (UTC)
Injection-Info: def2.org; posting-host="localhost:127.0.0.1";
logging-data="8631"; mail-complaints-to="usenet@def2.org"
View all headers
and an updated version. this one only deletes the orginal files once it is
secured thenew file is readable (for some reason the one the older
versions mv a good part of a subcollection to nirvana).

enjoy.
Posted on def2



Attachments: tag2name.sh.txt (text/x-shellscript)
1
rocksolid light 0.6.6
clearnet i2p tor