Commit graph

33 commits

Author SHA1 Message Date
Šarūnas Nejus
d93ddf8dd4
Do not use explicit indices for logging args when not needed 2025-08-30 23:10:21 +01:00
Šarūnas Nejus
7cada1c9f8
Remove no-op decargs 2025-07-08 11:37:33 +01:00
Šarūnas Nejus
85a17ee503
Reformat the codebase 2024-09-21 11:57:48 +01:00
Serene-Arc
83242fd7cf Apply formatting 2024-03-01 15:21:25 +10:00
Serene-Arc
a6e5201ff3 Apply formatting tools to all files
This is 'the big one', which touches every file so that it all conforms
to the given standard.
2023-10-22 09:53:18 +10:00
luzpaz
8419149c7a
Fix various typos 2023-08-09 21:26:15 -04:00
Tianon Gravi
6e434934d4 Remove completed TODO item 2021-10-30 11:19:21 -07:00
Tianon Gravi
9ddc75035a Fix duplicated output in "beet export" 2021-10-27 09:06:27 -07:00
Tianon Gravi
7bd36ed6ca Add "beet export --album" (matching "beet info --album") 2021-10-27 08:55:36 -07:00
Andrew Rogl
1ec87a3bdd pyupgrade beetsplug and tests
All tests working
More tidy up to be done
2021-08-26 19:12:51 +10:00
Sam Thursfield
2fa3717731 Optimise FormattedMapping when querying a specific set of fields
This changes greatly improves the speed of `beet export` and `beet info`
when the `--include-keys` option is used. It also removes the globbing
feature of `--include-keys` that was added in #1295. (See #3762 for
discussion).

Listing all fields for an item requires querying the database to find
any flex attributes. This is slow when done for every item being
exported. We already have a way for the user to specify a fixed set
of keys, but we previously queried everything and filtered it afterwards.
The new approach is more efficient.

Code that iterates through all fields now have to handle invalid field
names. The export and info plugins output invalid fields as None.

Timings before:

    > /usr/bin/time beet export -i title,path,artist -l  Bob Dylan
    13.26user 20.22system 0:34.01elapsed 98%CPU (0avgtext+0avgdata 52544maxresident)k

    > /usr/bin/time beet export -l  Bob Dylan
    12.93user 20.15system 0:33.58elapsed 98%CPU (0avgtext+0avgdata 53632maxresident)k

Timings after:

    > /usr/bin/time beet export -l  Bob Dylan
    13.33user 20.17system 0:34.02elapsed 98%CPU (0avgtext+0avgdata 53500maxresident)k

    > /usr/bin/time beet export -i title,path,artist -l  Bob Dylan
    0.49user 0.07system 0:00.56elapsed 98%CPU (0avgtext+0avgdata 50496maxresident)k

Notice the dramatic speedup in the last example!
2021-05-01 23:41:09 +02:00
Aksh Gupta
79858975a9 chore: refactor code quality issues 2021-03-11 08:45:42 +05:30
Sam Thursfield
d9582f4bea export: Add --format=jsonlines option
This adds support for the JSON Lines format as documented at
https://jsonlines.org/.

In this mode the data is output incrementally, whereas the other
modes load every item into memory and don't produce output until
the end.
2020-10-02 12:41:29 +02:00
Jef LeCompte
9f8bd4cd3f
style: flake8 linting 2020-05-25 20:06:43 -04:00
Jef LeCompte
0c3201930c
feat: added github actions
only working with linux for now. exact replica of travis basically.
should probably try to implement the rest of tox or deprecate some
functionality.
2020-05-25 19:35:15 -04:00
Austin Marino
7f6630c006 removed xml configs from doc and code 2019-10-15 14:16:23 -07:00
Austin Marino
eb6055eeca Cleaned up comments and code 2019-10-15 11:45:01 -07:00
Austin Marino
4251ff70dc updated the way in which xml is outputted 2019-10-15 00:15:45 -07:00
Austin Marino
0d818eced5 Ran test to ensure it works 2019-10-14 17:02:39 -07:00
Austin Marino
fa2c9ba259 Aligned export related code with flake8 standards 2019-10-13 11:36:33 -07:00
Austin Marino
ec705fae1e Updated documents and comments to reflcet recent code changes. Cleaned up code to better follow PEP-8 conventions and just work more efficiently all around. 2019-10-12 15:41:06 -07:00
Austin Marino
0e2c1e0d56 Made changes to reflect comments and suggestions made by sampsyo 2019-10-12 14:47:44 -07:00
Austin Marino
c31b488e54 Updated class fields to allow for easier unit testing 2019-10-10 19:35:49 -07:00
Austin Marino
a8a480a691 Updated config formats 2019-10-10 16:33:46 -07:00
Austin Marino
e5b43d4bf4 Extended the file type export options to include not only JSON but also XML and CSV 2019-10-09 00:52:49 -07:00
Carl Suster
546bf3af7e mediafile: import from standalone module 2019-05-29 09:35:14 +10:00
Jack Wilsdon
b1c58e99ec Update code to match pep8 naming standards 2016-04-27 20:15:10 +01:00
Guilherme Danno
228ffc91be use sort_keys to make the data more "predictable" 2016-04-17 23:47:12 -03:00
Guilherme Danno
5e3c65d32e change option letter 2016-04-17 23:37:51 -03:00
Guilherme Danno
10acea4efd Remove json monkey-patching and use encoder subclassing 2016-04-17 23:35:23 -03:00
Guilherme Danno
1e3704a27e fix NotImplementedError() 2016-04-17 21:52:09 -03:00
Guilherme Danno
c211aabd72 simplify json printing 2016-04-17 21:39:53 -03:00
Guilherme Danno
f58d4e838a Query data from items and export the json
Based on the ``info`` plugin
2016-04-17 18:26:17 -03:00