TINT: Difference between revisions

From tango.info wiki
Jump to navigation Jump to search
 
(28 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:identifiers]]
[[Category:Identifier]]
[[Category:tango.info]]
[[Category:Tango.info]]
[[Category:data]]
 
==Overview==
==Overview==
The TINT scheme is a [[TIN]]-based scheme for referencing individual tracks.
A TINT is a reference to one track of one side of one album, and is of the form:


A TINT is a reference to one track of one side of one album, and is of the form:
<nowiki><TINP><separator><Side#><separator><Track#></nowiki>
 
* [[TINP]] (14-digit number)
* Side# (decimal number without leading zeros)
* Track# (decimal number without leading zeros)
* separator (the separator character of choice)
 
== Examples ==
* 00008637207120-1-1 ("'''TINT hyphen-minus'''")
* 00008637207120.1.1 ("'''[[TINT dot]]'''")
* In [[TINT-based filing]] '''<tt>\</tt>''' or '''<tt>/</tt>''' is used ("TINT slash").
** for Unix/Linux: 00008637207120/1/1 ("TINT/" or "'''TINT forward slash'''")
** for Windows: 00008637207120\1\1 ("TINT\" or "'''TINT backslash'''")


  <nowiki><TIN><separator><Side#><separator><Track#></nowiki>
== Regex ==
It has the regex:
  ([0-9]{14})([\\/-])([0-9]{1,})([\\/-])([0-9]{1,})


* TIN: 14-digit number
Note: This regexp matches also non-TINT [[User:Chrisjjj|Chrisjjj]] 2010-08-09T19:42:27 (UTC)
* Side#: decimal number without leading zeros
* Track#: decimal number without leading zeros
* separator - the separator character of choice
**example: 00008637207120-1-1 ("TINT-dash")
**In [[TINT-based filing]] '''<tt>\</tt>''' or '''<tt>/</tt>''' is used ("TINT slash").
***example: 00008637207120/1/1 ("TINT/" or "TINT forward slash", for Unix/Linux)
***example: 00008637207120\1\1 ("TINT\" or "TINT backslash", for Windows)


==Storing TINT==
===TINT and tags===
===TINT and tags===
The components of TINT are usefully stored in the audio file tags, for example:
The components of TINT are usefully stored in the audio file tags, for example:
*TIN - stored in a custom sub-field of the Album field, e.g. '''King of Rhythm 1937-1944 [00008637207120]'''
*TINP - stored in a custom sub-field of the Album field, e.g. '''King of Rhythm 1937-1944 [00008637207120]'''
*Side# - stored in the particular format's equivalent field, as either the entire tag value or where the tag value is in two-part format, the first part e.g. the '''1''' in '''1/2''' for the first disc of a two-disc album. E.g.
*Side# - stored in the particular format's equivalent field, as either the entire tag value or where the tag value is in two-part format, the first part e.g. the '''1''' in '''1/2''' for the first disc of a two-disc album. E.g.
**[[FLAC]] (Vorbis comments): Discnumber  
**[[FLAC]] (Vorbis comments): Discnumber  
Line 26: Line 34:
**MP3 ([http://www.id3.org/id3v2.4.0-structure ID3V2.4]): [http://www.id3.org/id3v2.4.0-frames#line-305 TPOS]
**MP3 ([http://www.id3.org/id3v2.4.0-structure ID3V2.4]): [http://www.id3.org/id3v2.4.0-frames#line-305 TPOS]
*Track# - stored as normal in the format's Track Number field.
*Track# - stored as normal in the format's Track Number field.
* Foobar
** if barcode and discnumber are present, if no discnumber "1" is assmue
*** $num(%barcode%,14)-$num($max(1,%discnumber%),2)-%track%
** if barcode is there and discnumber is absent, assume discnumber "1"
*** $num(%barcode%,14)-$num($max(1,%discnumber%),2)-%track%
** if having in album name '''King of Rhythm 1937-1944 [00008637207120]'''
*** ToDo ? probably something like $left($right(%album%,15)),14)-$num($max(1,%discnumber%),2)-%track%, or search for [ and ] for a more advanced


===TINT and pathnames===
===TINT and pathnames===
TINT may be used as the basis of the track pathnames in in audio library. This allows standardisation across and within libraries, providing e.g. permanent references for playlists.
TINT may be used as the basis of the track pathnames in in audio library. This allows standardisation across and within libraries, providing e.g. permanent references for playlists.


See http://wiki.tango.info/mul/TINT-based_filing .
See [[TINT-based filing]]


==See also==
==See also==
* [[TINT-based filing]]
* [[TINT-based filing]]
* [[TIN]]
** [[TINT-based filing migration]]
* [[TINTed album labelling]]
* [[TINT playlist]]
* [[TINP]]
* [[Track containing multiple recordings]]
 
==From talk==
===TINT separators===
https://tango.info/x/wiki/w/index.php?title=TINT&diff=prev&oldid=13053
 
* now 341234134-1/1 is forbidden
* now 3419234823ü1ü1 is allowed
I would prefer the former method: allow mix, but show a set of separators. can maybe be extended. [[User:Tobiasco|Tobiasco]] 2008-04-10T00:23:43 (UTC)
 
* "now 341234134-1/1 is forbidden" - when was it ever not? [[User:Chrisjjj|Chrisjjj]] 2008-04-10T10:40:39 (UTC)
* "now 3419234823ü1ü1 is allowed" - when was it ever not? [[User:Chrisjjj|Chrisjjj]] 2008-04-10T10:40:39 (UTC)
 
===tools.tango.info/tagger===
... should except all TINT input formats. regex is needed for processing. It needs to extract three elements, TIN d# t#.
 
a try:
 
* [0-9]{13,14} * [-/\] * [0-9]{1,2} [-/\] [0-9]{1,4} * .[A-Za-z0-9]{2,8}$
 
[[User:Tobiasco|Tobiasco]] 2008-03-06T17:57:26 (UTC)
 
tagger now accepts
~^([0-9]{12,14}[\\\\/-][0-9]{1,}[\\\\/-][0-9]{1,})$~
 
more is needed
* root
* file extension.
* good would be to allow text, like in
**01234567890123_sometext/2/4_sometext.flac
**01234567890123-2_sometext/4_sometext.flac
* comments marked with #
maybe the regex could use groups and get TIN d# and t# out directly. IIRC php supports that.
 
try
~^([0-9]{12,14}[\\\\/-][0-9]{1,}[\\\\/-][0-9]{1,})$~
 
int preg_match  ( string $pattern  , string $subject  [, array &$matches  [, int $flags  [, int $offset  ]]] )
 
with 8 groups
~^([^0-9]){0,}([0-9]{12,14})([a-z_-]{0,})([\\\\/-])([0-9]{1,})(([_|-|a][0-9a-z_\.-]{0,}){0,})([\\\\/-])([0-9]{1,})(([_|-|a][0-9a-z_\.-]{0,})((.[a-zA-Z0-9]{1,8}){0,1})(([ ]{0,}#[a-zA-Z0-9]{1,}){0,1})$~
~^([^0-9]){0,}([0-9]{12,14})([a-z_-]{0,})([\\\\/-])([0-9]{1,})(([a-z_-][a-z_0-9-]{0,}){0,})([\\\\/-])([0-9]{1,})([a-z_-]{0,})((.[a-zA-Z0-9]{1,8}){0,1})(([ ]{0,}#[a-zA-Z0-9]{1,}){0,1})$~
~^([^0-9]){0,}([0-9]{12,14})([a-z_-]{0,})([\\\\/-])([0-9]{1,})([a-z_-]{0,})([\\\\/-])([0-9]{1,})(([_-][a-z_-]{0,}){0,})((.[a-zA-Z0-9]{1,8}){0,1})(([ ]{0,}#[a-zA-Z0-9]{1,}){0,1})$~
 
# non numeric root
# TIN
# text a-z_-
# seperator
# d#
# text a-z_-
# seperator
# t#
# text a-z_-
# file extension
# comment

Latest revision as of 2018-02-17T17:04:35


Overview

A TINT is a reference to one track of one side of one album, and is of the form:

<TINP><separator><Side#><separator><Track#>
  • TINP (14-digit number)
  • Side# (decimal number without leading zeros)
  • Track# (decimal number without leading zeros)
  • separator (the separator character of choice)

Examples

  • 00008637207120-1-1 ("TINT hyphen-minus")
  • 00008637207120.1.1 ("TINT dot")
  • In TINT-based filing \ or / is used ("TINT slash").
    • for Unix/Linux: 00008637207120/1/1 ("TINT/" or "TINT forward slash")
    • for Windows: 00008637207120\1\1 ("TINT\" or "TINT backslash")

Regex

It has the regex:

([0-9]{14})([\\/-])([0-9]{1,})([\\/-])([0-9]{1,})

Note: This regexp matches also non-TINT Chrisjjj 2010-08-09T19:42:27 (UTC)

Storing TINT

TINT and tags

The components of TINT are usefully stored in the audio file tags, for example:

  • TINP - stored in a custom sub-field of the Album field, e.g. King of Rhythm 1937-1944 [00008637207120]
  • Side# - stored in the particular format's equivalent field, as either the entire tag value or where the tag value is in two-part format, the first part e.g. the 1 in 1/2 for the first disc of a two-disc album. E.g.
  • Track# - stored as normal in the format's Track Number field.
  • Foobar
    • if barcode and discnumber are present, if no discnumber "1" is assmue
      • $num(%barcode%,14)-$num($max(1,%discnumber%),2)-%track%
    • if barcode is there and discnumber is absent, assume discnumber "1"
      • $num(%barcode%,14)-$num($max(1,%discnumber%),2)-%track%
    • if having in album name King of Rhythm 1937-1944 [00008637207120]
      • ToDo ? probably something like $left($right(%album%,15)),14)-$num($max(1,%discnumber%),2)-%track%, or search for [ and ] for a more advanced

TINT and pathnames

TINT may be used as the basis of the track pathnames in in audio library. This allows standardisation across and within libraries, providing e.g. permanent references for playlists.

See TINT-based filing

See also

From talk

TINT separators

https://tango.info/x/wiki/w/index.php?title=TINT&diff=prev&oldid=13053

  • now 341234134-1/1 is forbidden
  • now 3419234823ü1ü1 is allowed

I would prefer the former method: allow mix, but show a set of separators. can maybe be extended. Tobiasco 2008-04-10T00:23:43 (UTC)

  • "now 341234134-1/1 is forbidden" - when was it ever not? Chrisjjj 2008-04-10T10:40:39 (UTC)
  • "now 3419234823ü1ü1 is allowed" - when was it ever not? Chrisjjj 2008-04-10T10:40:39 (UTC)

tools.tango.info/tagger

... should except all TINT input formats. regex is needed for processing. It needs to extract three elements, TIN d# t#.

a try:

* [0-9]{13,14} * [-/\] * [0-9]{1,2} [-/\] [0-9]{1,4} * .[A-Za-z0-9]{2,8}$

Tobiasco 2008-03-06T17:57:26 (UTC)

tagger now accepts

~^([0-9]{12,14}[\\\\/-][0-9]{1,}[\\\\/-][0-9]{1,})$~

more is needed

  • root
  • file extension.
  • good would be to allow text, like in
    • 01234567890123_sometext/2/4_sometext.flac
    • 01234567890123-2_sometext/4_sometext.flac
  • comments marked with #

maybe the regex could use groups and get TIN d# and t# out directly. IIRC php supports that.

try

~^([0-9]{12,14}[\\\\/-][0-9]{1,}[\\\\/-][0-9]{1,})$~
int preg_match  ( string $pattern  , string $subject  [, array &$matches  [, int $flags  [, int $offset  ]]] )

with 8 groups

~^([^0-9]){0,}([0-9]{12,14})([a-z_-]{0,})([\\\\/-])([0-9]{1,})(([_|-|a][0-9a-z_\.-]{0,}){0,})([\\\\/-])([0-9]{1,})(([_|-|a][0-9a-z_\.-]{0,})((.[a-zA-Z0-9]{1,8}){0,1})(([ ]{0,}#[a-zA-Z0-9]{1,}){0,1})$~
~^([^0-9]){0,}([0-9]{12,14})([a-z_-]{0,})([\\\\/-])([0-9]{1,})(([a-z_-][a-z_0-9-]{0,}){0,})([\\\\/-])([0-9]{1,})([a-z_-]{0,})((.[a-zA-Z0-9]{1,8}){0,1})(([ ]{0,}#[a-zA-Z0-9]{1,}){0,1})$~
~^([^0-9]){0,}([0-9]{12,14})([a-z_-]{0,})([\\\\/-])([0-9]{1,})([a-z_-]{0,})([\\\\/-])([0-9]{1,})(([_-][a-z_-]{0,}){0,})((.[a-zA-Z0-9]{1,8}){0,1})(([ ]{0,}#[a-zA-Z0-9]{1,}){0,1})$~
  1. non numeric root
  2. TIN
  3. text a-z_-
  4. seperator
  5. d#
  6. text a-z_-
  7. seperator
  8. t#
  9. text a-z_-
  10. file extension
  11. comment