├── example ├── .meteor │ ├── .gitignore │ ├── release │ ├── platforms │ ├── .id │ ├── .finished-upgraders │ ├── packages │ └── versions ├── packages │ └── acemtp:meta-extractor ├── example.css ├── example.html └── example.js ├── .npm └── package │ ├── .gitignore │ ├── npm-shrinkwrap.json │ └── README ├── .versions ├── package.js ├── LICENSE.txt ├── README.md └── meta-extractor.js /example/.meteor/.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | -------------------------------------------------------------------------------- /.npm/package/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /example/.meteor/release: -------------------------------------------------------------------------------- 1 | METEOR@1.2.1 2 | -------------------------------------------------------------------------------- /example/packages/acemtp:meta-extractor: -------------------------------------------------------------------------------- 1 | ../.. -------------------------------------------------------------------------------- /example/.meteor/platforms: -------------------------------------------------------------------------------- 1 | server 2 | browser 3 | -------------------------------------------------------------------------------- /example/example.css: -------------------------------------------------------------------------------- 1 | /* CSS declarations go here */ 2 | -------------------------------------------------------------------------------- /.npm/package/npm-shrinkwrap.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "he": { 4 | "version": "0.5.0" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /.versions: -------------------------------------------------------------------------------- 1 | acemtp:meta-extractor@1.0.4 2 | base64@1.0.4 3 | check@1.1.0 4 | ejson@1.0.7 5 | http@1.1.1 6 | meteor@1.1.10 7 | underscore@1.0.4 8 | url@1.0.5 9 | -------------------------------------------------------------------------------- /example/.meteor/.id: -------------------------------------------------------------------------------- 1 | # This file contains a token that is unique to your project. 2 | # Check it into your repository along with the rest of this directory. 3 | # It can be used for purposes such as: 4 | # - ensuring you don't accidentally deploy one app on top of another 5 | # - providing package authors with aggregated statistics 6 | 7 | mrs3cw1lsrdzr1d32he5 8 | -------------------------------------------------------------------------------- /example/example.html: -------------------------------------------------------------------------------- 1 |
2 |Enter an url (don't forget to start with http://) then press enter to extract metas
11 | 12 |{{metas}}
13 |
14 |
--------------------------------------------------------------------------------
/example/.meteor/.finished-upgraders:
--------------------------------------------------------------------------------
1 | # This file contains information which helps Meteor properly upgrade your
2 | # app when you run 'meteor update'. You should check it into version control
3 | # with your project.
4 |
5 | notices-for-0.9.0
6 | notices-for-0.9.1
7 | 0.9.4-platform-file
8 | notices-for-facebook-graph-api-2
9 | 1.2.0-standard-minifiers-package
10 | 1.2.0-meteor-platform-split
11 | 1.2.0-cordova-changes
12 | 1.2.0-breaking-changes
13 |
--------------------------------------------------------------------------------
/.npm/package/README:
--------------------------------------------------------------------------------
1 | This directory and the files immediately inside it are automatically generated
2 | when you change this package's NPM dependencies. Commit the files in this
3 | directory (npm-shrinkwrap.json, .gitignore, and this README) to source control
4 | so that others run the same versions of sub-dependencies.
5 |
6 | You should NOT check in the node_modules directory that Meteor automatically
7 | creates; if you are using git, the .gitignore file tells git to ignore it.
8 |
--------------------------------------------------------------------------------
/package.js:
--------------------------------------------------------------------------------
1 | Package.describe({
2 | name: 'acemtp:meta-extractor',
3 | version: '1.0.4',
4 | summary: 'Extract meta tags (Opengraph/Facebook, Twitter, meta) from an url or a string on client & server.',
5 | git: 'https://github.com/efounders/meteor-meta-extractor',
6 | documentation: 'README.md'
7 | });
8 |
9 | Package.onUse(function(api) {
10 | api.versionsFrom('0.9.0');
11 | Npm.depends({
12 | "he": "0.5.0"
13 | });
14 | api.use(['http', 'check'], ['server']);
15 | api.addFiles('meta-extractor.js');
16 | api.export('extractMeta');
17 | });
18 |
--------------------------------------------------------------------------------
/example/example.js:
--------------------------------------------------------------------------------
1 | if (Meteor.isClient) {
2 | Session.set('metas', '');
3 |
4 | Template.extract.helpers({
5 | metas() { return Session.get('metas'); },
6 | });
7 |
8 | Template.extract.events({
9 | 'keyup #url'(e) {
10 | if (e.keyCode !== 13) return;
11 | const url = $('#url').val();
12 | console.log('extract', url);
13 | Session.set('metas', 'Extracting ' + url + '...');
14 | extractMeta(url, (err, res) => {
15 | if (err) {
16 | console.error('err while extracting metas', err);
17 | Session.set('metas', 'Error: ' + err);
18 | } else {
19 | Session.set('metas', JSON.stringify(res, null, ' '));
20 | }
21 | });
22 | }
23 | });
24 | }
25 |
--------------------------------------------------------------------------------
/example/.meteor/packages:
--------------------------------------------------------------------------------
1 | # Meteor packages used by this project, one per line.
2 | # Check this file (and the other files in this directory) into your repository.
3 | #
4 | # 'meteor add' and 'meteor remove' will edit this file for you,
5 | # but you can also edit it by hand.
6 |
7 | meteor-base # Packages every Meteor app needs to have
8 | mobile-experience # Packages for a great mobile UX
9 | mongo # The database Meteor supports right now
10 | blaze-html-templates # Compile .html files into Meteor Blaze views
11 | session # Client-side reactive dictionary for your app
12 | jquery # Helpful client-side library
13 | tracker # Meteor's client-side reactive programming library
14 |
15 | standard-minifiers # JS/CSS minifiers run for production mode
16 | es5-shim # ECMAScript 5 compatibility for older browsers.
17 | ecmascript # Enable ECMAScript2015+ syntax in app code
18 |
19 | autopublish # Publish all data to the clients (for prototyping)
20 | insecure # Allow all DB writes from clients (for prototyping)
21 | acemtp:meta-extractor
22 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2013 Chris Mather