forked from wolkenarchitekt/traktor-nml-utils
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
66 lines (41 loc) · 1.4 KB
/
README
File metadata and controls
66 lines (41 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
Traktor NML utils
=================
This module contains utilities to parse and modify Native Instruments
Traktor NML files. It was created to be the by far best available
library to handle Traktor collections.
It can parse collection files (``$TRAKTOR_DIR/collection.nml``) and
history files (``$TRAKTOR_DIR/History/history_$DATE.nml``).
You can deal with all XML data in the most Pythonic way.
Requirements
------------
Because traktor-nml-utils uses ``dataclasses``, you need at least Python
3.7.x.
Installation
------------
.. code:: shell
pip install --user git+ssh://[email protected]/ifischer/[email protected]
Usage
-----
.. code:: python
from traktor_nml_utils import TraktorCollection
collection = TraktorCollection('collection.nml')
for entry in collection.entries:
print(entry)
for history_item in collection.history:
print(history_item)
for playlist in collection.playlists:
print(playlist)
Run tests
---------
Run tests within Docker container:
.. code:: shell
make build test
Tutorials
---------
Get artist, title and rating of all collection entries
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. code:: python
from traktor_nml_utils import TraktorCollection
collection = TraktorCollection('collection.nml')
for entry in collection.entries:
print(f'{entry.artist} - {entry.title} ({entry.ranking}')