Add initial Linux support #150
Key features of Linux support: - It supports python 3 scripts execution. - It supports Flatpak and Snap installation for software clean-up/configurations. - Extensive documentation.
This commit is contained in:
@@ -33,17 +33,18 @@ describe('collections', () => {
|
||||
});
|
||||
|
||||
function collectUniqueUrls(app: IApplication): string[] {
|
||||
return app
|
||||
.collections
|
||||
.flatMap((a) => a.getAllScripts())
|
||||
.flatMap((script) => script.docs?.flatMap((doc) => parseUrls(doc)))
|
||||
return [ // Get all nodes
|
||||
...app.collections.flatMap((c) => c.getAllCategories()),
|
||||
...app.collections.flatMap((c) => c.getAllScripts()),
|
||||
]
|
||||
// Get all docs
|
||||
.flatMap((documentable) => documentable.docs)
|
||||
// Parse all URLs
|
||||
.flatMap((docString) => docString.match(/(https?:\/\/[^\s]+)/g) || [])
|
||||
// Remove duplicates
|
||||
.filter((url, index, array) => array.indexOf(url) === index);
|
||||
}
|
||||
|
||||
function parseUrls(text: string): string[] {
|
||||
return text?.match(/\bhttps?:\/\/\S+/gi) ?? [];
|
||||
}
|
||||
|
||||
function printUrls(statuses: IUrlStatus[]): string {
|
||||
/* eslint-disable prefer-template */
|
||||
return '\n'
|
||||
|
||||
Reference in New Issue
Block a user