1 | * This is a scrap todo file while the new IPP server based Gutenbach is |
---|
2 | * being developed. Once this branch is released and becomes master, |
---|
3 | * items in this file will be merged into the Trac. |
---|
4 | |
---|
5 | - finish implementing a bunch of the IPP handlers |
---|
6 | [X] print job |
---|
7 | [X] validate job |
---|
8 | [X] print uri |
---|
9 | [X] pause printer |
---|
10 | [X] resume printer |
---|
11 | [X] set printer attributes |
---|
12 | [X] send uri |
---|
13 | [ ] set job attributes |
---|
14 | [ ] restart job |
---|
15 | [ ] promote job |
---|
16 | [ ] cups get document |
---|
17 | |
---|
18 | - add support in printer.py for: |
---|
19 | [x] print job |
---|
20 | [x] validate job |
---|
21 | [x] pause printer |
---|
22 | [x] resume printer |
---|
23 | [\] set printer attributes |
---|
24 | [\] send uri |
---|
25 | [\] set job attributes |
---|
26 | [X] restart job |
---|
27 | [\] promote job |
---|
28 | |
---|
29 | - add support in job.py for: |
---|
30 | [X] restart job |
---|
31 | [x] resume job |
---|
32 | |
---|
33 | - server stuff |
---|
34 | [ ] write convenience client-side API |
---|
35 | [ ] setuptools entry points for notification system (e.g. zephyr) |
---|
36 | [ ] deal with queue management/reordering |
---|
37 | [ ] add support for volume management |
---|
38 | [ ] support authentication/security |
---|
39 | |
---|
40 | - client-ish stuff |
---|
41 | [ ] rewrite gbr/gbq/etc. scripts to use client API |
---|
42 | [ ] rewrite server-side queue display to use API |
---|
43 | |
---|
44 | - misc |
---|
45 | [ ] make sure all CUPS commands are compatible |
---|
46 | [ ] deal with all the code marked 'XXX' |
---|
47 | |
---|
48 | - documentation and testing |
---|
49 | test cases for printer.py |
---|
50 | [X] TestEmptyGutenbachPrinter |
---|
51 | [X] TestBadEmptyGutenbachPrinter |
---|
52 | [ ] testPrintJob |
---|
53 | [ ] testValidateJob |
---|
54 | [ ] testGetJobs |
---|
55 | [ ] testPrintUri |
---|
56 | [X] testCreateJob |
---|
57 | [X] testPausePrinter |
---|
58 | [X] testResumePrinter |
---|
59 | [ ] testGetPrinterAttributes |
---|
60 | [ ] testSetPrinterAttributes |
---|
61 | [ ] testCancelJob |
---|
62 | [ ] testSendDocument |
---|
63 | [ ] testSendUri |
---|
64 | [ ] testGetJobAttributes |
---|
65 | [ ] testSetJobAttributes |
---|
66 | [ ] testRestartJob |
---|
67 | [ ] testPromoteJob |
---|
68 | |
---|
69 | test cases for requests.py |
---|
70 | [ ] testPrintJob |
---|
71 | [ ] testValidateJob |
---|
72 | [ ] testGetJobs |
---|
73 | [ ] testPrintUri |
---|
74 | [ ] testCreateJob |
---|
75 | [ ] testPausePrinter |
---|
76 | [ ] testResumePrinter |
---|
77 | [ ] testGetPrinterAttributes |
---|
78 | [ ] testSetPrinterAttributes |
---|
79 | [ ] testCancelJob |
---|
80 | [ ] testSendDocument |
---|
81 | [ ] testSendUri |
---|
82 | [ ] testGetJobAttributes |
---|
83 | [ ] testSetJobAttributes |
---|
84 | [ ] testRestartJob |
---|
85 | [ ] testPromoteJob |
---|
86 | [ ] testCupsGetDocument |
---|
87 | [ ] testCupsGetDefault |
---|
88 | [ ] testCupsGetPrinters |
---|
89 | [ ] testCupsGetClasses |
---|
90 | |
---|
91 | [ ] write test cases for future client API |
---|
92 | [ ] all the documentation |
---|
93 | [ ] check test case coverage ( http://nedbatchelder.com/code/coverage/ ) |
---|
94 | [ ] why doesn't the bug tracker work?! relatedly, figure out a |
---|
95 | solution that makes it easier for non-MIT developers to contribute |
---|
96 | |
---|
97 | Ponies |
---|
98 | - gapless playback |
---|
99 | - display video |
---|
100 | - youtube |
---|
101 | - pandora |
---|
102 | - last.fm |
---|
103 | - local streaming |
---|
104 | - generic streaming |
---|
105 | - zephyr control (e.g. youtube link) |
---|
106 | |
---|
107 | Tickets that should be fixed by this new version: |
---|
108 | [ ] http://gutenbach.mit.edu/ticket/21 |
---|
109 | [ ] http://gutenbach.mit.edu/ticket/2 |
---|
110 | [ ] http://gutenbach.mit.edu/ticket/7 |
---|
111 | [ ] http://gutenbach.mit.edu/ticket/39 |
---|
112 | [ ] http://gutenbach.mit.edu/ticket/47 |
---|
113 | [ ] http://gutenbach.mit.edu/ticket/48 |
---|
114 | [ ] http://gutenbach.mit.edu/ticket/8 |
---|
115 | [ ] http://gutenbach.mit.edu/ticket/34 |
---|
116 | [x] http://gutenbach.mit.edu/ticket/38 |
---|
117 | [ ] http://gutenbach.mit.edu/ticket/41 |
---|
118 | [ ] http://gutenbach.mit.edu/ticket/18 |
---|
119 | |
---|
120 | === CONSIDERATIONS FOR MPD === |
---|
121 | |
---|
122 | We are considering using MPD (the Music Player Daemon) for playback, instead |
---|
123 | of mplayer. This gives us a pony (gapless playback), and makes some other |
---|
124 | things, like keeping track of the queue, much easier. There is a lot of work |
---|
125 | needed to make this work, though. |
---|
126 | |
---|
127 | THIS ADDS A DEPENDENCY: python-mpd |
---|
128 | |
---|
129 | We will have to re-implement all the functions in jobs.py, and completely |
---|
130 | re-structure player.py |
---|
131 | |
---|
132 | If we want video playback eventually (and we do), there will be some hackery |
---|
133 | involved. We will pause mpd playback, do the video playback completely |
---|
134 | separately, and then resume mpd playback. |
---|
135 | |
---|
136 | Some almost-pseudocode: |
---|
137 | |
---|
138 | startup: |
---|
139 | client = MPDClient() |
---|
140 | client.connect(**{'host':'/var/run/mpd/socket', 'port':'6600'}) |
---|
141 | |
---|
142 | adding a song to the queue: |
---|
143 | Receive job |
---|
144 | Put it into a file [gutenbach/FILENAME] |
---|
145 | Tell MPD to add it to the queue [client.addid('gutenbach/FILENAME')] |
---|
146 | Find out what the id is |
---|
147 | Store all the data [including the temporary filename] |
---|
148 | IF WE ARE SUPPOSED TO BE PLAYING, MAKE SURE WE *ARE* PLAYING |
---|
149 | In particular, if the queue was empty, start playback [gutenbach.play()] |
---|
150 | |
---|
151 | when a job completes playing: |
---|
152 | Remove the file [rm gutenbach/FILENAME] |
---|
153 | |
---|
154 | getting the queue: |
---|
155 | get playlist, parse return [client.playlistid()] |
---|
156 | |
---|
157 | removing a job: |
---|
158 | dequeue it [client.deleteid('NUMBER')] |
---|
159 | remove the file |
---|
160 | tell them what you did |
---|
161 | |
---|
162 | restart song: |
---|
163 | client.seek(0,1) [0% through song 1...] |
---|
164 | |
---|