Giter Site home page Giter Site logo

quill's Introduction

Quill

Micropub client written in PHP.

A hosted version is available to try at:

https://quill.p3k.io/

Dependencies

  • PHP
  • MySQL or SQLite
  • Composer for further dependency installation

Setup

  • Follow the "Web Server Configuration" section
  • Run composer install
  • Copy lib/config.template.php to lib/config.php and adjust it
  • Import schema/mysql.sql (or schema/sqlite.sql)
  • Open the Quill URL in your Browser

Web Server Configuration

Set the document root to the "public" folder of this repo, and ensure all requests are routed through public/index.php if they don't match a file.

nginx

server {
  listen       80;
  server_name  quill.dev;

  root /path/to/Quill/public;

  error_log  logs/quill.error.log  notice;

  try_files $uri /index.php?$args;

  location /index.php {
    fastcgi_pass    php-pool;
    fastcgi_index   index.php;
    include fastcgi_params;
    fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;
  }
}

Apache .htaccess

An .htaccess file is already located in the public/ folder.

Parameters

Quill supports a couple of URL GET parameters which can be used to pre-configure it:

  • me: Author URL for auto-sign in
  • dontask: Set to 1 to skip the "Sign In" endpoint status page
  • reply: URL to pre-fill into the "Reply To:" field

Contributing

By submitting code to this project, you agree to irrevocably release it under the same license as this project.

Credits

Quill icon designed by Juan Pablo Bravo from the Noun Project.

License

Copyright 2013-2016 by Aaron Parecki and contributors

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

quill's People

Contributors

aaronpk avatar cweiske avatar dshanske avatar jesterpm avatar kylewm avatar lcorbasson avatar martymcguire avatar prtksxna avatar ruxton avatar u0nel avatar voxpelli avatar zegnat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

quill's Issues

add image-option to note editor

it would be nice to have an optional form field in the note editor for an image (or serveral images) that will be send as file via post to the micropub-endpoint.

PHP error on my own instance

Hi,

I managed to install it no my own machine, and I get really far, token fetching and everything works, until I reach the /new URL before trying to publish something at the bottom of the page. It seems to prevent posting something...

Type: ErrorException
Code: 8
Message: Undefined property: Savant3::$authorizing
File: /var/www/Quill/views/layout.php
Line: 78

Add "syndicate" checkboxes

The post interface should query the micropub endpoint to see what syndication URLs are supported, then render checkboxes for each.

Check for HTTP 201/202 properly

lol, I've been getting SUCH weird errors, but I finally found out why...

Quill kept on sending me to https://quill.p3k.io/" . $url, true, 201);, or whatever I did put in header("Location: "). Turned out that in debug mode (in which it was), my server just outputs all my source code. And Quill just checks for the location... :')

lib/helpers.php line 100:

  // Check the response and look for a "Location" header containing the URL
  if($r['response'] && preg_match('/Location: (.+)/', $r['response'], $match)) {
    $r['location'] = trim($match[1]);
    $user->micropub_success = 1;
  } else {
    $r['location'] = false;
  }

Add a param for in-reply-to

By using ?url= or similar, it allows us to create applications that send replies using Quill as a micropub client. My specific use-case is an app for android that adds to the Twitter's share menu.

Support RSVP

I've been posting RSVP's via other ways, but it would be really nice if Quill supported them too.

It could be a separate view, like /favorite or /bookmark, but since an RSVP is just a in-reply-to with an rsvp field, it could also just come from the note section /new.

Got a little carried away with my mockup in macOS Preview:
rsvp

This would also mean that the preview should detect the post replying to is an event, but it already does detect entries, it seems, because the preview fails for events at the moment.

error on returning from authentication at hosted known

I tried to log in using known.kevinmarks.com, and got the following error after being redirected back to quill:

Slim Application Error
The application could not run because of the following error:

Details

Type: ErrorException
Code: 2
Message: array_key_exists() expects parameter 2 to be array, string given
File: /web/sites/quill.p3k.io/lib/helpers.php
Line: 208
Trace
#0 [internal function]: Slim\Slim::handleErrors(2, 'array_key_exist...', '/web/sites/quil...', 208, Array)
#1 /web/sites/quill.p3k.io/lib/helpers.php(208): array_key_exists('service', 'twitter::kevinm...')
#2 /web/sites/quill.p3k.io/controllers/auth.php(217): get_syndication_targets(Object(ORM))
#3 [internal function]: {closure}()
#4 /web/sites/quill.p3k.io/vendor/slim/slim/Slim/Router.php(172): call_user_func_array(Object(Closure), Array)
#5 /web/sites/quill.p3k.io/vendor/slim/slim/Slim/Slim.php(1222): Slim\Router->dispatch(Object(Slim\Route))
#6 /web/sites/quill.p3k.io/vendor/slim/slim/Slim/Middleware/Flash.php(86): Slim\Slim->call()
#7 /web/sites/quill.p3k.io/vendor/slim/slim/Slim/Middleware/MethodOverride.php(94): Slim\Middleware\Flash->call()
#8 /web/sites/quill.p3k.io/vendor/slim/slim/Slim/Middleware/PrettyExceptions.php(67): Slim\Middleware\MethodOverride->call()
#9 /web/sites/quill.p3k.io/vendor/slim/slim/Slim/Slim.php(1174): Slim\Middleware\PrettyExceptions->call()
#10 /web/sites/quill.p3k.io/public/index.php(23): Slim\Slim->run()
#11 {main}

Add a loading indicator

As my micropub endpoint is hosted on a free Heroku account currently it's startup time can be fairly slow if I haven't posted in a while so it can take a few seconds for it to finish and right now Quill gives no feedback that it has actually started to process my request (at least not when I'm adding a like).

Would be a neater experience if it added some kind of loading indicator :)

move photo upload to note interface

Currently there is not a good reason to have the photo UI as a separate page from posting notes. Instead, the photo field should be added to the note interface.

The note interface posts via Javascript instead of a direct post. We'll need a way to upload the photo via ajax as well.

Clean up the HTML from the visual editor

The visual editor currently includes a couple of unnecessary classes such as medium-insert-images ui-sortable. These should be stripped out before Quill sends the HTML to the Micropub endpoint.

Bonus points if it can also format the HTML nicely, since right now there are some very long lines and awkward line breaks which makes editing the HTML by hand later harder.

add option to upload images instead of inline them

Right now, Quill turns image embeds into data URIs so that they Just Workβ„’

Some people might want to handle the photo upload on their own, storing it on disk or in their S3 account or something. The editor could support an option that would send the photo to the Micropub endpoint as a photo post, so that it could store the photo somewhere, returning the URL to Quill.

Not clear when you are already signed in

Once you are signed in, the profile url is below the fold. When you return to quill after posting, the main call to action is still the login box, so you end up logging in again, redundantly.

Publish SQL schema to ease local testing

I reverse-engineered one that was close enough:

CREATE TABLE IF NOT EXISTS `users` (
  id                       INTEGER AUTO_INCREMENT PRIMARY KEY,
  url                      VARCHAR(512),
  date_created             TIMESTAMP,
  token_endpoint           VARCHAR(512),
  authorization_endpoint   VARCHAR(512),
  micropub_endpoint        VARCHAR(512),
  micropub_access_token    VARCHAR(512),
  last_login               TIMESTAMP,
  micropub_scope           VARCHAR(512),
  micropub_response        TEXT,
  syndication_targets      TEXT
) CHARSET=utf8;

misleading error for wrong endpoint protocol

I overlooked that the configuration guide suggestion for a included my domain over HTTPS (despite logging in with HTTP and not supporting HTTPS) and copy-pasted it without changing the protocol to HTTP.

The only error displayed on trying to post was "Response did not include a Location header". I would have found the mistake quicker if Quill had given me a more low-level error and repeated the endpoint address in the error message. ("network connection refused: example.com:443")

Use php array syntax instead of comma-separated list

We're updating the micropub spec to use array syntax instead of comma-separated lists when needing to specify multiple values. Quill will need to be updated to send the syndicate-to parameter as an array (syndicate-to[]=twitter) rather than comma-separated list.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.