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 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495
|
pretty urgent items
-------------------
- update author name in copyright: \set{"man::author"}{Joost van Baal-Ilić <joostvb-draai@mdcc.cx>}
- remove explicit "ZOEMSEARCHPATH=/usr/share/aephea" from man/Makefile.
zoem 10-265-1 gives:
$ zoem -e '\__searchpath__'
{/usr/share/zoem/mac}
. Should include /usr/share/aephea. Have sent patch to upstream.
some items
----------
INSTALL zsh stuff:
compinit niet genoeg; nodig:
joostvb@hille:~% exec zsh --login
move zsh stuff to README
urgent items
------------
- update this todo-list; lots of obsolete stuff is in it.
- bug: on empty/non-playing playlist, "draai draai" chokes
- draai is buggy when volume is set to 100%: skip fails
- README in html, ship .txt too.
- more docs and features for "draai insert": hang deze track net achter de nu spelende
"insert" is "fileguestlist" (as opposed to "trackguestlist", which is
"guestlist")
insert could honor --prio : --prio 2 : after upcoming track.
- revamp:
help texts in zsh completion stuff, --help and manpage should use ONE
source. move help stuff to one place; include help/ stuff in configure phase.
remove help stuff from zsh/_draai.
remove help stuff from draai.in script
Think about lists in zoem, use stijn's trick.
Alternative way to implement this: Run e.g. "draai --raw --help skip",
"draai --raw help" "draai --raw --nice help"
(as of 2008-06, quite some options are only half-implemented)
.
Another alternative way to implement this:
selfdocumenting zoem stuff:
foo=bar
: cat <<EOT
\zoemstart
\zoem stuff
\zoemstop
EOT
blah=duh
man package, -d roff
zoem stuff
\:{
shell meuk
}
zoem stuff
zou dat werken?
(We are working on this implementation now:
of echo 'unpause draai' >command/unpause, commit, $(cat command/unpause) ?
option/raw: so:
use help/shortoption
-
ma 26 12:56 < joostvb> mpc update; mpc idle; mpc add foo
ma 26 12:56 < Fruit> ah zo hm
ma 26 12:57 < Fruit> ik denk dat ik mpc add foo; mpc move $(getlast)
$(getcurrent+1) wil
ma 26 12:57 < Fruit> en dan liefst in één atomaire operatie (dat kan binnen het
mpd-protocol namelijk)
ma 26 12:58 < Fruit> en dat moet uiteraard ook goed gaan als je een directory
toevoegt
ma 26 12:58 < Fruit> dus eerst aantal opvragen, dan toevoegen, dan oude aantal
t/m nieuwe aantal moven
ma 26 12:59 < joostvb> yep
ma 26 12:59 < Fruit> in jouw draai watch scriptje wil je trouwens misschien mpc
idle gebruiken ipv sleep 1
----------------------------------------------------------------------------
Date: Sun, 30 Nov 2008 23:05:22 +0100
From: Stijn van Dongen <stijn@micans.org>
To: Joost van Baal <joostvb@mdcc.cx>
Subject: zoem mongering
Message-ID: <20081130220521.GA37144@xs4all.nl>
Ha Joost,
zie bijgevoegd *en* geciteerd de file 'lscat.azm' die misschien doet wat je wil.
Roep zoem aan als
zoem -i lscat.azm -allow ls:cat -o -
\: - lees de namen.
\setx{thefiles}{
\inspect{
{mods}{iter-lines,discard-miss}
}{(.*~.bzz)}{_#1{{\1}}}{\system{ls}}
}
\: - maak key-value paren.
\apply{_#1{\!{\setx{%{\1}}{\system{cat}{\1}}}}}{\thefiles}
\: - print een value.
[\%{foo.bzz}]
[\%{bar.bzz}]
\: - print alle key-value paren.
\apply{_#1{\!{[\1]-->[\%{\1}]}}}{\thefiles}
In dit voorbeeld worden de file namen gematcht op een .bzz suffix.
Als je dat niet wilt kun je het patroon (.*) gebruiken (maar ik
raad aan een suffix conventie te gebruiken :-).
Als je vervolgens iets voor alle file namen wil doen, kun je
\apply gebruiken zoals hierboven.
Nog iets: je kunt ls aanroepen met argumenten, bijvoorbeeld zo:
\system{ls}{{-r}{-t}}.
En: \apply expandeert beide argumenten (1e argument: de 'subroutine' key die
iteratief gebruikt wordt op de sub-argumenten in het 2e argument). Dat kan soms
een beetje prutsen zijn om ongewenste evaluatie/expansie te voorkomen. In het
voorbeeld hierboven wordt \!{ } gebruikt om te zorgen dat bepaalde stukken
overgeslagen worden tijden genoemde expansie. In de documentatie heet \!{ }
'delay scope' omdat het 1 expansie stap overslaat. \!!{ } slaat twee stappen
over. En \eval{\eval{\!!{\bar}}} is precies hetzelfde als \bar. Het is de
barre praktijk van macro talen :)
groetjes,
Stijn
----------------------------------------------------------------------------
- fade in/out more aggressive: never silence between tracks.
- implement "draai pick":
draai list | grep Camper | draai pick
draai --raw list | grep Camper | draai pick
draai pick > Picking from:
121) Camper van Beethoven - Camper van Beethoven - Lulu Land (2:41)
157) Camper van Beethoven - Camper van Beethoven - We Saw Jerry's Daughter (2:10)
158) Camper van Beethoven - Camper van Beethoven - Good Guys and Bad Guys (3:56)
>159) Camper van Beethoven - Camper van Beethoven - Jo Stalin's Cadillac (2:32)
Pick first matching entry? [Y,2,3...,l,r,q]
(Yes; no, pick 2nd; no, pick 3rd; no, pick last; no, rerun; quit)
Y
You've picked
121) Camper van Beethoven - Camper van Beethoven - Lulu Land (2:41)
Would you like to guestlist this track? [Y,2,3,..,d,u,q]
draai pick>
Yes; no, schedule as 2nd upcoming track; no, schedule as 3rd upcoming track; delete from playlist; unguestlist; quit
pick should honor --silent
- 'draai osjittisstil' update zsh stuff.
- dr_push: it'd be nice if it would mangle files and pathnames to fit on a
vfat filesystem.
- dr_umount would be nice
- add stuff to generate playlist "latest"
- draai second 123 = draai --prio 2 guestlist 123
- make this tool usable for DJ's: more flexible playlist handling, more
fade-in/fade-out features:
+ draai "peek" should accept an arg
draai peek noftracks
+ draai draai should do an "insert": insert these songs just after current
song. implement as "mpc add; mpc move":
old curr old curr old curr
old 1 new 4 new 2
old 2 old 1 new 3
old 3 old 2 ... new 4
new 1 old 3 old 1
new 2 new 1 old 2
new 3 new 2 old 3
new 4 new 3 new 1
- reimplement "tail" using ncurses (or watch(1)?): tail should show "peek" too.
current song in boldface or reverse video
- document "pause" and "resume|unpause|play" commands (mpc pause, mpc play), add
zsh completion
- draai draai should not clear current playlist, but remove all pending songs
but the current one from the current playlist, and append the given
tracks/playlists. This makes for more smooth fade in/out.
- add ui for
mpc search artist Stooges | mpc add
mpc search artist Hendrix | mpc add
- document extra aliases: init: genesis; next: volgende; unguestlist: unfriend,
ontvriend; insert: voegin; skip: slaover; fastforward: voorwaarts; tail:
staart; peek: spiek; play (unpause, resume): ga; quit (exit, stop, pause): ho
items as found while working on eeepc
-------------------------------------
inspect $DISPLAY for draai-init-nox
draai move 34 50 (just like mpc)
draai --terse list
draai --terse --search 'greatest_hits' list : gives 3 6 12 19
tty12 group tty for draai:
root@hille:/etc/udev/rules.d# vi 93-permissions-local.rules
udev / dr-mount
/dev/disk/by-label/PENDRIVE /media/PENDRIVE vfat user,noauto 0 0
watch(1) "cat -v" !?, see http://mdcc.cx/tmp/watch/
joostvb@hille:~% draai unguestlist $( draai --raw list | grep Best_Ever | head | while read n r; do echo $n | sed 's/)//'; done )
> add --match option:
> draai --match greatest_hits delete
> draai --match greatest_hits guestlist
> suggested usage: first run --match with --no-act, to inspect
> what would get matched.
private/local items
-------------------
- radio kink classix: dj@nagy:~% mpg321 http://81.173.3.24/
- see also dj@nagy:etc/zsh/rc.local for radio6 and bbc3
other items
-----------
- add support for smart merging of playlists:
--playlist=foo,1 --playlist=bar,40 --playlist=duh,7
--playlist=foo --playlist=bar is equivalent to
--playlist=foo,1 --playlist=bar,1
--playlist=foo,2 --playlist=bar is equivalent to
--playlist=foo,2 --playlist=bar,1 is equivalent to
--playlist=foo --playlist=foo --playlist=bar
: adding ,N is a shorthand for repeating the arg N times. playlists get
truncated to the size of the smallest one. so, no matter the size of foo
and bar, --playlist=foo,2 --playlist=bar,1 will give you 2 foo-tracks for
every bar-track.
- support voor last.fm audioscrobbling erin. An account at last.fm
is needed to get any services from them.
- support voor last.fm streaming audio erin. shell-fm(1)
shell-fm heeft plugin voor event tijdens wisselen track.
shell-fm is niet eenvoudig om te bouwen tot mpd client.
t heeft wel een socket en netwerk-interface
Wed 27 14:11 <Fruit> http://www.last.fm/user/Fruitje/
An account at last.fm is needed to get any services from them.
dj@nagy:~% shell-fm lastfm://artist/Alexander+von+Schlippenbach/similarartists
dj@nagy:~% shell-fm lastfm://artist/Anthony+Braxton/similarartists
Perhaps zomg is more interesting: ZOMG is a console-based last.fm submission
and radio client written in Z-Shell.
http://hg.debian.org/hg/private/schizo/zomg http://packages.debian.org/zomg
- document (and implement on gelfand): syslog.conf: local? to e.g.
/var/log/draai
- add to contrib:
root@kovalevskaya:/etc/logcheck/ignore.d.server# cat draai
#
#
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ draai\[[0-9]+\]:
- Give examples in documentation:
suggested desktop layout
.----------------.
| logtail .------.
` ------- | tail |
| |
`------'
.------.
| peek |
| |
`------'
and once in a while, press ctrl-alt-F12
startup:
% draai init calls draai tail > /dev/tty12 & (document: dj is a member of group tty)
dj@gelfand:~/mp3% draai -t +30 quit
dj@gelfand:~/mp3% draai -t 08:30 quit
dj@gelfand:~/mp3% draai -p all draai
dj@gelfand:~/mp3% draai tail <- in separate window
dj@gelfand:~/mp3% draai skip
dj@gelfand:~/mp3% draai -t 23:01 -p all draai
dj@gelfand:~/mp3% draai peek
dj@nagy:~% draai delete $(seq 3 65)
zsh: draai delete {12..29}
draai guestlist {50..34}
% repeat 10; do draai skip; done
dj@nagy:~% shell-fm lastfm://artist/This+Heat/similarartists
Air
Biosphere
dj@nagy:~% shell-fm lastfm://artist/Alexander+von+Schlippenbach/similarartists
dj@nagy:~% shell-fm lastfm://artist/Anthony+Braxton/similarartists
- "tail" is buggy:
2007-03-18 21:54:56 Anvil FX - Brazz-Ill - Miolo de Cabeça (4:28)
has borken line length: utf-8 issue, probably.
- implement setup uninstall
- don't use help2man, but something "real" for the manpage (see also
ideas from python era, below) ReST still (2007-03) doesn't seem to be easily
transformed to roff. use zoem? use xml? have zoem run --help and --version?
the last trick _is_ used and documented in some zoem example. zum has e.g.
\verbatim{\system{../src/zoem}{{-l}{session}}}
see aangifte-ib and webalizer-stonesteps manpages for roff example.
- document this
draai draai Lee_Scratch_Perry/Roast_Fish,_Collie_Weed_and_Corn_Bread/ The_Fall/
works: args don't need to be tracks. Also,
draai draai Various/Mind_The_Gap_6{0,1,2}<tab>
works.
Wishlist items
--------------
- don't do "draai --raw tail" but "draai tail --raw", etc.
- perhaps it'd be nice if we could still play local files too:
~$ draai draai /tmp/foo.ogg
- should process .m3u , stdin and command line args;
cat <<EOT | draai draai blah\ blah.ogg
track.ogg
song.mp3
EOT
- should process audiofiles with " and ' in filename. (Space is fine, we've
checked).
- allow for a ~/.draai/rc config file (FHS desktop policy?)
- "tail" could better do:
2007-03-19 07:22:21 Erik Satie - The Early Piano Wor...- Gnossienne No. 1 (5:42)
2007-03-19 07:27:58 Photek - Solaris - Junk (5:28)
instead of:
2007-03-19 07:22:21 Erik Satie - The Early Piano Wor...- Gnossienne No. 1 (5:42)
2007-03-19 07:27:58 Photek - Solaris - Junk (5:28)
- version, help, license should be commands, not options
- enable command "append": append to current playlist
Old ideas, from the pyton era
-----------------------------
- look at python code examples: in /usr/bin/ :
- reportbug's (reportbug, querybts),
- debian-goodies (checkrestart, popbugs)
- linda (Steve Kowalik),
- pydoc,
- tla_load_dirs (John Goerzen)
- document & write manpage
using pydoc
there seems to be no roff output for pydoc: even pydoc's own manpage says:
AUTHOR Moshe Zadka, based on "pydoc ‐‐help"
write a pydoc2zoem thingie?
ReST sucks (am I wrong?), don't use it.
docutils ReST http://docutils.sourceforge.net/ offers a ManPage Writer too.
hrm. smells unstable.
http://docutils.sourceforge.net/sandbox/cben/make/Makefile.docutils <- nice.
Debian package python2.4-docutils /usr/share/doc/python-docutils
rest2xml(1)
pydoc /usr/bin/popbugs
joostvb@nagy:~% pydoc ~/arch/draai/draai/modules/draai.py
help2man ? ->
http://sourceforge.net/mailarchive/message.php?msg_id=9285365
result.append(formatter.format_heading(_("options")))
def format_usage(self, usage):
return _("usage: %s\n") % usage
joostvb@nagy:/usr/lib/python2.4% less optparse.py
joostvb@nagy:~/svn/starship.python.net% svn co svn://starship.python.net/optik/trunk optik
r484 | gward | 2005-01-17 03:22:13 +0100 (Mon, 17 Jan 2005) | 2 lines
Always capitalize "Usage" and "Options" in help output for consistency.
latest release as of Fri Mar 25 12:02:04 CET 2005 is optik 1.5 (2004-12-07 02:04)
1.5.1 is yet to be released.
- check for ogg/mp3 interfaces
python-pyvorbis - A Python interface to the Ogg Vorbis library
1.3-1 Dec 2003 (upstream is dead, latest upstream)
include (part of) ogg123.py ? ogg123.py is GPL-ed, since pyvorbis-1.3 is.
ogg123.py --module=lad file.ogg works (somewhat (for me)). However, it plays
tracks on a much slower pitch...
Use python-id3 and python-pymad for mp3
- make it a mpd client. probably should use:
python-mpdclient - Python interface to MPD (source: py-libmpdclient)
(see also: pygmy, pympd, libmpd-dev, libmpd0)
run: ~% pydoc mpdclient2
libmpd-dev: "This package contains the development libraries, headers and documentation."
no it doesn't: no docs there...
try http://www.musicpd.org/ for docs
Peeksheet
---------
joostvb@nagy:~/arch/draai/draai% DIB_V=$(cat VERSION) DIB_P=draai DIB_TARDIR=. debian-install-build
joostvb@bruhat:~/git/draai% git pull ssh://git/~joostvb/git/draai.git
joostvb@bruhat:~/git/draai/debian% git push ssh://git/~joostvb/git/draai.git joostvb-arch@mdcc.cx--2005-draai,draai--mainline--0.1
|