Ptag 0.9.6 (2019-10-12)

Audio editors, music players, video players, burning software, etc.
Message
Author
plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#16 Post by plinej »

updated to 0.1.6, added sc0ttman's contributions with a little tweak.

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#17 Post by plinej »

0.2 is up. Added support for flac via metaflac. The extra "Field" & "Tag" spaces are for you to put in your own fields that aren't in the gui. If a flac file is already tagged with extra fields not defined in the gui they will be displayed in those extra fields (the first 14 anyway).

Still plan on ogg vorbis & ape support next. Possibly some others as well. I won't be around much for the next week so this will probably be the last update for at least a week. Possibly a quick bug fix tomorrow if anyone finds a bug but otherwise no more updates.

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#18 Post by plinej »

0.3 is up. This version adds support for ogg. Next I'll work on ape & musepack support via apetag.

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#19 Post by plinej »

0.4 is up. Added support for Monkey's Audio (ape) & Musepack (mpc & mpp) via apetag.

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#20 Post by plinej »

0.4.1 bugfix is up. I had the code messed up in /usr/local/ptag/ptag-files

I'm working on adding true type audio next.

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#21 Post by plinej »

0.5 is up.

support for True Type Audio (tta) format via the same tools as mp3.

support for Shorten (shn), Optimfrom (ofr & ofs), & Wavpack (wv) via apetag.

Next step is adding support for replay gain.

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#22 Post by plinej »

updated to 0.6

added support for replay gain via:

metaflac
wvgain
mp3gain
vorbisgain
aacgain
mpcgain

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#23 Post by plinej »

updated to 0.7.

Support for adding artwork to ogg files. Neither vorbiscomment nor oggz-comment will directly add artwork, you need to convert the picture to base64 first. After searching google and thru quite a bit of trial and error, I was able to get it working. Easytag creates 3 fields when adding artwork to an ogg file:

COVERARTDESCRIPTION : the name of the jpg/png file
COVERARTMIME : the mime type of the image file
COVERART : the base64 encoded data of the image file

After reading up on this at:
http://wiki.xiph.org/VorbisComment#Unof ... recated.29
I found that the COVERART field is deprecated and METADATA_BLOCK_PICTURE is to be used instead. Ptag will convert an existing COVERART field to METADATA_BLOCK_PICTURE. The only down side is that if you use Easytag afterwards you won't see the attached image. I also wrote a script and named it <oggart> that will add artwork to an ogg file and allow you to use the old COVERART for Easytag compatibility or use the new way (default).

Code: Select all

# oggart /path/to/file.ogg /path/to/jpg-or-png
for Easytag compatibility:

Code: Select all

# oggart /path/to/file.ogg /path/to/jpg-or-png -e
the script:

Code: Select all

#!/bin/sh

FILE1="`basename \"$1\"`"
EXT1=${FILE1##*.}
EXTTYPE1=`echo $EXT1 | tr '[:upper:]' '[:lower:]'`

FILE2="`basename \"$2\"`"
EXT2=${FILE2##*.}
EXTTYPE2=`echo $EXT2 | tr '[:upper:]' '[:lower:]'`

OGG=""
if [ "$EXTTYPE1" = ogg ]; then
OGG="$1"
elif [ "$EXTTYPE2" = ogg ]; then
OGG="$2"
fi
if [ "$OGG" = "" ]; then
echo no ogg file selected
exit 0
fi

PIC=""
array=(jpeg jpg png)
for item in ${array[*]}
do
if [ "$item" = "$EXTTYPE1" ]; then
PIC="$1"
elif [ "$item" = "$EXTTYPE2" ]; then
PIC="$2"
fi
done
if [ "$PIC" = "" ]; then
echo no jpg or png file selected
exit 0
fi

if [ "$3" = -e ]; then
EASYTAG=Y
else
EASYTAG=N
fi

DESC=`basename "$PIC"`
APIC=`base64 --wrap=0 "$PIC"`
if [ "`which exiv2`" != "" ]; then
MIME=`exiv2 "$PIC" | grep 'MIME type ' | sed 's/: /|/' | cut -f 2 -d '|' | tail -n 1`
fi
if [ "$MIME" = "" ]; then
MIME="image/jpeg"
fi

vorbiscomment -l "$OGG" | grep -v '^COVERART=' | grep -v '^COVERARTDESCRIPTION=' | grep -v '^COVERARTMIME=' | grep -v 'METADATA_BLOCK_PICTURE=' > "$OGG".tags

if [ "$EASYTAG" = N ]; then
echo METADATA_BLOCK_PICTURE="$APIC" > "$OGG".tags2
else
echo COVERART="$APIC" > "$OGG".tags2
fi
vorbiscomment -w -R -c "$OGG".tags2 "$OGG"
vorbiscomment -a -R -t COVERARTDESCRIPTION="$DESC" "$OGG"
vorbiscomment -a -R -t COVERARTMIME="$MIME" "$OGG"
vorbiscomment -a -R -c "$OGG".tags "$OGG"

rm -f "$OGG".tags
rm -f "$OGG".tags2
ptag does not call this script but I thought it may be useful to someone.
Attachments
oggart.tar.gz
(685 Bytes) Downloaded 968 times

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#24 Post by plinej »

updated to 0.8.

User avatar
str4y
Posts: 42
Joined: Mon 01 Aug 2011, 22:59
Location: No. California
Contact:

#25 Post by str4y »

Just wanted to thank ye for all the .pet work in the lossless audio space.. and CLI no less, which is where I prefer to operate. Buried in the flow, you might've not seen my little script shn2flac which I posted in the Lucid526 thread:
http://murga-linux.com/puppy/viewtopic. ... 705#549705

.. terribly simplistic but didn't know of any such script out there, and I have occasion to make the conversion often.
Going forward, I'd be interested to see how you could fare going about linking all the metadata tagging into & out of .k3b files.. the only way I burn on Linux! Also, you might strive for an equivalent or better of TLH... very common across the net amongst window$ types who are trading lossless.. stands for Traders' Little Helper and combines various functions.
Last edited by str4y on Thu 15 Sep 2011, 00:01, edited 1 time in total.
[size=75]laptop.pet: [url]http://www.murga-linux.com/puppy/viewtopic.php?p=550279[/url]
K3B-1.0.5 self-contained .pet [url]http://www.murga-linux.com/puppy/viewtopic.php?t=71862[/url]
:oops: bitcoin: [url]http://xmail.net/str4y/bitcoin/[/url][/size]

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#26 Post by plinej »

What do the .k3b files consist of? I haven't used K3B in years. I do have a Windows partition that I ever so rarely boot in to, I'll have to check out Trader's Little Helper. I have yet to use it but know of quite a few people who do.

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#27 Post by plinej »

updated to 0.8.1

just a couple of minor bug fixes and another command line option.

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#28 Post by Flash »

Plinej, thanks for all the work you're doing with Ptag. :)
I tried Ptag several versions ago but couldn't find the time to write this until now.

I needed to add the file number, author and book name to the tag of every mp3 file of an audio book, so I could see what book I was listening to in my mp3 player. Ptag did this exactly as advertised, but required me to click the Enter key for every file. The average audio book has probably 200 mp3 files, so it takes 200 clicks of the Enter key to edit the tags of every file in the book. Is there a way, that I missed, to have Ptag automatically change all the files in a directory? Sort of a batch tag edit? Just show it file number 001 - 200 or whatever, tell it what to put in the tag fields, click go and it would go until it had done all 200 (or whatever) files in the directory.

Some books by Brilliance audio have over 900 files because Brilliance puts 99 tracks on each CD (the legal limit,) but all other audio books have a more reasonable 20 tracks per CD, so audio books with more than 400 files are rare.

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#29 Post by plinej »

@ Flash, I never thought about that but I think I could implement something rather easily.

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#30 Post by plinej »

Flash, I don't think I want to add that capability to the gui but I made a simple script that will do what you're requesting using ptag's cli options. First of all, you need to open the first audio file in ptag and tag the file with whatever you'd like. Then open the file again and click the "dump" button which will create a .ptag file in the same directory, or from the cli you can type: <ptag NAMEOFAUDIOFILE -ptag>. For the next step you'll need to extract the attached script and put it in your $PATH. Go to the command line, cd into the directory your ptag and audio files are, and type:

Code: Select all

tagdir NAMEOFPTAGFILE.ptag
Of course NAMEOFPTAGFILE needs to be the actual name of the file. This will tag all the same type of audio files with the fields in the ptag file.

Tracknumber field will be increased by one for each file.

You need to have at least version 0.8.1 of ptag for this script to work.
Attachments
tagdir.tar.gz
(525 Bytes) Downloaded 424 times

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#31 Post by plinej »

updated to 0.8.2

Just a small bug fix.

I also created some audio conversion scripts to use with ptag which will convert and retain the tags.

http://www.murga-linux.com/puppy/viewtopic.php?t=70882

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#32 Post by plinej »

updated to 0.8.3

a couple of minor bug fixes

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#33 Post by plinej »

updated to 0.9

cleaned up the code and internationalized with an English mo file.

Code: Select all

#English

L0="you must install"
L1=Title
L2=Artist
L3=Performer
L4=Album
L5=Track
L6=Total
L7=Disc
L8="Disc ID"
L9=Date
L10=Genre
L11=Comment
L12=Composer
L13=Lyricist
L14=Publisher
L15=Copyright
L16="Add replay gain to tag?"
L17="select ptag to tag file with"
L18="Select ptag"
L19="Extra Tagging Fields"
L20=Field
L21=Tag
L22="extract tags to file"
L23=dump
L24=info
L25="Kill this program and do not update this file, or any other files"
L26=Kill
L27="Do not update this file, will skip to the next file if one was given"
L28="Exit/Skip"
L29="Update the tags for this file"
L30="does not exist"
L31=tagged
L32="added replay gain to"
L33="Are you sure you want to delete the artwork?"
L34=No
L35=Yes
L36="Alphanumeric entries"
L37="Encoding Tool"
L38=Grouping
L39=Description
L40=Category
L41=Keyword
L42="Purchase Date"
L43="TV Network"
L44="TV Show Name"
L45="TV Episode"
L46="Album Artist"
L47="Select Artwork to add jpg/png"
L48="Select artwork"
L49=remove
L50=extract
L51=view
L52="Numeric entries"
L53=Year
L54="Tempo/BPM"
L55="Gapless playback"
L56="TV Season Number"
L57="TV Episode Number"
L58="true/false entries"
L59=Compilation
L60="Podcast flag"
L61="Choice entries"
L62=Advisory
L63=Stik
L64="URL entries"
L65="Podcast URL"
L66="Podcast GUID"
L67="keep tags"
L68="remove tags"
L69="view/add lyrics"
L70=help
L71=Extra
L72="view extra tags not in gui"
L73="Extra iTunes tags"
L74=Exit
L75=OK
L76="File info"
L77="Artwork options"
L78="Attached Artwork"
L79="Extra Tagging Fields"
L80=either
L81="Cover Art Description"
L82="Cover Art Mime"
L83="Select your directory or single file"
L84="Select a directory"
L85="or select a single file"
L86="Select an Existing File"
L87="Copy tag from one file to the next?"
L88="Check for yes"
L89=QUIT

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#34 Post by plinej »

version 0.9.1 is up

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#35 Post by sc0ttman »

I made this one, help from Google, but lots of changes from me - so it could be really bad ;) (Sorry)

Code: Select all

# German

L0="Sie installieren müssen" 
L1=Titel 
L2=Musiker 
L3=Künstler 
L4=Album 
L5=Musikspur 
L6=Total 
L7=Disc 
L8="Disc-ID" 
L9=Datum 
L10=Genre 
L11=Kommentar 
L12=Komponist 
L13=Lyricist 
L14=Verleger 
L15=Copyright 
L16="Add Replay Gain zu Tag?" 
L17="select Ptag eine Datei mit dem Stichwort" 
L18="Wählen Sie Ptag" 
L19="Extra Tagging Fields" 
L20=Eintrag 
L21=Audio-Tag 
L22="Extrahieren von Audio-tag in die Datei" 
L23=Dump 
L24=info 
L25="Kill diesem Programm und nicht aktualisieren Sie diese Datei, oder beliebige andere Dateien" 
L26=Tötet 
L27="Nicht aktualisieren Sie diese Datei, wird die nächste Datei zu überspringen, wenn man bekam" 
L28="Abbrechen / Weiter" 
L29="Update der tags for this file" 
L30="existiert nicht" 
L31=getaggt 
L32="Replay Gain hinzugefügt" 
L33="Sind Sie sicher, dass Sie das Kunstwerk wirklich löschen?" 
L34=Nein 
L35=Ja 
L36="Alphanumerische Eingaben" 
L37="Encoding-Hilfswerkzeug" 
L38=Gruppierung 
L39=Beschreibung 
L40=Kategorie 
L41=Stichwort 
L42="Purchase Date" 
L43="TV Network" 
L44="TV Show Name" 
L45="TV Episode" 
L46="Album-Interpret" 
L47="Wählen Artwork auf jpg / png add" 
L48="Wählen Kunstwerk" 
L49=entfernen 
L50=extrakt 
L51=sehen 
L52="Numerische Eingaben" 
L53=Jahr 
L54="Tempo / BPM" 
L55="Lückenlose Wiedergabe" 
L56="TV Saison Nummer" 
L57="TV Serial Nummer" 
L58="wahr / falsch Einträge" 
L59=Kompilation 
L60="Podcast flag" 
L61="Choice Einträge" 
L62=Advisory 
L63=Stik 
L64="URL-Einträge" 
L65="Podcast-URL" 
L66="Podcast GUID" 
L67="halten Sie Audio-Tags" 
L68="löschen Audio-Tags" 
L69="sehen / anfügen Texte" 
L70=hilfe 
L71=Extra 
L72="view zusätzlichen Tags nicht in gui" 
L73="Extra iTunes tags" 
L74=Exit 
L75=OK 
L76="Datei-Info" 
L77="Artwork-Optionen" 
L78="Attached Artwork" 
L79="Extra Tagging Fields" 
L80=entweder 
L81="Cover Art Beschreibung" 
L82="Cover Art Mime" 
L83="Wählen Sie Ihr Verzeichnis oder einzelne Datei" 
L84="Wählen Sie ein Verzeichnis" 
L85="oder wählen Sie eine einzelne Datei" 
L86="Wählen Sie eine bestehende Datei" 
L87="Copy-Tag von einer Datei zur nächsten?" 
L88="für ja Check" 
L89=QUIT 
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

Post Reply