issue_comments

18 rows where user = 7936571 sorted by updated_at descending

View and edit SQL

Suggested facets: issue_url, created_at (date), updated_at (date)

user

  • chrismp · 18

author_association

id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue
509431603 https://github.com/simonw/datasette/issues/514#issuecomment-509431603 https://api.github.com/repos/simonw/datasette/issues/514 MDEyOklzc3VlQ29tbWVudDUwOTQzMTYwMw== chrismp 7936571 2019-07-08T23:39:52Z 2019-07-08T23:39:52Z NONE

In datasette.service, I edited

User=chris

To...

User=root

It worked. I can access http://my-server.com. I hope this is safe. Thanks for all the help, everyone.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Documentation with recommendations on running Datasette in production without using Docker 459397625
509042334 https://github.com/simonw/datasette/issues/498#issuecomment-509042334 https://api.github.com/repos/simonw/datasette/issues/498 MDEyOklzc3VlQ29tbWVudDUwOTA0MjMzNA== chrismp 7936571 2019-07-08T00:18:29Z 2019-07-08T00:18:29Z NONE

@simonw I made this primitive search that I've put in my Datasette project's custom templates directory: https://gist.github.com/chrismp/e064b41f08208a6f9a93150a23cf7e03

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Full text search of all tables at once? 451513541
508590397 https://github.com/simonw/datasette/issues/498#issuecomment-508590397 https://api.github.com/repos/simonw/datasette/issues/498 MDEyOklzc3VlQ29tbWVudDUwODU5MDM5Nw== chrismp 7936571 2019-07-04T23:34:41Z 2019-07-04T23:34:41Z NONE

I'll take your suggestion and do this all in Javascript. Would I need to make a static/ folder in my datasette project's root directory and make a custom index.html template that pulls from static/js/search-all-fts.js? Or would you suggest another way?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Full text search of all tables at once? 451513541
506985050 https://github.com/simonw/datasette/issues/498#issuecomment-506985050 https://api.github.com/repos/simonw/datasette/issues/498 MDEyOklzc3VlQ29tbWVudDUwNjk4NTA1MA== chrismp 7936571 2019-06-29T20:28:21Z 2019-06-29T20:28:21Z NONE

In my case, I have an ever-growing number of databases and tables within them. Most tables have FTS enabled. I cannot predict the names of future tables and databases, nor can I predict the names of the columns for which I wish to enable FTS.

For my purposes, I was thinking of writing up something that sends these two GET requests to each of my databases' tables.

http://my-server.com/database-name/table-name.json?_search=mySearchString
http://my-server.com/database-name/table-name.json

In the resulting JSON strings, I'd check the value of the key filtered_table_rows_count. If the value is 0 in the first URL's result, or if values from both requests are the same, that means FTS is either disabled for the table or it has no rows matching the search query.

Is this feasible within the datasette library, or would it require some type of plugin? Or maybe you know of a better way of accomplishing this goal. Maybe I overlooked something.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Full text search of all tables at once? 451513541
505232675 https://github.com/simonw/datasette/issues/514#issuecomment-505232675 https://api.github.com/repos/simonw/datasette/issues/514 MDEyOklzc3VlQ29tbWVudDUwNTIzMjY3NQ== chrismp 7936571 2019-06-25T00:43:12Z 2019-06-25T00:43:12Z NONE

Yep, that worked to get the site up and running at my-server.com:8000 but when I edited run-datasette.sh to contain this...

#!/bin/bash
/home/chris/Env/datasette/bin/datasette serve -h 0.0.0.0 -p 80 /home/chris/digital-library/databases/*.db --cors --metadata /home/chris/digital-library/metadata.json

I got this error.

Jun 25 02:42:41 ns331247 run-datasette.sh[747]: [2019-06-25 02:42:41 +0200] [752] [INFO] Goin' Fast @ http://0.0.0.0:80
Jun 25 02:42:41 ns331247 run-datasette.sh[747]: [2019-06-25 02:42:41 +0200] [752] [ERROR] Unable to start server
Jun 25 02:42:41 ns331247 run-datasette.sh[747]: Traceback (most recent call last):
Jun 25 02:42:41 ns331247 run-datasette.sh[747]:   File "uvloop/loop.pyx", line 1111, in uvloop.loop.Loop._create_server
Jun 25 02:42:41 ns331247 run-datasette.sh[747]:   File "uvloop/handles/tcp.pyx", line 89, in uvloop.loop.TCPServer.bind
Jun 25 02:42:41 ns331247 run-datasette.sh[747]:   File "uvloop/handles/streamserver.pyx", line 95, in uvloop.loop.UVStreamServer._fatal_error
Jun 25 02:42:41 ns331247 run-datasette.sh[747]:   File "uvloop/handles/tcp.pyx", line 87, in uvloop.loop.TCPServer.bind
Jun 25 02:42:41 ns331247 run-datasette.sh[747]:   File "uvloop/handles/tcp.pyx", line 26, in uvloop.loop.__tcp_bind
Jun 25 02:42:41 ns331247 run-datasette.sh[747]: PermissionError: [Errno 13] Permission denied
Jun 25 02:42:41 ns331247 run-datasette.sh[747]: During handling of the above exception, another exception occurred:
Jun 25 02:42:41 ns331247 run-datasette.sh[747]: Traceback (most recent call last):
Jun 25 02:42:41 ns331247 run-datasette.sh[747]:   File "/home/chris/Env/datasette/lib/python3.7/site-packages/sanic/server.py", line 591, in serve
Jun 25 02:42:41 ns331247 run-datasette.sh[747]:     http_server = loop.run_until_complete(server_coroutine)
Jun 25 02:42:41 ns331247 run-datasette.sh[747]:   File "uvloop/loop.pyx", line 1451, in uvloop.loop.Loop.run_until_complete
Jun 25 02:42:41 ns331247 run-datasette.sh[747]:   File "uvloop/loop.pyx", line 1684, in create_server
Jun 25 02:42:41 ns331247 run-datasette.sh[747]:   File "uvloop/loop.pyx", line 1116, in uvloop.loop.Loop._create_server
Jun 25 02:42:41 ns331247 run-datasette.sh[747]: PermissionError: [Errno 13] error while attempting to bind on address ('0.0.0.0', 80): permission denied
Jun 25 02:42:41 ns331247 run-datasette.sh[747]: [2019-06-25 02:42:41 +0200] [752] [INFO] Server Stopped
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Documentation with recommendations on running Datasette in production without using Docker 459397625
505228873 https://github.com/simonw/datasette/issues/498#issuecomment-505228873 https://api.github.com/repos/simonw/datasette/issues/498 MDEyOklzc3VlQ29tbWVudDUwNTIyODg3Mw== chrismp 7936571 2019-06-25T00:21:17Z 2019-06-25T00:21:17Z NONE

Eh, I'm not concerned with a relevance score right now. I think I'd be fine with a search whose results show links to data tables with at least one result.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Full text search of all tables at once? 451513541
504998302 https://github.com/simonw/datasette/issues/514#issuecomment-504998302 https://api.github.com/repos/simonw/datasette/issues/514 MDEyOklzc3VlQ29tbWVudDUwNDk5ODMwMg== chrismp 7936571 2019-06-24T12:57:19Z 2019-06-24T12:57:19Z NONE

Same error when I used the full path.

On Sun, Jun 23, 2019 at 18:31 Simon Willison notifications@github.com
wrote:

I suggest trying a full path in ExecStart like this:

ExecStart=/home/chris/Env/datasette/bin/datasette serve -h 0.0.0.0
/home/chris/digital-library/databases/*.db --cors --metadata metadata.json

That should eliminate the chance of some kind of path confusion.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/simonw/datasette/issues/514?email_source=notifications&email_token=AB4RUOZESVC5ZI2AZFJJD2TP372UJA5CNFSM4H2VJCSKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYLISIY#issuecomment-504793379,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AB4RUO243SPJ7YSWJU7YKF3P372UJANCNFSM4H2VJCSA
.

--
Chris Persaud
ChrisPersaud.com

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Documentation with recommendations on running Datasette in production without using Docker 459397625
504789231 https://github.com/simonw/datasette/issues/514#issuecomment-504789231 https://api.github.com/repos/simonw/datasette/issues/514 MDEyOklzc3VlQ29tbWVudDUwNDc4OTIzMQ== chrismp 7936571 2019-06-23T21:35:33Z 2019-06-23T21:35:33Z NONE

@russss

Thanks, just one more thing.

I edited datasette.service:

[Unit]
Description=Datasette
After=network.target

[Service]
Type=simple
User=chris
WorkingDirectory=/home/chris/digital-library
ExecStart=/home/chris/Env/datasette/bin/datasette serve -h 0.0.0.0 databases/*.db --cors --metadata metadata.json
Restart=on-failure

[Install]
WantedBy=multi-user.target

Then ran:

$ sudo systemctl daemon-reload
$ sudo systemctl enable datasette
$ sudo systemctl start datasette

But the logs from journalctl show this datasette error:

Jun 23 23:31:41 ns331247 datasette[1771]: Error: Invalid value for "[FILES]...": Path "databases/*.db" does not exist.
Jun 23 23:31:44 ns331247 datasette[1778]: Usage: datasette serve [OPTIONS] [FILES]...
Jun 23 23:31:44 ns331247 datasette[1778]: Try "datasette serve --help" for help.

But the databases directory does exist in the directory specified by WorkingDirectory. Is this a datasette problem or did I write something incorrectly in the .service file?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Documentation with recommendations on running Datasette in production without using Docker 459397625
504686266 https://github.com/simonw/datasette/issues/514#issuecomment-504686266 https://api.github.com/repos/simonw/datasette/issues/514 MDEyOklzc3VlQ29tbWVudDUwNDY4NjI2Ng== chrismp 7936571 2019-06-22T17:58:50Z 2019-06-23T21:21:57Z NONE

@russss

Actually, here's what I've got in /etc/systemd/system/datasette.service

[Unit]
Description=Datasette
After=network.target

[Service]
Type=simple
User=chris
WorkingDirectory=/home/chris/digital-library
ExecStart=/home/chris/Env/datasette/lib/python3.7/site-packages/datasette serve -h 0.0.0.0 databases/*.db --cors --metadata metadata.json
Restart=on-failure

[Install]
WantedBy=multi-user.target

I ran:

$ sudo systemctl daemon-reload
$ sudo systemctl enable datasette
$ sudo systemctl start datasette

Then I ran:
$ journalctl -u datasette -f

Got this message.

Hint: You are currently not seeing messages from other users and the system.
      Users in groups 'adm', 'systemd-journal', 'wheel' can see all messages.
      Pass -q to turn off this notice.
-- Logs begin at Thu 2019-06-20 00:05:23 CEST. --
Jun 22 19:55:57 ns331247 systemd[16176]: datasette.service: Failed to execute command: Permission denied
Jun 22 19:55:57 ns331247 systemd[16176]: datasette.service: Failed at step EXEC spawning /home/chris/Env/datasette/lib/python3.7/site-packages/datasette: Permission denied
Jun 22 19:55:57 ns331247 systemd[16184]: datasette.service: Failed to execute command: Permission denied
Jun 22 19:55:57 ns331247 systemd[16184]: datasette.service: Failed at step EXEC spawning /home/chris/Env/datasette/lib/python3.7/site-packages/datasette: Permission denied
Jun 22 19:55:58 ns331247 systemd[16186]: datasette.service: Failed to execute command: Permission denied
Jun 22 19:55:58 ns331247 systemd[16186]: datasette.service: Failed at step EXEC spawning /home/chris/Env/datasette/lib/python3.7/site-packages/datasette: Permission denied
Jun 22 19:55:58 ns331247 systemd[16190]: datasette.service: Failed to execute command: Permission denied
Jun 22 19:55:58 ns331247 systemd[16190]: datasette.service: Failed at step EXEC spawning /home/chris/Env/datasette/lib/python3.7/site-packages/datasette: Permission denied
Jun 22 19:55:58 ns331247 systemd[16191]: datasette.service: Failed to execute command: Permission denied
Jun 22 19:55:58 ns331247 systemd[16191]: datasette.service: Failed at step EXEC spawning /home/chris/Env/datasette/lib/python3.7/site-packages/datasette: Permission denied

When I go to the address for my server, I am met with the standard "Welcome to nginx" message:

Welcome to nginx!
If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

For online documentation and support please refer to nginx.org.
Commercial support is available at nginx.com.

Thank you for using nginx.
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Documentation with recommendations on running Datasette in production without using Docker 459397625
504785662 https://github.com/simonw/datasette/issues/498#issuecomment-504785662 https://api.github.com/repos/simonw/datasette/issues/498 MDEyOklzc3VlQ29tbWVudDUwNDc4NTY2Mg== chrismp 7936571 2019-06-23T20:47:37Z 2019-06-23T20:47:37Z NONE

Very cool, thank you.

Using http://search-24ways.herokuapp.com as an example, let's say I want to search all FTS columns in all tables in all databases for the word "web."

Here's a link to the query I'd need to run to search "web" on FTS columns in articles table of the 24ways database.

And here's a link to the JSON version of the above result. I'd like to get the JSON result of that query for each FTS table of each database in my datasette project.

Is it possible in Javascript to automate the construction of query URLs like the one I linked, but for every FTS table in my datasette project?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Full text search of all tables at once? 451513541
504685187 https://github.com/simonw/datasette/issues/514#issuecomment-504685187 https://api.github.com/repos/simonw/datasette/issues/514 MDEyOklzc3VlQ29tbWVudDUwNDY4NTE4Nw== chrismp 7936571 2019-06-22T17:43:24Z 2019-06-22T17:43:24Z NONE

WorkingDirectory=/path/to/data

@russss, Which directory does this represent?

It's the working directory (cwd) of the spawned process. In this case if you set it to the directory your data is in, you can use relative paths to the db (and metadata/templates/etc) in the ExecStart command.

In my case, on a remote server, I set up a virtual environment in /home/chris/Env/datasette, and when I activated that environment I ran pip install datasette.

My datasette project is in /home/chris/datatsette-project, so I guess I'd use that directory in the WorkingDirectory parameter?

And the ExecStart parameter would be /home/chris/Env/datasette/lib/python3.7/site-packages/datasette serve -h 0.0.0.0 my.db I'm guessing?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Documentation with recommendations on running Datasette in production without using Docker 459397625
504684709 https://github.com/simonw/datasette/issues/514#issuecomment-504684709 https://api.github.com/repos/simonw/datasette/issues/514 MDEyOklzc3VlQ29tbWVudDUwNDY4NDcwOQ== chrismp 7936571 2019-06-22T17:36:25Z 2019-06-22T17:36:25Z NONE

WorkingDirectory=/path/to/data

@russss, Which directory does this represent?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Documentation with recommendations on running Datasette in production without using Docker 459397625
503249999 https://github.com/simonw/datasette/issues/513#issuecomment-503249999 https://api.github.com/repos/simonw/datasette/issues/513 MDEyOklzc3VlQ29tbWVudDUwMzI0OTk5OQ== chrismp 7936571 2019-06-18T18:11:36Z 2019-06-18T18:11:36Z NONE

Ah, so basically put the SQLite databases on Linode, for example, and run datasette serve on there? I'm comfortable with that.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Is it possible to publish to Heroku despite slug size being too large? 457201907
503237884 https://github.com/simonw/datasette/issues/502#issuecomment-503237884 https://api.github.com/repos/simonw/datasette/issues/502 MDEyOklzc3VlQ29tbWVudDUwMzIzNzg4NA== chrismp 7936571 2019-06-18T17:39:18Z 2019-06-18T17:46:08Z NONE

It appears that I cannot reopen this issue but the proposed solution did not solve it. The link is not there. I have full text search enabled for a bunch of tables in my database and even clicking the link to reveal hidden tables did not show the download DB link.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Exporting sqlite database(s)? 453131917
503236800 https://github.com/simonw/datasette/issues/512#issuecomment-503236800 https://api.github.com/repos/simonw/datasette/issues/512 MDEyOklzc3VlQ29tbWVudDUwMzIzNjgwMA== chrismp 7936571 2019-06-18T17:36:37Z 2019-06-18T17:36:37Z NONE

Oh I didn't know the description field could be used for a database's metadata.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
"about" parameter in metadata does not appear when alone 457147936
501903071 https://github.com/simonw/datasette/issues/498#issuecomment-501903071 https://api.github.com/repos/simonw/datasette/issues/498 MDEyOklzc3VlQ29tbWVudDUwMTkwMzA3MQ== chrismp 7936571 2019-06-13T22:35:06Z 2019-06-13T22:35:06Z NONE

I'd like to start working on this. I've made a custom template for index.html that contains a form that contains a search input. But I'm not sure where to go from here. When user enters a search term, I'd like for that term to go into a function I'll make that will search all tables with full text search enabled.

Can I make additional custom Python scripts for this or must I edit datasette's files directly?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Full text search of all tables at once? 451513541
499262397 https://github.com/simonw/datasette/issues/498#issuecomment-499262397 https://api.github.com/repos/simonw/datasette/issues/498 MDEyOklzc3VlQ29tbWVudDQ5OTI2MjM5Nw== chrismp 7936571 2019-06-05T21:28:32Z 2019-06-05T21:28:32Z NONE

Thinking about this more, I'd probably have to make a template page to go along with this, right? I'm guessing there's no way to add an all-databases-all-tables search to datasette's "home page" except by copying the "home page" template and editing it?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Full text search of all tables at once? 451513541
499260727 https://github.com/simonw/datasette/issues/499#issuecomment-499260727 https://api.github.com/repos/simonw/datasette/issues/499 MDEyOklzc3VlQ29tbWVudDQ5OTI2MDcyNw== chrismp 7936571 2019-06-05T21:22:55Z 2019-06-05T21:22:55Z NONE

I was thinking of having some kind of GUI in which regular reporters can upload a CSV and choose how to name the tables, columns and whatnot. Maybe it's possible to make such a GUI using Jinja template language? I ask because I'm unsure how to pursue this but I'd like to try.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Accessibility for non-techie newsies?  451585764

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
);
CREATE INDEX [idx_issue_comments_issue]
                ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
                ON [issue_comments] ([user]);
Powered by Datasette · Query took 31.888ms · About: github-to-sqlite