Add support for many categories

Add  Languages section
This commit is contained in:
Serhii Londar 2019-04-23 02:01:36 +03:00
parent 955943bc85
commit 3617c468fe
12 changed files with 3561 additions and 1337 deletions

View file

@ -0,0 +1,300 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
E8FDFD7F226E769900FE80E7 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8FDFD7E226E769900FE80E7 /* main.swift */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
E8FDFD70226E74F400FE80E7 /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = /usr/share/man/man1/;
dstSubfolderSpec = 0;
files = (
);
runOnlyForDeploymentPostprocessing = 1;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
E8FDFD72226E74F400FE80E7 /* ReadmeGenerator */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = ReadmeGenerator; sourceTree = BUILT_PRODUCTS_DIR; };
E8FDFD7E226E769900FE80E7 /* main.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = SOURCE_ROOT; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
E8FDFD6F226E74F400FE80E7 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
E8FDFD69226E74F400FE80E7 = {
isa = PBXGroup;
children = (
E8FDFD74226E74F400FE80E7 /* ReadmeGenerator */,
E8FDFD73226E74F400FE80E7 /* Products */,
);
sourceTree = "<group>";
};
E8FDFD73226E74F400FE80E7 /* Products */ = {
isa = PBXGroup;
children = (
E8FDFD72226E74F400FE80E7 /* ReadmeGenerator */,
);
name = Products;
sourceTree = "<group>";
};
E8FDFD74226E74F400FE80E7 /* ReadmeGenerator */ = {
isa = PBXGroup;
children = (
E8FDFD7E226E769900FE80E7 /* main.swift */,
);
path = ReadmeGenerator;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
E8FDFD71226E74F400FE80E7 /* ReadmeGenerator */ = {
isa = PBXNativeTarget;
buildConfigurationList = E8FDFD79226E74F400FE80E7 /* Build configuration list for PBXNativeTarget "ReadmeGenerator" */;
buildPhases = (
E8FDFD6E226E74F400FE80E7 /* Sources */,
E8FDFD6F226E74F400FE80E7 /* Frameworks */,
E8FDFD70226E74F400FE80E7 /* CopyFiles */,
);
buildRules = (
);
dependencies = (
);
name = ReadmeGenerator;
productName = ReadmeGenerator;
productReference = E8FDFD72226E74F400FE80E7 /* ReadmeGenerator */;
productType = "com.apple.product-type.tool";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
E8FDFD6A226E74F400FE80E7 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1020;
LastUpgradeCheck = 1020;
ORGANIZATIONNAME = "Serhii Londar";
TargetAttributes = {
E8FDFD71226E74F400FE80E7 = {
CreatedOnToolsVersion = 10.2.1;
LastSwiftMigration = 1020;
};
};
};
buildConfigurationList = E8FDFD6D226E74F400FE80E7 /* Build configuration list for PBXProject "ReadmeGenerator" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = E8FDFD69226E74F400FE80E7;
productRefGroup = E8FDFD73226E74F400FE80E7 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
E8FDFD71226E74F400FE80E7 /* ReadmeGenerator */,
);
};
/* End PBXProject section */
/* Begin PBXSourcesBuildPhase section */
E8FDFD6E226E74F400FE80E7 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
E8FDFD7F226E769900FE80E7 /* main.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
E8FDFD77226E74F400FE80E7 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "-";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
E8FDFD78226E74F400FE80E7 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "-";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
};
name = Release;
};
E8FDFD7A226E74F400FE80E7 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Automatic;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
"@loader_path/../Frameworks",
);
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
};
name = Debug;
};
E8FDFD7B226E74F400FE80E7 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Automatic;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
"@loader_path/../Frameworks",
);
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
E8FDFD6D226E74F400FE80E7 /* Build configuration list for PBXProject "ReadmeGenerator" */ = {
isa = XCConfigurationList;
buildConfigurations = (
E8FDFD77226E74F400FE80E7 /* Debug */,
E8FDFD78226E74F400FE80E7 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
E8FDFD79226E74F400FE80E7 /* Build configuration list for PBXNativeTarget "ReadmeGenerator" */ = {
isa = XCConfigurationList;
buildConfigurations = (
E8FDFD7A226E74F400FE80E7 /* Debug */,
E8FDFD7B226E74F400FE80E7 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = E8FDFD6A226E74F400FE80E7 /* Project object */;
}

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:ReadmeGenerator.xcodeproj">
</FileRef>
</Workspace>

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
</plist>

View file

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildLocationStyle</key>
<string>UseAppPreferences</string>
<key>CustomBuildIntermediatesPath</key>
<string>Build/Intermediates.noindex</string>
<key>CustomBuildLocationType</key>
<string>RelativeToWorkspace</string>
<key>CustomBuildProductsPath</key>
<string>Build/Products</string>
<key>CustomIndexStorePath</key>
<string>Index/DataStore</string>
<key>DerivedDataLocationStyle</key>
<string>Default</string>
<key>EnabledFullIndexStoreVisibility</key>
<false/>
<key>IssueFilterStyle</key>
<string>ShowActiveSchemeOnly</string>
<key>LiveSourceIssuesEnabled</key>
<true/>
<key>SharedBuildFolderName</key>
<string>Build</string>
</dict>
</plist>

View file

@ -0,0 +1,92 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E8FDFD71226E74F400FE80E7"
BuildableName = "ReadmeGenerator"
BlueprintName = "ReadmeGenerator"
ReferencedContainer = "container:ReadmeGenerator.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E8FDFD71226E74F400FE80E7"
BuildableName = "ReadmeGenerator"
BlueprintName = "ReadmeGenerator"
ReferencedContainer = "container:ReadmeGenerator.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "YES"
customWorkingDirectory = "/Users/serhii-londar/Documents/GitHub/open-source-mac-os-apps"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E8FDFD71226E74F400FE80E7"
BuildableName = "ReadmeGenerator"
BlueprintName = "ReadmeGenerator"
ReferencedContainer = "container:ReadmeGenerator.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E8FDFD71226E74F400FE80E7"
BuildableName = "ReadmeGenerator"
BlueprintName = "ReadmeGenerator"
ReferencedContainer = "container:ReadmeGenerator.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View file

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "1"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "main.swift"
timestampString = "577666659.971123"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "322"
endingLineNumber = "322"
landmarkName = "unknown"
landmarkType = "0">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>

View file

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>ReadmeGenerator.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>E8FDFD71226E74F400FE80E7</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>

View file

@ -1,8 +1,9 @@
// //
// ReadmeGenerator.swift // main.swift
// awesome-mac-os-apps-helper // ReadmeGenerator
// //
// Created by Serhii Londar on 11/12/18. // Created by Serhii Londar on 4/23/19.
// Copyright © 2019 Serhii Londar. All rights reserved.
// //
import Foundation import Foundation
@ -20,11 +21,14 @@ let header = """
</p> </p>
## Support ## Support
Hey friend! Help me out for a couple of :beers:! <span class="badge-patreon"><a href="https://www.patreon.com/serhiilondar" title="Donate to this project using Patreon"><img src="https://img.shields.io/badge/patreon-donate-yellow.svg" alt="Patreon donate button" /></a></span> Hey friend! Help me out for a couple of :beers:! <span class="badge-patreon"><a href="https://www.patreon.com/serhiilondar" title="Donate to this project using Patreon"><img src="https://img.shields.io/badge/patreon-donate-yellow.svg" alt="Patreon donate button" /></a></span>
List of awesome open source applications for macOS. This list contains a lot of native, and cross-platform apps. The main goal of this repository is to find free open source apps and start contributing. Feel free to [contribute](CONTRIBUTING.md) to the list, any suggestions are welcome! List of awesome open source applications for macOS. This list contains a lot of native, and cross-platform apps. The main goal of this repository is to find free open source apps and start contributing. Feel free to [contribute](CONTRIBUTING.md) to the list, any suggestions are welcome!
## Languages
You can see in which language an app is written. Currently there are following languages: You can see in which language an app is written. Currently there are following languages:
- ![c_icon] - C language. - ![c_icon] - C language.
@ -54,18 +58,18 @@ You can see in which language an app is written. Currently there are following l
- [Cryptocurrency](#cryptocurrency) - [Cryptocurrency](#cryptocurrency)
- [Database](#database) - [Database](#database)
- [Development](#development) - [Development](#development)
- [Git](#git) - [Git](#git)
- [iOS / macOS](#ios--macos) - [iOS / macOS](#ios--macos)
- [JSON Parsing](#json-parsing) - [JSON Parsing](#json-parsing)
- [Web development](#web-development) - [Web development](#web-development)
- [Other](#other) - [Other](#other)
- [Downloader](#downloader) - [Downloader](#downloader)
- [Editors](#editors) - [Editors](#editors)
- [CSV](#csv) - [CSV](#csv)
- [JSON](#json) - [JSON](#json)
- [Markdown](#markdown) - [Markdown](#markdown)
- [TeX](#tex) - [TeX](#tex)
- [Text](#text) - [Text](#text)
- [Extensions](#extensions) - [Extensions](#extensions)
- [Finder](#finder) - [Finder](#finder)
- [Games](#games) - [Games](#games)
@ -126,6 +130,7 @@ Thanks to all the people who contribute:
[swift_icon]: ./icons/swift-16.png 'Swift language.' [swift_icon]: ./icons/swift-16.png 'Swift language.'
[type_script_icon]: ./icons/typescript-16.png 'TypeScript language.' [type_script_icon]: ./icons/typescript-16.png 'TypeScript language.'
""" """
class JSONApplications: Codable { class JSONApplications: Codable {
let applications: [JSONApplication] let applications: [JSONApplication]
@ -145,28 +150,34 @@ class JSONApplications: Codable {
class JSONApplication: Codable { class JSONApplication: Codable {
var title: String var title: String
var iconURL: String
var repoURL: String var repoURL: String
var shortDescription: String var shortDescription: String
var languages: [String] var languages: [String]
var screenshots: [String] var screenshots: [String]
var category: String var categories: [String]
var officialSite: String
enum CodingKeys: String, CodingKey { enum CodingKeys: String, CodingKey {
case title case title
case iconURL = "icon_url"
case repoURL = "repo_url" case repoURL = "repo_url"
case shortDescription = "short_description" case shortDescription = "short_description"
case languages case languages
case screenshots case screenshots
case category case categories
case officialSite = "official_site"
} }
init(title: String, repoURL: String, shortDescription: String, languages: [String], screenshots: [String], category: String) { init(title: String, iconURL: String, repoURL: String, shortDescription: String, languages: [String], screenshots: [String], categories: [String], officialSite: String) {
self.title = title self.title = title
self.iconURL = iconURL
self.repoURL = repoURL self.repoURL = repoURL
self.shortDescription = shortDescription self.shortDescription = shortDescription
self.languages = languages self.languages = languages
self.screenshots = screenshots self.screenshots = screenshots
self.category = category self.categories = categories
self.officialSite = officialSite
} }
} }
@ -208,7 +219,7 @@ class ReadmeGenerator {
var categories = categoriesObject.categories var categories = categoriesObject.categories
let subcategories = categories.filter({ $0.parent != nil && !$0.parent!.isEmpty }) let subcategories = categories.filter({ $0.parent != nil && !$0.parent!.isEmpty })
var applications = applicationsObject.applications let applications = applicationsObject.applications
for subcategory in subcategories { for subcategory in subcategories {
if let index = categories.lastIndex(where: { $0.parent != subcategory.id }) { if let index = categories.lastIndex(where: { $0.parent != subcategory.id }) {
@ -218,14 +229,12 @@ class ReadmeGenerator {
categories = categories.sorted(by: { $0.title < $1.title }) categories = categories.sorted(by: { $0.title < $1.title })
applications = applications.sorted(by: { $0.category < $1.category })
readmeString.append(header) readmeString.append(header)
print("Start iteration....") print("Start iteration....")
for category in categories { for category in categories {
readmeString.append(String.enter + String.section + String.space + category.title + String.enter) readmeString.append(String.enter + String.section + String.space + category.title + String.enter)
var categoryApplications = applications.filter({ $0.category == category.id }) var categoryApplications = applications.filter({ $0.categories.contains(category.id) })
categoryApplications = categoryApplications.sorted(by: { $0.title < $1.title }) categoryApplications = categoryApplications.sorted(by: { $0.title < $1.title })
for application in categoryApplications { for application in categoryApplications {
@ -238,7 +247,7 @@ class ReadmeGenerator {
subcategories = subcategories.sorted(by: { $0.title < $1.title }) subcategories = subcategories.sorted(by: { $0.title < $1.title })
for subcategory in subcategories { for subcategory in subcategories {
readmeString.append(String.enter + String.subsection + String.space + subcategory.title + String.enter) readmeString.append(String.enter + String.subsection + String.space + subcategory.title + String.enter)
var categoryApplications = applications.filter({ $0.category == subcategory.id }) var categoryApplications = applications.filter({ $0.categories.contains(subcategory.id) })
categoryApplications = categoryApplications.sorted(by: { $0.title < $1.title }) categoryApplications = categoryApplications.sorted(by: { $0.title < $1.title })
for application in categoryApplications { for application in categoryApplications {
@ -260,7 +269,7 @@ extension String {
static let enter = "\n" static let enter = "\n"
static let section = "###" static let section = "###"
static let subsection = "####" static let subsection = "####"
static let iconPrefix = "_icon" static let iconPrefix = "_icon"
} }
extension JSONApplication { extension JSONApplication {
@ -273,16 +282,16 @@ extension JSONApplication {
markdownDescription.append("- [\(self.title)](\(self.repoURL)) - \(self.shortDescription) \(languages)") markdownDescription.append("- [\(self.title)](\(self.repoURL)) - \(self.shortDescription) \(languages)")
/* /*
if self.screenshots.count > 0 { if self.screenshots.count > 0 {
var screenshotsString = String.empty var screenshotsString = String.empty
screenshotsString += (String.space + Constants.detailsBeginString + String.space) screenshotsString += (String.space + Constants.detailsBeginString + String.space)
self.screenshots.forEach({ self.screenshots.forEach({
screenshotsString += (String.space + (NSString(format: Constants.srcLinePattern as NSString, $0 as CVarArg) as String) + String.space) screenshotsString += (String.space + (NSString(format: Constants.srcLinePattern as NSString, $0 as CVarArg) as String) + String.space)
}) })
screenshotsString += (String.space + Constants.detailsEndString + String.space) screenshotsString += (String.space + Constants.detailsEndString + String.space)
markdownDescription.append(screenshotsString) markdownDescription.append(screenshotsString)
} }
*/ */
return markdownDescription return markdownDescription
} }
} }
@ -309,5 +318,5 @@ struct Constants {
} }
} }
ReadmeGenerator().generateReadme() ReadmeGenerator().generateReadme()

View file

@ -11,7 +11,7 @@ script:
- awesome_bot applications.json -w https://matrix.org,https://camo.githubusercontent.com,http://joshparnham.com - awesome_bot applications.json -w https://matrix.org,https://camo.githubusercontent.com,http://joshparnham.com
- danger - danger
after_success: after_success:
- swift ./.github/ReadmeGenerator.swift - swift ./.github/main.swift
- chmod +x ./.github/deploy.sh - chmod +x ./.github/deploy.sh
- ./.github/deploy.sh - ./.github/deploy.sh
notifications: notifications:

File diff suppressed because it is too large Load diff