Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy a demo #1

Closed
simonw opened this issue Aug 21, 2018 · 2 comments
Closed

Deploy a demo #1

simonw opened this issue Aug 21, 2018 · 2 comments

Comments

@simonw
Copy link
Owner

simonw commented Aug 21, 2018

I can derive it from my Firefox favicons database.

@simonw
Copy link
Owner Author

simonw commented Aug 21, 2018

I started with my favicons database:

cp ~/Library/Application\ Support/Firefox/Profiles/.../favicons.sqlite favicons.db

I created a new table to re-order the table columns (I wanted the data column first, not last):

$ sqlite3 favicons.db
sqlite> create table favicons as select id, data, icon_url, fixed_icon_url_hash, width, root, color, expire_ms from moz_icons;

Then I deleted most of the rows:

sqlite> delete from favicons where id > 100;

And the other tables:

sqlite> drop table moz_icons;
sqlite> drop table moz_icons_to_pages;
sqlite> drop table moz_pages_w_icons;
sqlite> drop table sqlite_stat1;

Finally I ran vacuum to clean up the deleted tables:

sqlite> VACUUM;

Then I deployed the demo like so:

datasette publish now favicons.db \
  --branch=master \
  --install datasette-render-images \
  -n datasette-render-images-demo \
  --source=datasette-render-images \
  --source_url=https://github.com/simonw/datasette-render-images \
  --title="datasette-render-images demo"

@simonw
Copy link
Owner Author

simonw commented Aug 21, 2018

@simonw simonw closed this as completed in edb4719 Aug 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant