diff --git a/fixtures/github.com/1551742565097.html b/fixtures/github.com/1551742565097.html new file mode 100644 index 000000000..4cd4c6160 --- /dev/null +++ b/fixtures/github.com/1551742565097.html @@ -0,0 +1,822 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GitHub - steventroughtonsmith/marzipanify: Convert an iOS Simulator app bundle to an iOSMac (Marzipan) one (Unsupported & undocumented, WIP) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Skip to content +
+ + + +
+
+ +
+
+
Please note that GitHub no longer supports your web browser.
+

We recommend upgrading to the latest Google Chrome or Firefox.

+
+ +
+
+
+ + + + + + +
+ +
+ +
+ +
+ + + +
+
+
+ + + + + + + + +
+
+ + + + + + +
+ + Convert an iOS Simulator app bundle to an iOSMac (Marzipan) one (Unsupported & undocumented, WIP) + +
+
+ + + + + + + + + + + + + +
+ +
+ + Branch: + master + + + + + + + +
+ + + + + + + + + +
+ + Clone or download + + +
+ +
+
+ +
+ + + + + +
+ +
+
+ + @steventroughtonsmith +
+
+ + +
+ Latest commit + + c61eae8 + + Mar 4, 2019 +
+
+ + + +
+ Permalink + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameLatest commit messageCommit time
Failed to load latest commit information.
+ + + + marzipanify.xcodeproj + + + Added a little more context for incompatible binaries now that 10.14b… + + + Jul 4, 2018 +
+ + + + marzipanify + + + Merge pull request #2 from AndrianBdn/master + + + Jul 12, 2018 +
+ + + + LICENSE.md + + + Added Unlicense license + + + Mar 4, 2019 +
+ + + + README.md + + + Create README.md + + + Jul 3, 2018 +
+ +
+ + + +
+
+

+ + README.md +

+
+
+

marzipanify

+

marzipanify is an unsupported commandline tool to take an existing iOS Simulator binary (with minimum deployment target of iOS 12.0) and statically convert it and its embedded libraries & frameworks to run on macOS 10.14's UIKit runtime (Marzipan).

+

This isn't a tool to automatically port your iOS app to the Mac — moreso something to get you up and running quickly.

+

As an iOS Simulator app links against the iOS Simulator version of UIKit, it won't contain Marzipan-specific APIs like menu & window toolbar support. It's up to the user to know how to class-dump UIKitCore from /System/iOSSupport/System/Library/PrivateFrameworks and check for the macOS-specific UIKit APIs at runtime so the app can be a good Mac citizen.

+

N.B. You will still need all the relevant Marzipan-related enabler steps (like disabling SIP & AMFI) before a converted app will run with your signature.

+

Usage

+

marzipanify MyApp.app|MyFramework.framework|MyBinary

+

Screenshot

+

screenshot

+
+
+
+ + + +
+ +
+ +
+
+ + +
+ + + + + + +
+ + + You can’t perform that action at this time. +
+ + + +
+ + You signed in with another tab or window. Reload to refresh your session. + You signed out in another tab or window. Reload to refresh your session. +
+ + + + +
+ + + + diff --git a/src/extractors/custom/github.com/index.js b/src/extractors/custom/github.com/index.js new file mode 100644 index 000000000..f3fa22796 --- /dev/null +++ b/src/extractors/custom/github.com/index.js @@ -0,0 +1,38 @@ +export const GithubComExtractor = { + domain: 'github.com', + + title: { + selectors: [['meta[name="og:title"]', 'value']], + }, + + author: { + selectors: [ + // enter author selectors + ], + }, + + date_published: { + selectors: [['span[itemprop="dateModified"] relative-time', 'datetime']], + }, + + dek: { + selectors: ['span[itemprop="about"]'], + }, + + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + + content: { + selectors: [['#readme article']], + + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, +}; diff --git a/src/extractors/custom/github.com/index.test.js b/src/extractors/custom/github.com/index.test.js new file mode 100644 index 000000000..a9fbf80cb --- /dev/null +++ b/src/extractors/custom/github.com/index.test.js @@ -0,0 +1,109 @@ +import assert from 'assert'; +import URL from 'url'; +import cheerio from 'cheerio'; + +import Mercury from 'mercury'; +import getExtractor from 'extractors/get-extractor'; +import { excerptContent } from 'utils/text'; + +const fs = require('fs'); + +describe('GithubComExtractor', () => { + describe('initial test case', () => { + let result; + let url; + beforeAll(() => { + url = 'https://github.com/steventroughtonsmith/marzipanify'; + const html = fs.readFileSync('./fixtures/github.com/1551742565097.html'); + result = Mercury.parse(url, { html, fallback: false }); + }); + + it('is selected properly', () => { + // This test should be passing by default. + // It sanity checks that the correct parser + // is being selected for URLs from this domain + const extractor = getExtractor(url); + assert.equal(extractor.domain, URL.parse(url).hostname); + }); + + it('returns the title', async () => { + // To pass this test, fill out the title selector + // in ./src/extractors/custom/github.com/index.js. + const { title } = await result; + + // Update these values with the expected values from + // the article. + assert.equal(title, `steventroughtonsmith/marzipanify`); + }); + + it('returns the author', async () => { + // To pass this test, fill out the author selector + // in ./src/extractors/custom/github.com/index.js. + const { author } = await result; + + // Update these values with the expected values from + // the article. + assert.equal(author, null); + }); + + it('returns the date_published', async () => { + // To pass this test, fill out the date_published selector + // in ./src/extractors/custom/github.com/index.js. + const { date_published } = await result; + + // Update these values with the expected values from + // the article. + assert.equal(date_published, '2019-03-04T12:37:07.000Z'); + }); + + it('returns the dek', async () => { + // To pass this test, fill out the dek selector + // in ./src/extractors/custom/github.com/index.js. + const { dek } = await result; + + // Update these values with the expected values from + // the article. + assert.equal( + dek, + 'Convert an iOS Simulator app bundle to an iOSMac (Marzipan) one (Unsupported & undocumented, WIP)' + ); + }); + + it('returns the lead_image_url', async () => { + // To pass this test, fill out the lead_image_url selector + // in ./src/extractors/custom/github.com/index.js. + const { lead_image_url } = await result; + + // Update these values with the expected values from + // the article. + assert.equal( + lead_image_url, + `https://avatars0.githubusercontent.com/u/45212?s=400&v=4` + ); + }); + + it('returns the content', async () => { + // To pass this test, fill out the content selector + // in ./src/extractors/custom/github.com/index.js. + // You may also want to make use of the clean and transform + // options. + const { content } = await result; + + const $ = cheerio.load(content || ''); + + const first13 = excerptContent( + $('*') + .first() + .text(), + 13 + ); + + // Update these values with the expected values from + // the article. + assert.equal( + first13, + 'marzipanify is an unsupported commandline tool to take an existing iOS Simulator binary' + ); + }); + }); +}); diff --git a/src/extractors/custom/index.js b/src/extractors/custom/index.js index 407f74348..efdce6d83 100644 --- a/src/extractors/custom/index.js +++ b/src/extractors/custom/index.js @@ -93,4 +93,5 @@ export * from './www.fortinet.com'; export * from './www.fastcompany.com'; export * from './blisterreview.com'; export * from './news.mynavi.jp'; -export * from './www.reddit.com'; +export * from './github.com'; +export * from './www.reddit.com'; \ No newline at end of file