]> git.aero2k.de Git - sirius.git/log
sirius.git
11 years agoAdd note that 'friends_printers' is suboptimal and won't scale.
Tom Hunger [Tue, 10 Mar 2015 10:48:48 +0000 (10:48 +0000)]
Add note that 'friends_printers' is suboptimal and won't scale.

11 years agoRemove testing code for set_quip and adjust set_personality.
Tom Hunger [Tue, 10 Mar 2015 10:45:23 +0000 (10:45 +0000)]
Remove testing code for set_quip and adjust set_personality.

11 years agoFix direction of friend's printers ownership.
Tom Hunger [Tue, 10 Mar 2015 10:43:23 +0000 (10:43 +0000)]
Fix direction of friend's printers ownership.

We used to be able to print on printers of people we follow on twitter
but that makes no sense: we want only people *we* follow intentionally
to be able to print on our printers.

This implementation is slow-ish but I added a test case so we can replace
the slow query with a N:M relationship in sqlalchemy in the future.

11 years agoFix README to point to correct app directory.
Tom Hunger [Mon, 9 Mar 2015 12:57:30 +0000 (12:57 +0000)]
Fix README to point to correct app directory.

11 years agoRemove implemented TODO, added new TODO, fixed recursive imports.
Tom Hunger [Mon, 9 Mar 2015 12:39:53 +0000 (12:39 +0000)]
Remove implemented TODO, added new TODO, fixed recursive imports.

11 years agoFix test after URL change for printer.
Tom Hunger [Mon, 9 Mar 2015 11:46:52 +0000 (11:46 +0000)]
Fix test after URL change for printer.

11 years agocouple more copy changes
Matt Webb [Sun, 1 Mar 2015 17:36:36 +0000 (17:36 +0000)]
couple more copy changes

11 years agoAllow setting twitter consumer secret and key through the environment.
Tom Hunger [Sun, 1 Mar 2015 17:04:41 +0000 (17:04 +0000)]
Allow setting twitter consumer secret and key through the environment.

This is done in a backwards-compatible way using the hard-coded key
for now so I can add a better error message when the env vars are missing.

11 years agomaking the send message interface a little prettier
Matt Webb [Sun, 1 Mar 2015 15:32:23 +0000 (15:32 +0000)]
making the send message interface a little prettier

11 years agotemplate mistake
Matt Webb [Sun, 1 Mar 2015 15:01:06 +0000 (15:01 +0000)]
template mistake

11 years agoprettify printer overview page, restrict recent messages to printer owner
Matt Webb [Sun, 1 Mar 2015 14:58:26 +0000 (14:58 +0000)]
prettify printer overview page, restrict recent messages to printer owner

11 years agosimplifying print URL and adding more explicit permissions
Matt Webb [Sun, 1 Mar 2015 14:24:12 +0000 (14:24 +0000)]
simplifying print URL and adding more explicit permissions

11 years agochanging url for printer overview. making message history available only to printer...
Matt Webb [Sun, 1 Mar 2015 13:53:06 +0000 (13:53 +0000)]
changing url for printer overview. making message history available only to printer owner

11 years agosilly bug in template
Matt Webb [Sun, 1 Mar 2015 13:34:29 +0000 (13:34 +0000)]
silly bug in template

11 years agoprettifying overview page
Matt Webb [Sun, 1 Mar 2015 13:29:46 +0000 (13:29 +0000)]
prettifying overview page

11 years agoprettying up a few pages and adding a sign out button
Matt Webb [Sun, 1 Mar 2015 12:28:00 +0000 (12:28 +0000)]
prettying up a few pages and adding a sign out button

11 years agoHorrendeous fix for gevent/python2.7.9 incompatability.
Tom Hunger [Wed, 18 Feb 2015 12:47:09 +0000 (12:47 +0000)]
Horrendeous fix for gevent/python2.7.9 incompatability.

11 years agoFix dokku notes and remove gevent polyfill.
Tom Hunger [Mon, 16 Feb 2015 21:09:36 +0000 (21:09 +0000)]
Fix dokku notes and remove gevent polyfill.

11 years agoMerge pull request #5 from genmon/remaining-features
teh [Sun, 15 Feb 2015 11:36:19 +0000 (11:36 +0000)]
Merge pull request #5 from genmon/remaining-features

Remaining features

11 years agoAdd view to test quips.
Tom Hunger [Wed, 4 Feb 2015 20:10:47 +0000 (20:10 +0000)]
Add view to test quips.

11 years agoSplit templating into its own module.
Tom Hunger [Wed, 4 Feb 2015 20:10:21 +0000 (20:10 +0000)]
Split templating into its own module.

11 years agoAdd remaining SetPersonalityWithMessage and SetQuip encodings.
Tom Hunger [Wed, 4 Feb 2015 17:48:04 +0000 (17:48 +0000)]
Add remaining SetPersonalityWithMessage and SetQuip encodings.

11 years agoImplement no-face printing and delivery.
Tom Hunger [Wed, 4 Feb 2015 16:07:21 +0000 (16:07 +0000)]
Implement no-face printing and delivery.

11 years agoAdd admin to show how to change personality.
Tom Hunger [Wed, 4 Feb 2015 10:39:50 +0000 (10:39 +0000)]
Add admin to show how to change personality.

11 years agoAdd missing fields to personality messages.
Tom Hunger [Tue, 3 Feb 2015 20:11:31 +0000 (20:11 +0000)]
Add missing fields to personality messages.

11 years agoFix premature timing out.
Tom Hunger [Tue, 3 Feb 2015 20:11:09 +0000 (20:11 +0000)]
Fix premature timing out.

11 years agoSplit printer encoding for a single image into a separate method.
Tom Hunger [Tue, 3 Feb 2015 20:10:26 +0000 (20:10 +0000)]
Split printer encoding for a single image into a separate method.

This is in preparation of changing the personality which takes a list
of images.

11 years agoAllow the same user claiming the same claim code twice.
Tom Hunger [Tue, 3 Feb 2015 16:37:46 +0000 (16:37 +0000)]
Allow the same user claiming the same claim code twice.

11 years agoImplement twitter rate limiting.
Tom Hunger [Tue, 3 Feb 2015 16:05:43 +0000 (16:05 +0000)]
Implement twitter rate limiting.

11 years agoDon't throw exception when driver doesn't initialize.
Tom Hunger [Tue, 3 Feb 2015 15:26:20 +0000 (15:26 +0000)]
Don't throw exception when driver doesn't initialize.

11 years agoTest and fix more corner cases for claiming.
Tom Hunger [Tue, 3 Feb 2015 15:16:00 +0000 (15:16 +0000)]
Test and fix more corner cases for claiming.

11 years agoFlip image before RLE encoding. The printer prints upside-down.
Tom Hunger [Mon, 2 Feb 2015 14:24:48 +0000 (14:24 +0000)]
Flip image before RLE encoding. The printer prints upside-down.

11 years agoAdd image processing pipeline.
Tom Hunger [Mon, 2 Feb 2015 13:21:49 +0000 (13:21 +0000)]
Add image processing pipeline.

We're now using PIL to threshold the image before previewing it.

11 years agoCleaning round.
Tom Hunger [Mon, 2 Feb 2015 12:53:17 +0000 (12:53 +0000)]
Cleaning round.

11 years agoAdd remaining printer messages except for firmware update.
Tom Hunger [Mon, 26 Jan 2015 18:29:47 +0000 (18:29 +0000)]
Add remaining printer messages except for firmware update.

11 years agoImplement live / dead (i.e. offline) logic.
Tom Hunger [Mon, 26 Jan 2015 18:06:54 +0000 (18:06 +0000)]
Implement live / dead (i.e. offline) logic.

11 years agoUse dict-as-argument trick to store global data for next command id.
Tom Hunger [Mon, 26 Jan 2015 17:39:10 +0000 (17:39 +0000)]
Use dict-as-argument trick to store global data for next command id.

11 years agoDocument how to claim a printer for another user and fix fake claim command.
Tom Hunger [Mon, 26 Jan 2015 16:14:00 +0000 (16:14 +0000)]
Document how to claim a printer for another user and fix fake claim command.

11 years agoKeep track of stats for preview and printing.
Tom Hunger [Mon, 26 Jan 2015 16:04:20 +0000 (16:04 +0000)]
Keep track of stats for preview and printing.

11 years agoTest printing and fix a few bugs found by testing.
Tom Hunger [Mon, 26 Jan 2015 15:54:15 +0000 (15:54 +0000)]
Test printing and fix a few bugs found by testing.

11 years agoMove testing base into a separate testing directory.
Tom Hunger [Mon, 26 Jan 2015 15:31:15 +0000 (15:31 +0000)]
Move testing base into a separate testing directory.

11 years agoCorrect global command id and send error handling.
Tom Hunger [Mon, 26 Jan 2015 12:38:51 +0000 (12:38 +0000)]
Correct global command id and send error handling.

We previously had a next_command_id per bridge which works for communicating
with a single bridge, but we decided to use the command id for message
print_ids as well where they have to be unique. If we wrap around at
4 billion we need to add an extra filter with a date-cutoff.

11 years agoImplement twitter friends storing and refreshing.
Tom Hunger [Mon, 26 Jan 2015 10:44:41 +0000 (10:44 +0000)]
Implement twitter friends storing and refreshing.

11 years agoUpdate documentation.
Tom Hunger [Sun, 25 Jan 2015 20:17:28 +0000 (20:17 +0000)]
Update documentation.

11 years agoMerge remote-tracking branch 'origin/message_ui'
Tom Hunger [Sun, 25 Jan 2015 19:48:11 +0000 (19:48 +0000)]
Merge remote-tracking branch 'origin/message_ui'

11 years agoMerge pull request #3 from genmon/toms_implementation
teh [Sun, 25 Jan 2015 19:35:08 +0000 (19:35 +0000)]
Merge pull request #3 from genmon/toms_implementation

Toms implementation, see notes

11 years agoCorrectly handle two different users claiming the same XOR.
Tom Hunger [Fri, 23 Jan 2015 18:42:21 +0000 (18:42 +0000)]
Correctly handle two different users claiming the same XOR.

11 years agoMove next-command-id generation into Message model.
Tom Hunger [Fri, 23 Jan 2015 12:53:21 +0000 (12:53 +0000)]
Move next-command-id generation into Message model.

The next command id is somewhat subtle because we're using it
to ack messages. Having it in its own class method is easier.

11 years agoImplement ack'ing of messages.
Tom Hunger [Fri, 23 Jan 2015 12:40:43 +0000 (12:40 +0000)]
Implement ack'ing of messages.

11 years agoImplement twitter friend lookup.
Tom Hunger [Fri, 23 Jan 2015 11:44:58 +0000 (11:44 +0000)]
Implement twitter friend lookup.

11 years agoMake submit buttons actual buttons.
Tom Hunger [Fri, 23 Jan 2015 10:31:09 +0000 (10:31 +0000)]
Make submit buttons actual buttons.

11 years agoImplement adding a fake twitter friend and claiming a printer for another user.
Tom Hunger [Fri, 23 Jan 2015 10:30:02 +0000 (10:30 +0000)]
Implement adding a fake twitter friend and claiming a printer for another user.

11 years agoImplement a trivial preview.
Tom Hunger [Fri, 23 Jan 2015 08:45:32 +0000 (08:45 +0000)]
Implement a trivial preview.

11 years agoBugfix: add forgotten "format" for error message.
Tom Hunger [Thu, 22 Jan 2015 17:41:49 +0000 (17:41 +0000)]
Bugfix: add forgotten "format" for error message.

11 years agoOnly show messages for the selected printer.
Tom Hunger [Thu, 22 Jan 2015 17:39:38 +0000 (17:39 +0000)]
Only show messages for the selected printer.

Also make that the default printer when going to the print page.

11 years agoBootstrapify claim form.
Tom Hunger [Thu, 22 Jan 2015 17:34:26 +0000 (17:34 +0000)]
Bootstrapify claim form.

11 years agoBoostrappify print form.
Tom Hunger [Thu, 22 Jan 2015 17:34:13 +0000 (17:34 +0000)]
Boostrappify print form.

11 years agoDisable every and all security when rendering HTML via phantomjs.
Tom Hunger [Thu, 22 Jan 2015 17:12:04 +0000 (17:12 +0000)]
Disable every and all security when rendering HTML via phantomjs.

We're not protecting a user's logged in session or private information,
we're using phantomjs to render publicly available content so we don't
really care whether a website's certificate checks out, or whether the
SSL version is older than the cambrian explosion.

11 years agoMake twitter a 1:1 relationship on the model.
Tom Hunger [Thu, 22 Jan 2015 17:09:38 +0000 (17:09 +0000)]
Make twitter a 1:1 relationship on the model.

11 years agoRemember sent messages in a database model and show them on overview.
Tom Hunger [Tue, 20 Jan 2015 14:25:48 +0000 (14:25 +0000)]
Remember sent messages in a database model and show them on overview.

11 years agoPass around pixel data instead of a PIL image object.
Tom Hunger [Tue, 20 Jan 2015 12:49:46 +0000 (12:49 +0000)]
Pass around pixel data instead of a PIL image object.

We want to store the pixel data in the database, so we pass around the
lowest common representation.

11 years agoFold twitter-oauth / user DB relationship back into class.
Tom Hunger [Fri, 16 Jan 2015 10:49:40 +0000 (10:49 +0000)]
Fold twitter-oauth / user DB relationship back into class.

11 years agoFix a fair amount of flake8 complaining.
Tom Hunger [Fri, 16 Jan 2015 10:37:08 +0000 (10:37 +0000)]
Fix a fair amount of flake8 complaining.

Ignoring certain cases where readability > consistency.

11 years agoUse 4 spaces of indent for config.py for consistency.
Tom Hunger [Fri, 16 Jan 2015 10:12:20 +0000 (10:12 +0000)]
Use 4 spaces of indent for config.py for consistency.

11 years agoRemove more unused code, unused imports and fix formatting.
Tom Hunger [Thu, 15 Jan 2015 17:12:01 +0000 (17:12 +0000)]
Remove more unused code, unused imports and fix formatting.

11 years agoRemove obsolete code and docs.
Tom Hunger [Thu, 15 Jan 2015 17:02:46 +0000 (17:02 +0000)]
Remove obsolete code and docs.

11 years agoAdd and handle DeviceCommandResponse.
Tom Hunger [Thu, 15 Jan 2015 16:50:19 +0000 (16:50 +0000)]
Add and handle DeviceCommandResponse.

11 years agoRemove previous version of sirius. It's been a good guide, so long.
Tom Hunger [Thu, 15 Jan 2015 16:44:05 +0000 (16:44 +0000)]
Remove previous version of sirius. It's been a good guide, so long.

11 years agoStart printer command_id at 10, not 0.
Tom Hunger [Thu, 15 Jan 2015 16:34:31 +0000 (16:34 +0000)]
Start printer command_id at 10, not 0.

0 is an invalid value. It took me a while to debug this
so please don't change.

11 years agoImplement the skeleton functionality for printing.
Tom Hunger [Thu, 15 Jan 2015 15:49:04 +0000 (15:49 +0000)]
Implement the skeleton functionality for printing.

The actual print encoding still has a bug (the messages are rejected
by the printer with return status 0x90).

11 years agobase-64 encode device messages.
Tom Hunger [Thu, 15 Jan 2015 15:47:32 +0000 (15:47 +0000)]
base-64 encode device messages.

Note that there's still a bug that prevents image printing from working.
To be investigated.

11 years agoConnect real database to real protocol loop and fix a few minor bugs.
Tom Hunger [Thu, 15 Jan 2015 15:37:41 +0000 (15:37 +0000)]
Connect real database to real protocol loop and fix a few minor bugs.

The most interesting bit here is the with app.app_context() for the
websocket code. It's required because the websocket loop needs to access
the database occasionally.

11 years agoTest and fix image coding.
Tom Hunger [Thu, 15 Jan 2015 15:13:02 +0000 (15:13 +0000)]
Test and fix image coding.

11 years agoAllow printers to have a name.
Tom Hunger [Thu, 15 Jan 2015 11:38:24 +0000 (11:38 +0000)]
Allow printers to have a name.

11 years agoOrganise README into usage and architecture section.
Tom Hunger [Wed, 14 Jan 2015 18:47:42 +0000 (18:47 +0000)]
Organise README into usage and architecture section.

11 years agoImplement and test the claiming web form.
Tom Hunger [Wed, 14 Jan 2015 18:31:44 +0000 (18:31 +0000)]
Implement and test the claiming web form.

11 years agoMove claim web handler to landing.py
Tom Hunger [Wed, 14 Jan 2015 15:47:48 +0000 (15:47 +0000)]
Move claim web handler to landing.py

This makes more sense structurally.

11 years agoAdd management command to fake a newly reset little printer calling home.
Tom Hunger [Wed, 14 Jan 2015 15:42:37 +0000 (15:42 +0000)]
Add management command to fake a newly reset little printer calling home.

11 years ago.git-ignore local test database
Tom Hunger [Wed, 14 Jan 2015 15:39:13 +0000 (15:39 +0000)]
.git-ignore local test database

11 years agoAdd and test encode function for claiming-codes.
Tom Hunger [Wed, 14 Jan 2015 15:38:52 +0000 (15:38 +0000)]
Add and test encode function for claiming-codes.

11 years agoCreate logged-in site structure.
Tom Hunger [Mon, 12 Jan 2015 21:00:15 +0000 (21:00 +0000)]
Create logged-in site structure.

11 years agoMatch migrations to latest database table layout.
Tom Hunger [Mon, 12 Jan 2015 20:03:20 +0000 (20:03 +0000)]
Match migrations to latest database table layout.

11 years agoDispatch landing page depending on logged-in state.
Tom Hunger [Mon, 12 Jan 2015 19:56:19 +0000 (19:56 +0000)]
Dispatch landing page depending on logged-in state.

11 years agoAdd is_authenticated method to User model.
Tom Hunger [Mon, 12 Jan 2015 19:33:15 +0000 (19:33 +0000)]
Add is_authenticated method to User model.

11 years agoAdd flask-login.
Tom Hunger [Mon, 12 Jan 2015 18:40:33 +0000 (18:40 +0000)]
Add flask-login.

11 years agoClean up comments for claim code model.
Tom Hunger [Mon, 12 Jan 2015 18:21:13 +0000 (18:21 +0000)]
Clean up comments for claim code model.

11 years agoAdd owner-relationship from Printer to User model.
Tom Hunger [Mon, 12 Jan 2015 17:46:11 +0000 (17:46 +0000)]
Add owner-relationship from Printer to User model.

11 years agoRemove __tablename__. Not necessary when it matches the classname.
Tom Hunger [Mon, 12 Jan 2015 17:44:58 +0000 (17:44 +0000)]
Remove __tablename__. Not necessary when it matches the classname.

11 years agoAdd creation timestamps everywhere that default to utcnow.
Tom Hunger [Mon, 12 Jan 2015 17:40:00 +0000 (17:40 +0000)]
Add creation timestamps everywhere that default to utcnow.

These are often super useful for debugging.

11 years agoTest and implement claiming.
Tom Hunger [Mon, 12 Jan 2015 17:39:14 +0000 (17:39 +0000)]
Test and implement claiming.

Claiming can happen before or after a printer calls home
for the first time so we have to test both orders.

11 years agoAdd flask-testing.
Tom Hunger [Mon, 12 Jan 2015 15:40:43 +0000 (15:40 +0000)]
Add flask-testing.

11 years agoMatch README.md to reality.
Tom Hunger [Wed, 7 Jan 2015 22:41:04 +0000 (22:41 +0000)]
Match README.md to reality.

11 years agoAdd temporary hack to work around gevent bug.
Tom Hunger [Wed, 7 Jan 2015 17:11:24 +0000 (17:11 +0000)]
Add temporary hack to work around gevent bug.

11 years agoCommit basic new structure of sirius.
Tom Hunger [Wed, 7 Jan 2015 16:25:37 +0000 (16:25 +0000)]
Commit basic new structure of sirius.

This is a fairly big commit because it took some fiddling to get the
structure right.

Note also that we're deleting the database and clearing out the
migrations while the models still change a lot like this:

    rm sirius/data.sqlite
    rm migrations/versions/*
    ./manage.py db  revision --autogenerate -m "Sirius models."
    ./manage.py db upgrade

The web frontend lives in sirius.web.

11 years agoIn ./manage.py run webbapp from sirius directory instead of old app.
Tom Hunger [Tue, 6 Jan 2015 09:59:37 +0000 (09:59 +0000)]
In ./manage.py run webbapp from sirius directory instead of old app.

11 years agoAdd documentation for how to set up a digitial-ocean instance.
Tom Hunger [Mon, 5 Jan 2015 17:43:14 +0000 (17:43 +0000)]
Add documentation for how to set up a digitial-ocean instance.

11 years agoLog gunicorn output to stdout.
Tom Hunger [Mon, 5 Jan 2015 16:24:05 +0000 (16:24 +0000)]
Log gunicorn output to stdout.

This is where dokku/heroku read their logs so it is necessary
to make dokku log  work.

11 years agoCorrectly classify messages with missing fields / broken base64 as Malformed.
Tom Hunger [Mon, 22 Dec 2014 18:58:30 +0000 (18:58 +0000)]
Correctly classify messages with missing fields / broken base64 as Malformed.

11 years agoInitial protocol sketch for maintaining the bridge/device state.
Tom Hunger [Mon, 22 Dec 2014 18:05:05 +0000 (18:05 +0000)]
Initial protocol sketch for maintaining the bridge/device state.

This version is dealing just with state initiated by bridges and
devices. The only "user-initiated" state is a fake claims database.

The next step is specifying a database schema that allows modifying
the little printer world, e.g. claiming one, queuing messages etc.

The last step is making sure that these intentions are communicated
down-stream + dealing with any errors that can arise (timeout, printer
out of paper etc.).

12 years agoadding a claim code
Matt Webb [Wed, 1 Oct 2014 12:56:39 +0000 (13:56 +0100)]
adding a claim code