www.archive-org-2014.com » ORG » R » RADBOX

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".

    Archived pages: 13 . Archive date: 2014-01.

  • Title: beets: the music geek’s media organizer
    Descriptive info: .. Beets is.. the media library management system for obsessive-compulsive music geeks.. Beets is the media library management system for obsessive-compulsive music geeks.. The purpose of beets is to get your music collection right once and for all.. It catalogs your collection, automatically improving its metadata as it goes using the.. MusicBrainz.. database.. Then it provides a bouquet of tools for manipulating and accessing your music.. Because beets is designed as a library, it can do almost anything you can imagine for your music collection.. Via.. plugins.. , beets becomes a panacea:.. Fetch or calculate all the metadata you could possibly need:.. album art.. ,.. lyrics.. genres.. tempos.. ReplayGain.. levels, or.. acoustic fingerprints.. Get metadata from.. Discogs.. , or.. Beatport.. Or guess metadata using songs filenames or their acoustic fingerprints.. Transcode audio.. to any format you like.. Check your library  ...   shockingly simple if you know a little Python.. Install beets by typing.. pip.. install beets.. You might then want to read the.. Getting Started.. guide.. Then follow.. @b33ts.. on Twitter for updates.. Get Beets.. Install with.. by typing.. pip install beets.. , then read the.. Project.. github.. bitbucket.. documentation.. FAQ.. bug tracker.. mailing list.. blog.. atom.. #beets on freenode.. log.. Blog.. September 2:.. flexible attributes, in which schemaless and schemaful coexist peacefully.. February 28:.. moving from Google Code to GitHub: a horrible, ultimately rewarding odyssey.. January 4:.. your musical year in review.. all posts.. News from @b33ts.. Tweets by @b33ts.. Contact.. Contact.. the mailing list.. for help.. Or email.. Adrian Sampson.. with comments, questions, and fan mail.. You can.. donate with PayPal or Amazon.. , but please consider a donation to.. unPAC.. instead.. Thanks!.. tweet beets.. Fork me on GitHub..

    Original link path: /
    Open archive

  • Title: beets: blog
    Descriptive info: The beets blog.. This is the weblog for.. beets.. , an open-source music management system by.. It consists of announcements about the project, guides to doing fancy stuff with beets, and technical articles about Python and music-related development.. Subscribe to the feed.. You should also follow.. on Twitter, where smaller project updates are posted more frequently..  ...   rescheduling 1.. 0.. October 6, 2012:.. the end of Twitter syndication is nigh.. September 9, 2012:.. beets and Python 3.. August 24, 2012:.. the SQLite lock timeout nightmare.. August 17, 2012:.. the road to 1.. August 3, 2012:.. Tomahawk resolver.. August 1, 2012:.. beets has a new blog.. This is Beets.. Watch a screencast.. to learn more..

    Original link path: /blog/
    Open archive

  • Title: beets: flexible attributes, in which schemaless and schemaful coexist peacefully
    Descriptive info: The beets blog: flexible attributes, in which schemaless and schemaful coexist peacefully.. Since.. the beginning.. , beets has been conceptually built around an object field data model.. Your library is made up of.. item.. objects, which represent audio files, and each item has a bunch of.. fields.. corresponding to tags on those files: artist, title, and year, for example.. Over the years, beets has grown to support a long.. list of fields.. : by my count, we currently support 59.. We ve used an informal policy of adding almost every reasonable field that a user requests.. But even this liberal approach can be too constricting: adding a new field at least requires getting the attention of a developer and then waiting for another beets release to roll around.. But what if users could add any field they could think of, without needing to rely on changes to beets itself? Decoupling the list of fields from the beets schema would enable awesome new use cases, great new plugins that aren t possible today, and even simplify the development of some.. oft-requested features.. Flexible Attributes.. The next version of beets, 1.. 3, overhauls the internals to support.. flexible attributes.. (affectionately known as flexattrs).. You re no longer constrained to the fields that beets ships with: you can now store information in.. any field name at all.. For example, maybe you d like to start classifying your music based on its.. mood.. Even though beets itself doesn t use a.. field, you can set it on your music using the.. modify.. command:.. $ beet modify mood=sexy artist:miguel.. Then, later, if you want to see all your music whose mood is sexy, just use the.. list.. $ beet ls mood:sexy.. This is exciting enough on its own you can classify music based on any criteria you can think of but it also means many more possibilities for plugins in the future.. (.. Here.. a.. are.. few.. ideas.. ).. How it Works.. I procrastinated for a long time in implementing flexible attributes because a clean, maintainable implementation was surprisingly tricky to get right.. (This post is going to get a little nerdy from here on out; if you re interested in the technical details, read on.. As background, beets libraries are stored in.. SQLite.. databases.. The schema is simple: there s an.. items.. table and an.. albums.. table, and each field is a column on these tables.. To support flexattrs, I initially considered switching to a schema-free database:.. abusing SQLite as a key value store.. serializing the whole database to JSON.. LevelDB.. , or the like.. With the help of other developers, however, I eventually realized that we could tack on flexible attributes alongside the existing.. fixed.. attributes and minimize the disruption.. Here s what it looks like from a developer  ...   but it s probably not much slower if at all than the complex JOIN on the flexattr table that would otherwise be required.. To support flexattr queries, beets now classifies all queries into.. fast.. slow.. queries.. As always,.. Query.. objects have a.. clause().. method that returns the SQLite.. WHERE.. expression that evaluates them and a.. match(item).. method that returns a boolean indicating whether a particular item passes the query.. With the flexattr changes, the.. method can now return.. None.. , indicating that the query is.. and cannot be evaluated in SQLite.. The library then falls back to one-at-a-time predication.. This fast/slow distinction also had the knock-on effect of simplifying the way beets handles special queries like.. regexes.. fuzzy matching.. These query types can t easily be written in SQLite, so they re implemented as Python predicates.. Previously, to shoehorn everything into a SQLite query, we had to.. register.. a Python function as a callback.. and then name the function in the.. result.. Crossing the Python/C barrier is not great for performance, so sticking to SQLite queries here was likely not buying us much.. Now, any query involving a complex predicate implemented in Python is just evaluated using the slow path eliminating the need for callback registration.. Next Steps.. I m happy with the overall design for flexible attributes, but there s a laundry list of things we can do better with over time:.. Ideally, it should be easy to promote a flexible attribute to a built-in fixed attribute.. This almost works already, but we ll need a way to transparently move the data from the flexattr tables to the main.. album.. tables.. We can cross this bridge when some field eventually needs migration.. A query that matches on both a fixed attribute and a flexible attribute, like.. artist:miguel mood:sexy.. , is currently classified as slow any slow component makes the whole query slow.. This could be optimized by matching the fast component in SQLite and then filtering on the slow component in Python.. In general, we need to measure the performance of this feature to see whether optimizations like this are necessary.. I m not ruling out an eventual move to a completely schema-free design, perhaps using a simple key value store like.. or a putative.. SQLite4.. Eliminating the distinction between the two types of attributes will pay off in simplicity.. Beets needs a system for specifying value types.. Currently, we have an ad-hoc data type classification that, for example, knows to print bitrates in KHz and track numbers with zero padding.. We need a more principled way to specify conversions to and from strings at the same time, we should let plugins specify this type information for attributes they define.. Have comments or questions?.. Send me an email.. , tweet at.. discuss on Hacker News..

    Original link path: /blog/flexattr.html
    Open archive

  • Title: beets: moving from Google Code to GitHub: a horrible, ultimately rewarding odyssey
    Descriptive info: The beets blog: moving from Google Code to GitHub: a horrible, ultimately rewarding odyssey.. The beets project began on May 14, 2008 with my first commit to a Subversion repository.. On that day,.. GitHub.. was.. four days old.. Had I known of GitHub then, I never would have started the project on Google Code.. But I didn t, so I did, and it s been a hell of a time gradually moving the project over.. Moving the code was easy and happened earliest.. (The repository is also mirrored.. on BitBucket.. as a Mercurial repo.. ) The wiki was its own ordeal and required manual conversion from Google Code s proprietary wiki syntax to Markdown (thanks, vim macros).. But I procrastinated on the hardest part: the issues.. Today, I finally moved that last puzzle piece over.. While I m excited to finally move from an aging, neglected issue tracker to a shiny, well-supported new thing, the process probably could not have been more painful.. Here are some tips for other open-source projects looking to make the same transition.. Start early! This was only made more painful by having more than 500 issues in the Google Code tracker.. I wish I had not procrastinated so long.. Use the handy, hacky.. google-code-issues-migrator script.. by @arthur-debert on GitHub.. But be aware that this project suffers from a peculiar kind of tragedy of the commons.. Everybody needs this script.. once.. but no one is motivated to maintain it long term.. So take a look at the repository s.. forks.. and choose one by a reasonably recent pilgrim.. Here s mine.. As messy as the code and the network of forks is, this little cottage industry is an  ...   us because the issues in the old tracker are old and have lots of comments, some of which are totally irrelevant.. The original report text is also not usually very relevant out of context (although the title usually is).. I changed the script to only migrate labels that have a configured mapping since I ve resolved to fiddle with labels less and use a simpler organization scheme.. Here s the worst part: since there s no way to avoid creating each issue in turn, GitHub is going to send an email for every new issue that gets copied over.. There s no awesome way to get around this; you ll just have to apologize to all your repository s watchers.. (I tried temporarily removing all the repository collaborators, but this does not, unfortunately, unsubscribe them.. I did, however, use a temporary user to do the migration instead of my main account.. This helped avoid cluttering my history with 89 different created issue events.. Since I deleted that user, the migrated issues are now marked as having been created by a cute little.. ghost.. Finally, Google code lets you replace a project tab with a wiki page.. I used this to.. redirect users to the GitHub issue tracker.. Fortunately, this does not prevent access to old issues (which are linked from GitHub).. As unpleasant as it was (as I write this, I m.. still.. deleting straggling notification spam), I recommend moving from Google Code to GitHub Issues.. This is an observation that s been made umpteen times before, but I remember when Google Code was an incredible relief from the antiquated and convoluted SourceForge and this move has been every bit as satisfying..

    Original link path: /blog/github-issues.html
    Open archive

  • Title: beets: your musical year in review
    Descriptive info: The beets blog: your musical year in review.. Against my better judgment, I tend to think of music in years.. Some part of me feels like it understands music better in the context of its time what other bands were doing contemporaneously, the year s major headlines, and, most importantly, the phase of my life when I first heard an album I love.. It s the same instinct that, over the last few weeks, has flooded the Web with top-.. N.. lists.. Even if I never write it down, I find myself making a list each winter of the best albums of the year.. I m not a music critic, but in January, I sometimes wish I were: as utterly subjective as my yearly mental list is, it helps me close the books on 2012 and file its music away in my memory before moving on to 2013 s releases.. Here s how beets can help you with your own retrospective.. First and foremost, you probably want to see a list of all your albums that were  ...   release dates.. Since most albums in.. have release months and years, we can sort these albums by date:.. $ beet ls -af $month-$day $albumartist - $album year:2012 | sort -n.. That query helps me replay the year from start to finish when thinking about each album.. This kind of flexible collection browsing is one of the reasons I originally started building beets.. I hope it helps you look back over the music of 2012.. My Favorites.. For whatever it s worth, here s a sort, predictable list of some albums I remember fondly from last year, copied n pasted out of my terminal window in no particular order:.. alt-J - An Awesome Wave.. Passion Pit - Gossamer.. Santigold - Master of My Make-Believe.. Jack White - Blunderbuss.. Dirty Projectors - Swing Lo Magellan.. How to Dress Well - Total Loss.. Miguel - Kaleidoscope Dream.. Bob Mould - Silver Age.. Kendrick Lamar - good kid, m.. A.. d city.. Macklemore Ryan Lewis - The Heist.. Everyone should clearly love all of these records as much as I do..

    Original link path: /blog/musical-year.html
    Open archive

  • Title: beets: donate
    Descriptive info: Donate to beets.. Thanks for considering donating to the beets project.. I truly appreciate your support.. Charities.. These are some organizations doing work that is even more important than music organization software.. They need support more than I do.. Corporate Accountability International.. Human Rights Campaign.. PayPal.. Just hit the Donate button to head to PayPal s site.. Gittip.. Set up a weekly, anonymous tip.. on Gittip.. Amazon Payments.. Enter an amount in US Dollars and hit the Donate button.. $.. Flattr.. Make a micro-donation by hitting the Flattr button..

    Original link path: /donate.html
    Open archive

  • Title: beets: rescheduling 1.0
    Descriptive info: The beets blog: rescheduling 1.. I.. blogged previously.. that beets would see two more betas 16 and 17 before hitting 1.. The first upcoming beta version would include a complete overhaul of the configuration system.. Since that post in August, something awesome has happened: the beets community has contributed an collection of.. new features and fixes.. to beets, including:.. The.. Convert.. plugin for transcoding and embedding album art in copies.. A convenient.. Fuzzy Search.. plugin.. The aptly-named.. The.. plugin, which helps format strings for sorting.. A.. Zero.. plugin for nulling out certain fields.. The new.. IHate.. plugin to help you skip over albums.. A completely rewritten and more  ...   on concurrently under the.. confit branch.. But, at this point, it would be unwise to unleash all these great new contributed features in the same release as the major refactoring that.. Confit.. entails.. So the release schedule is changing.. The current development version will become 1.. 0 RC 1 in the next few days.. After a testing period, we ll release 1.. At this point, the Confit branch will be developed as 1.. 1.. This will let us fix bugs in the stable version of beets while we polish up 1.. 1 as the next major version.. To summarize: 1.. 0 very soon; Confit right after that.. Here goes!..

    Original link path: /blog/rescheduling.html
    Open archive

  • Title: beets: the end of Twitter syndication is nigh
    Descriptive info: The beets blog: the end of Twitter syndication is nigh.. Since before beets had a.. real blog.. of its own, I ve been using the.. Twitter account as a simple, zero-effort way to make announcements about the project and keep users up to date.. Most of the news that comes out of a small open-source project like beets doesn t warrant a full blog post, so 140-character summaries are usually enough.. And the shorter format encourages me to post more often.. I ve also always syndicated the Twitter feed to.. beets homepage.. (you can see it on the right hand side there).. I like having the latest news from Twitter up there to show visitors that beets, unlike so many other open-source projects, is under active development.. And returning users get to see what s new at a glance without my needing to cross-post to the blog.. With.. Twitter s new API restrictions.. , this kind of syndication is no longer possible.. Twitter is exerting more control over how tweets are displayed and this news feed violates the new display requirements.. I m not shocked by this development.. In fact, it always surprised me that this use case was allowed  ...   post with the many.. awesome Twitter clients.. out there and I m sure users want to see updates in their streams, so I will keep using the @b33ts account.. But the news feed on the homepage is also too useful to give up.. Here are the alternatives I know of:.. Use Twitter s new.. official widgets.. These widgets are large, clunky, and image-laden I m not sure where Twitter intends these to be used (.. MargaretAtwood.. ca.. , I guess?), but it s certainly not in a sidebar element.. (The old twitter widgets, which featured a less visually intrusive design,.. are deprecated.. Cross-post.. Twitter s new rules restrict how you get data.. out.. of Twitter not how you.. add.. data to Twitter.. This means that I could microblog (is that still a word?) somewhere else on.. GitHub Pages.. , say and run a cron job to post.. those.. updates to Twitter.. Syndicate in, not out.. Tent.. App.. net.. , I guess?.. None of these are as simple as my current setup with Twitter.. Do you have a better idea for maintaining this use case? Please.. send me email.. or if you re not too bitter about it yet tweet at..

    Original link path: /blog/twitter.html
    Open archive

  • Title: beets: beets and Python 3
    Descriptive info: The beets blog: beets and Python 3.. Python 3.. is the future.. Every day, it seems, I come across a Python 3 feature that I wish I could use in beets (to name a few:.. lru_cache.. yield from.. working namespace packages.. , and my own patch,.. aliases in argparse.. ).. And with the release of.. 3.. imminent, I think the age of widespread adoption is nearly here.. So when will beets move to Python 3? As with so many other projects, beets transition is blocked on its dependencies.. Before we can make the jump, all of these libraries, which are required by beets core or its included plugins, need to go first:.. Mutagen.. , the audio tag manipulation library.. This is beets main barrier Mutagen is an integral part of beets; it will be complex to port due to its Unicode-related logic; and I have no intention of switching to a different library (.. TagLib.. being the only viable alternative I know of).. Munkres.. , a bipartite matching solver.. Should be a straightforward port.. python-musicbrainz-ngs.. , bindings to the.. API.. I and the other contributors to this library have been moving toward Python 3 compatibility for some time.. pyacoustid.. audioread.. support beets acoustic fingerprinting plugin.. I wrote  ...   and.. Bluelet.. ) are already compatible.. The principal blockers, then, are Mutagen and Flask.. The remaining dependencies either have clear upgrade paths or are simple enough that I should be able to contribute compatibility patches back to them.. But Mutagen and Flask are too complex (and popular) to make a unilateral porting effort feasible.. This means that, if you want to help bring beets to Python 3, the best place to start is with porting Mutagen.. In the meantime, I m writing beets to be as.. forward-compatible.. as possible.. An eventual port will still be a headache due to the need to.. explicitly manage.. a distinction between Unicode and raw-bytes path names but I m excited to do the work as soon as it s feasible.. When the leap does eventually happen, I plan to leave Python 2 behind entirely.. Beets is not widely used as a library (.. Headphones.. is the only dependent I m aware of) and most Linux distributions these days ship with some version of Python 3.. Going 3-exclusive will make maintaining beets bytes/Unicode distinction much simpler.. While beets will almost certainly not make the Python 3 leap until after.. 1.. , that day is not as distant as it might seem at first..

    Original link path: /blog/py3k.html
    Open archive

  • Title: beets: the SQLite lock timeout nightmare
    Descriptive info: The beets blog: the SQLite lock timeout nightmare.. Software has bugs.. There are little bugs: the.. beets release notes.. are saturated with them.. And then there are the monstrous, enormous bugs: the kind that follow you from version to version, from year to year.. This is a story about one of those bugs.. It existed in eleven releases of beets over almost two years.. The problem stuck around for so long because it seemed to manifest exclusively on other people s machines.. Until the day I finally fixed it, I never reproduced the bug once on my own box.. Here s what the bug looked like to users who experienced it: beets is running along normally, happily chewing through your multi-terabyte music collection and making corrections.. Then, seemingly at random, it crashes and spits out:.. sqlite3.. OperationalError: database is locked.. This is particularly frustrating because there s no correlation at all between what you do as a user and when this exception comes up.. Like appendicitis,.. OperationalError.. can strike at any time, which makes it all the more maddening.. The Problem.. A little bit of background: beets uses the amazing.. database library to store its music catalog.. When importing music, multiple threads collaborate to speed up the process and several of the threads have to read from and write to the database.. Fortunately, SQLite s.. transactions.. ACID guarantees.. make this straightforward: each thread gets to make atomic accesses without bothering the other threads.. But things can go wrong.. If a transaction stays open too long, it can block other threads from accessing the database or, in the worst case, several threads can deadlock while waiting for each other.. For exactly this reason, SQLite has a lock timeout built in.. If it ever sees that a thread has been waiting for a lock for more than five seconds (by default), it throws up its hands and the user sees the dreaded.. database is locked.. error.. So the solution should be simple: somewhere, beets is holding a transaction open for more than five seconds, so we can either find the offending transaction or crank up that timeout.. But herein lies the mystery: five seconds is a.. long.. time.. That beets spends.. 5,000 milliseconds.. manipulating the database in a single transaction is indicative of something dark and terrible.. No amount of.. SELECT.. s and.. INSERT.. s at beets scale should add up to five seconds, so turning up the timeout parameter is really just painting over the rot.. So I looked at every line in the source where a transaction could start.. I made extra-double-sure that filesystem operations happened only outside of transactions.. I fastidiously closed every.. cursor.. after each.. But all this was to no avail the bug reports continued to pour in.. At this point, I was almost certain that nothing was wrong with beets transactions in themselves.. I measured the length of each access and, on my machine, they each took a handful of milliseconds apiece nowhere near a full five seconds.. The Real Problem.. I finally gave up trying to reproduce the problem on my own machine.. Eventually, one incredibly helpful user offered to give me guest SSH access so I could see the bug manifest.. in vitro.. on his machine.. I again set about measuring the length of each transaction.. And again, most transactions were in the one- or two-millisecond range.. But, this time, an occasional transaction would sometimes take.. much.. longer: 1.. 08 seconds, say.. And, eventually, some errant transaction would take 5.. 04 seconds and beets would crash:.. But there was a pattern.. Every long-lasting transaction took slightly more than an integral number of seconds.. I saw transactions that took 1.. 02 and 1.. 04 seconds, but never 1.. 61 seconds or 0.. 98 seconds.. Something was adding whole seconds to transactions latencies.. Digging through the.. SQLite source code.. , I looked for places where it could sleep in whole-second increments.. I found.. sqliteDefaultBusyCallback.. , the function that gets called when SQLite tries to  ...   an example.. in which a Library object looks up an Item by its ID:.. with self.. transaction() as tx: rows = tx.. query( SELECT * FROM items WHERE id=? , (load_id,)).. The only way to access the database is via methods on the.. Transaction object.. And creating a Transaction means acquiring a lock.. Together, these two restrictions make it impossible for two different threads to access the database at the same time.. This reduces the concurrency available in the DB (appropriate for beets but not for, say, a popular Web service) but eradicates the possibility of SQLite timeouts and will make it easy for beets to move to a different backend in the future even one that doesn t support concurrency itself.. To make this explicit-transaction approach feasible, transactions need to be.. composable:.. it has to be possible to take two correctly-coded transactional functions and call them both together in a single transaction.. For example, the beets Library has.. a method that deletes a single track.. beet remove command.. needs to remove.. many.. tracks in one fell, atomic swoop.. The smaller method.. Library.. remove.. uses a transaction internally so it can synchronize correctly when it s called alone.. But the higher-level command has to call it many times in a single transaction,.. like so.. :.. with lib.. transaction(): for item in items: lib.. remove(item).. To make all of this work, I want to make the.. outermost.. transaction the only one that synchronizes.. If a thread enters a transaction and then, before leaving the outer one, enters another nested transaction, the inner one should have no effect.. In this case, the transaction that surrounds the.. for.. loop needs to synchronize with other threads, but the inner transactions (inside each call to.. lib.. ) should be.. no-ops.. because the thread is already holding a lock.. To accomplish this, each thread transparently maintains a.. transaction stack.. that keeps track of all the Transaction objects that are currently active.. When a transaction starts, it gets pushed onto the stack; when it finishes, it pops off.. When the stack goes from having zero transactions to one, the thread acquires a lock; when the last transaction is popped from the stack, the lock is released.. This simple policy allows beets to safely compose transactional code into larger functions.. Takeaway for Other Projects.. What can we learn from the vanquishing of this monstrous bug other than the.. well-known fact.. that.. concurrency bugs are horrifying.. ? I think there are two lessons here: one for everybody who uses SQLite and one developers of any small-scale, desktop application that uses a database.. Assume SQLite Sleeps Whole Seconds.. If you use SQLite, you currently need to assume that some users will have a copy compiled without usleep support.. If you re using multiple threads, this means that, even under light contention, some transactions.. will.. take longer than five seconds.. Either turn the timeout parameter up or otherwise account for this inevitability.. I haven t seen this particular quirk documented elsewhere, but it should be common knowledge among SQLite users.. Try Explicit Transactions.. If you re writing a small-scale application that doesn t need highly concurrent access to a database, consider using explicit transactions based on a language-level construct (Python s.. context managers.. are a perfect example).. Without explicit transactions, it s hard impossible, in some cases to see where transactions begin and end.. So it s easy to introduce bugs where transactions remain open much longer than they need to be.. There are several advantages to marking the start and end of every transaction:.. It s easy to verify that a transaction ends in a timely manner.. You can add synchronization to unsynchronized datastores like.. or flat files.. You can interpose on transactions for debugging purposes.. For example, you might want to measure the time taken by each transaction.. (This technique was instrumental to diagnosing this bug in beets.. And if you re coding for SQLite in Python, feel free to.. steal beets Transaction implementation.. it s open source!..

    Original link path: /blog/sqlite-nightmare.html
    Open archive

  • Title: beets: the road to 1.0
    Descriptive info: The beets blog: the road to 1.. Beets has been in beta forever for small values of.. forever.. , at least.. I made.. the first commit.. to the original Subversion repository (for shame!) on May 14, 2008 and uploaded.. version 1.. 0b1.. on June 17, 2010.. I m now working on beets sixteenth beta.. It s high time that the project hit the big 1.. I m excited to give beets the point-zero stamp of approval, but I have two big, backwards-incompatible changes I want to make before sprouting a stable maintenance branch.. In this post, I ll describe my plans for beets 1.. 0b16 and b17 and beyond.. Beta 16.. As nerd-oriented software, beets has a.. lot.. of.. configuration options.. The config file, affectionately known as.. ~/.. beetsconfig.. , has used an.. INI.. -like syntax as defined by Python s.. ConfigParser.. since the beginning.. More than two years later, beets has outgrown the dated, inflexible ConfigParser system.. So the next beta of beets will focus on ripping out ConfigParser altogether and replacing it with an entirely new configuration system that solves many problems at once.. Here s what you can expect in 1.. 0b16:.. YAML.. syntax.. The config file has grown a troubling number of half-working syntax hacks over the years.. Lists of things have to be separated by whitespace, which means you can t use spaces in.. regular expressions.. Egregiously, I had to force users to substitute.. _.. characters for.. s in query-based.. path format.. keys because ConfigParser splits on colons.. Because it has a well-defined and nuanced.. syntax specification.. , YAML-based config files will eschew these hacks: lists will look like lists and all characters will be treated as equals.. You ll have a.. config/beets.. directory (or the equivalent on Windows).. No more cluttering your home directory with the configuration file, the state file, the library database, and maybe even the import log.. ConfigParser does not play nice with Unicode.. It s 2012, folks.. You ll be able to combine multiple configuration files for example, using a  ...   progresses.. Beta 17.. Unlike b16 s configuration overhaul, beta 17 s nightmare is a less user-visible one: the.. plugin API.. If you browse through the code for.. beets standard plugins.. , you ll quickly see that they all employ a tragic conflation between module-scoped and object-scoped variables.. There are.. global.. s all over the place and a nonsensical distinction between.. decorated.. functions and specially-named methods.. The plugin API overhaul will consolidate everything into the object scope.. Plugins will follow the.. singleton pattern.. , so it will no longer be necessary to keep anything module-global or assigned to the class itself.. Decorators will be deemphasized; events will use a method naming convention instead.. And, finally, we ll drop.. namespace packages.. I didn t know this when I first started using the.. beetsplug.. namespace package for beets plugins, but.. a bug.. in.. distribute.. utterly breaks them when they re installed with a program like.. This meant that some users could never use third-party plugins without reinstalling beets.. PEP 420.. fixes everything but, alas, won t be backported to Python 2.. x.. While these changes aren t particularly exciting for end users, it s important that I break all the plugins before 1.. 0 rather than after.. The goal is to make beets plugin system future-proof to contain the.. spaghetti.. before it spreads.. Beyond.. With these two major changes out of the way, it will be time for some release candidates and then a massive party as we release 1.. At this point, I plan on dividing beets development into a stable/.. trunk.. development model: version 1.. 0 will see bug-fix-only releases while the new features go into a separate 1.. 1 branch.. This will let me and maybe other developers? experiment with new stuff without rocking the boat for users who don t want to be bothered.. I have some exciting plans for new directions post-1.. But, for now, I have two big betas to work on we can talk about 1.. 1 and beyond a little later.. Keep that dial right here..

    Original link path: /blog/one-point-oh.html
    Open archive

  • Archived pages: 13