Skip to content

feilaoda/Awful.app

 
 

Repository files navigation

Awful

Awful is an iOS 8 app that's Better Than Safari for browsing the Something Awful Forums. Its story is told in its thread (and its older thread (and its first thread)).

Development talk usually ends up in the project.log thread, but we're not fussy.

Screenshot of Awful as it appears on an iPhone

An unofficial app

This app is not endorsed by Something Awful.

Build

  1. Clone the repository: git clone --recursive https://github.com/Awful/Awful.app Awful-app
  2. Open Xcode project and build away: open Awful-app/Awful.xcworkspace

There are no required dependencies for building Awful; all third-party libraries are included, and files generated by other utilities are included in the repository. (The only submodule included is the thread-tags repository, which is not strictly needed for building.)

There are optional dependencies for building Awful. You only need them if you're working on the relevant part of the app. Once a dependency is installed, simply build the Xcode project and the relevant files will be regenerated.

  • CocoaPods manages Objective-C library dependencies. If you're updating, adding, or removing a dependency, please install CocoaPods.
    • Even if you add a dependency directly to the Xcode project, you need to run pod install to update the acknowledgements section in the Settings screen. Licenses are added from the Vendor directory, either as a LICENSE.txt file or a properly-formatted comment atop a .h file.
  • LESS helps us write CSS. If you're modifying the themes for displaying posts (these are files like posts-view*.less), please install LESS:
    1. Install homebrew.
    2. Open Terminal and install node: brew install node (prepend sudo to avoid permissions errors).
    3. In Terminal, install less: npm install less -g (prepend sudo to avoid permissions errors).

There are unit tests for the HTML scraping, to help us find problems when markup changes, running continuously via Travis CI.

Build Status

Contribute

You can help! Head over to Awful's thread and tell us about any issues you're having. Send in some lovingly crafted thread tags. Or fork the code and send pull requests. Once a pull request is accepted, you get the commit bit!

If you're curious about anything at all, stop by the thread and say hi.

Data Flow

The HTTP client connects to the Something Awful Forums and parses its contents, saving those contents as entities in a Core Data store. Various screens show the forums, threads, posts, private messages, and users saved to the Core Data store.

Awful's Core Data store is a cache of content from the Forums. Any user info specific to the app is stored in user defaults. The Core Data store may be (and can be, since it's stored in the application's Caches directory) deleted at any time.

Theming

Awful's posts view is fully customizable using CSS. There's a default theme, as well as themes for specific forums such as YOSPOS and FYAD. Internally, we use LESS to generate our CSS, so if you are editing built-in themes please edit the .less files. (LESS installation instructions are above.) Then commit both the modified .less files and any resulting changes to .css files, so others don't need LESS to build Awful.

The rest of Awful is themed in a a big plist. If you can't find a theme key you'd like to use, ask and we'll add it!

Thread Tags

Diabolik900 and The Dave have fashioned Awful with its own set of thread tags that look great on the iPhone and the iPad. They're distributed with the app. New thread tags can also appear in Awful without us having to send an update through the App Store. This is done by hosting the icons via GitHub Pages.

To add a new thread tag you just made:

  1. Add it to the thread tags repository and push.

  2. Update the awfulapp.com repository repository per its README.

  3. In this (Awful.app) repository, update the Resources/Thread Tags submodule and push:

    cd path/to/awful-app/repo
    cd Resources/Thread\ Tags
    git pull origin master
    cd ..
    git commit -am "Updated thread tags."
    git push

Assembling the AwfulPostsView

The posts view uses zepto.js. Awful uses the Touch module which is not part of a standard build, so a custom build is required. (It also uses the Core and Event modules.)

Crash Logs

Awful uses Crashlytics to assemble crash logs. Configuration requires four steps beyond the typical Crashlytics setup:

  1. Create a file called CrashlyticsAPIKey.h in the root of the repository.
  2. In that file, put a line like #define CRASHLYTICS_API_KEY @"abbacadabbaabbacadabbaabbacadabbaabbacad", where the key comes from the line Crashlytics setup gives you to paste in your app delegate.
  3. Create a file called crashlytics.sh in the Xcode directory and mark it executable.
  4. When the Crashlystics setup gives you a line to put into a new Run Script build phase, instead put it in the file you just made.

Without doing the above, Crashlytics is rendered inert in your builds.

License

Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States License

Credit

Awful development is led by pokeyman aka Nolan Waite.

Awful includes contributions from:

About

Something Awful Forums browser for iOS

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Objective-C 75.9%
  • Swift 15.5%
  • CSS 7.3%
  • Other 1.3%