EATags is a service that binds with your Evernote account and allows you to invoke new features tagging your notes on your preferred Evernote client. Post tweets, post notes to wordpress, create a table of content from a note, create LaTeX images from formulas, and much more.
The service is developed with PHP framework CodeIgniter 2.1.0.
- Clone the repository on a LAMP environment
- OAuth, headers, proxy and rewrite php/apache modules must be enabled
- Make and enable the VirtualHost pointing to your cloned folder, and set the ENVIRONMENT in VirtualHost file.
- The apache user must be the owner of the folder
application/logs
to properly write codeigniter logs
- Create a mysql database
- Create a db user for the project and give him/her permissions to all the tables of the created schema
- Import the sql file with the structure and needed data
- Request an Evernote (Full Access) API Key Evernote Developer Documentation
- For developing purposes you should use Evernote's Sandbox
- Same for google, twitter and flickr if you want to enable those features
- Register webhooks Webhooks
- As they say on previous link, open a developer support ticket
- Url must point to your url + /evernote_webhook/index
- You can specify a test_url (your dev url + /evernote_webhook/eat_that) and is_test_user on Users table
- In
application/config/constants.php
replace the *_KEYs and *_SECRETs of the mentioned services, the db info and *_URLs- Adapt
application/config/database.php
to your environments
- Adapt
- Check everything works
- web
- login
- configurations
- use some eat.tag on Evernote, verify you recieve the webhook and the system process the tag (you should see entries on log)
- Evernote user registers on EATags, confirms email and account is activated.
- User links Evernote account with EATags.
- User tags some note with an eat.tag
- Evernote sends a webhook (GET notification) to YOUR_URL + /evernote_webhook/index that looks like:
- [base URL]/?userId=[user ID]&guid=[note GUID]¬ebookGuid=[notebook GUID]&reason=update
- If the user is a test_user index() method redirects to test_url (mentioned at installation's 4th point)
- This way you can have just a webhook reciever and multiple developer's working environments
- eat_that() method in Evernote_webhook Controller recieves the webhook, makes validations and sends the tag to Action_note library
- execute_action_by_tag() method in Action_note sends the tag to execute_action() method of the tag's model
- If there's no error, model returns the new note, and Evernote_webhook sends the update to Evernote.
- User should see the changes on his/her note (if in web, a refresh may be needed)
- where the eat.tag has been removed and an eaten:[tag] (defined at tags db table) inserted
-
Read their user guide
-
File's structure:
- eat/application/views => layout (we slightly use bootstrap 2.0.4 & {less})
- eat/application/controllers => code that directly connects with views and models
- eat/application/models => db stuff and business logic
- eat/application/libraries => loaded external libraries