-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 9a4595d
Showing
23 changed files
with
1,642 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.user | ||
*~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
project(wattpad) | ||
cmake_minimum_required(VERSION 2.8.10) | ||
|
||
# This is required to ensure the correct node modules are included in the project | ||
execute_process(COMMAND unity-js-scopes-tool install ${CMAKE_SOURCE_DIR}/src/node_modules unity-js-scopes) | ||
add_custom_target(build_modules ALL COMMAND unity-js-scopes-tool build ${CMAKE_SOURCE_DIR}/src/node_modules) | ||
|
||
# Do not remove this, its required for the correct functionality of the Ubuntu-SDK | ||
set(UBUNTU_MANIFEST_PATH "manifest.json.in" CACHE INTERNAL "Tells QtCreator location and name of the manifest file") | ||
set(UBUNTU_PROJECT_TYPE "Scope" CACHE INTERNAL "Tells QtCreator this is a Scope project") | ||
|
||
# Important project paths | ||
set(CMAKE_INSTALL_PREFIX /) | ||
set(SCOPE_INSTALL_DIR "/wattpad") | ||
set(GETTEXT_PACKAGE "wattpad") | ||
set(PACKAGE_NAME "wattpad.boghison") | ||
set(SCOPE_NAME "${PACKAGE_NAME}_wattpad") | ||
|
||
# This command figures out the target architecture and puts it into the manifest file | ||
execute_process( | ||
COMMAND dpkg-architecture -qDEB_HOST_ARCH | ||
OUTPUT_VARIABLE CLICK_ARCH | ||
OUTPUT_STRIP_TRAILING_WHITESPACE | ||
) | ||
|
||
# Install the manifest and apparmor files | ||
configure_file(manifest.json.in ${CMAKE_CURRENT_BINARY_DIR}/manifest.json) | ||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/manifest.json DESTINATION "/") | ||
install(FILES "wattpad.apparmor" DESTINATION "/") | ||
|
||
# Make these files show up in QtCreator | ||
file(GLOB_RECURSE | ||
_PO_JS_FILES | ||
"po/*.po" | ||
"*.js" | ||
) | ||
add_custom_target(hidden_files | ||
ALL | ||
SOURCES | ||
manifest.json.in | ||
wattpad.apparmor | ||
src/data/wattpad.ini.in | ||
src/data/wattpad-settings.ini.in | ||
po/POTFILES.in.in | ||
po/${GETTEXT_PACKAGE}.pot | ||
${_PO_JS_FILES} | ||
) | ||
|
||
# Search for our dependencies | ||
find_package(Intltool) | ||
|
||
# Add our main directories | ||
add_subdirectory(po) | ||
add_subdirectory(src) | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Ubuntu Wattpad Scope | ||
==================== | ||
|
||
# What is [wattpad](https://wattpad.com)? | ||
|
||
From [Wikipedia](https://en.wikipedia.org/wiki/Wattpad) | ||
> Wattpad is a writing community in which users are able to post articles, stories, fan fiction, and poems, either through the website or the mobile app. This gives people the chance to have their creative works available to a wider audience. The content includes work by undiscovered writers, published writers, new writers, with all users being given an equal chance to write popular works. Users are able to comment and like stories or join groups associated with the website. Around half of the users are US based; other users come from the UK, Canada, the Philippines, Australia, Russia, United Arab Emirates and other countries. | ||
Inspiration | ||
=========== | ||
|
||
My friends LOVE wattpad, they also published some of their stories, so this was one of my first choices for a scope. | ||
|
||
Big thanks | ||
========== | ||
|
||
I'd like to thank first and foremost David Callé, Benjamin M. Zeller and Ricardo Garcia Silva, but also all the other awesome people, including the developers of the Unity Scopes JS API, who are making scope development mainstream :) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"architecture": "@CLICK_ARCH@", | ||
"description": "Find new, interesting stories on wattpad", | ||
"framework": "ubuntu-sdk-15.04.4", | ||
"hooks": { | ||
"wattpad": { | ||
"apparmor": "wattpad.apparmor", | ||
"scope": "wattpad" | ||
} | ||
}, | ||
"maintainer": "Bogdan Cuza <[email protected]>", | ||
"name": "wattpad.boghison", | ||
"title": "wattpad", | ||
"version": "0.1" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
intltool_update_potfile( | ||
ALL | ||
KEYWORDS "tr" "tr:1,2" "dtr:2" "dtr:2,3" "N_" | ||
COPYRIGHT_HOLDER "" | ||
POTFILES_TEMPLATE "POTFILES.in.in" | ||
GETTEXT_PACKAGE ${GETTEXT_PACKAGE} | ||
) | ||
|
||
intltool_install_translations( | ||
ALL | ||
GETTEXT_PACKAGE ${GETTEXT_PACKAGE} | ||
) | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
XGETTEXT_KEYWORDS=--c++ --keyword=tr --keyword=tr:1,2 --keyword=dtr:2 --keyword=dtr:2,3 --keyword=N_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[type: gettext/ini] src/data/wattpad.ini.in | ||
[type: gettext/ini] src/data/wattpad-settings.ini.in | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[type: gettext/ini] src/data/wattpad.ini.in | ||
[type: gettext/ini] src/data/wattpad-settings.ini.in | ||
@GENERATED_POTFILES@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# SOME DESCRIPTIVE TITLE. | ||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER | ||
# This file is distributed under the same license as the PACKAGE package. | ||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | ||
# | ||
#, fuzzy | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: PACKAGE VERSION\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2016-02-28 14:36+0200\n" | ||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language-Team: LANGUAGE <[email protected]>\n" | ||
"Language: \n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=CHARSET\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
|
||
#: ../src/data/wattpad.ini.in.h:1 | ||
msgid "Wattpad Scope" | ||
msgstr "" | ||
|
||
#: ../src/data/wattpad.ini.in.h:2 | ||
msgid "Find new, interesting stories on wattpad" | ||
msgstr "" | ||
|
||
#: ../src/data/wattpad-settings.ini.in.h:1 | ||
msgid "What stories to show to an aggregator?" | ||
msgstr "" | ||
|
||
#: ../src/data/wattpad-settings.ini.in.h:2 | ||
msgid "" | ||
"Hot;New (Will only work with 1 word - tag);Top in category (non-empty query)" | ||
msgstr "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# Put the ini, image, and js files in the build directory next | ||
# to the scope .so file so test tools can find them easily. | ||
intltool_merge_translations( | ||
"data/wattpad.ini.in" | ||
"${CMAKE_CURRENT_BINARY_DIR}/${SCOPE_NAME}.ini" | ||
ALL UTF8 | ||
) | ||
intltool_merge_translations( | ||
"data/wattpad-settings.ini.in" | ||
"${CMAKE_CURRENT_BINARY_DIR}/${SCOPE_NAME}-settings.ini" | ||
ALL UTF8 | ||
) | ||
|
||
configure_file( | ||
"data/icon.png" | ||
"${CMAKE_CURRENT_BINARY_DIR}/icon.png" | ||
@ONLY COPYONLY | ||
) | ||
configure_file( | ||
"data/logo.svg" | ||
"${CMAKE_CURRENT_BINARY_DIR}/logo.svg" | ||
@ONLY COPYONLY | ||
) | ||
configure_file( | ||
"data/screenshot.png" | ||
"${CMAKE_CURRENT_BINARY_DIR}/screenshot.png" | ||
@ONLY COPYONLY | ||
) | ||
|
||
configure_file( | ||
"wattpad.js" | ||
"${CMAKE_CURRENT_BINARY_DIR}/${SCOPE_NAME}.js" | ||
@ONLY COPYONLY | ||
) | ||
|
||
add_custom_target( | ||
copy_modules ALL | ||
COMMAND ${CMAKE_COMMAND} -E create_symlink | ||
"${CMAKE_CURRENT_SOURCE_DIR}/node_modules" | ||
"${CMAKE_CURRENT_BINARY_DIR}/node_modules" | ||
) | ||
|
||
# Install the scope ini, image, and js files | ||
install( | ||
FILES | ||
"${CMAKE_CURRENT_BINARY_DIR}/${SCOPE_NAME}.ini" | ||
"${CMAKE_CURRENT_BINARY_DIR}/${SCOPE_NAME}-settings.ini" | ||
"${CMAKE_CURRENT_BINARY_DIR}/icon.png" | ||
"${CMAKE_CURRENT_BINARY_DIR}/logo.svg" | ||
"${CMAKE_CURRENT_BINARY_DIR}/screenshot.png" | ||
"${CMAKE_CURRENT_BINARY_DIR}/${SCOPE_NAME}.js" | ||
DESTINATION | ||
${SCOPE_INSTALL_DIR} | ||
) | ||
|
||
install( | ||
DIRECTORY | ||
"${CMAKE_CURRENT_SOURCE_DIR}/node_modules" | ||
DESTINATION | ||
${SCOPE_INSTALL_DIR} | ||
USE_SOURCE_PERMISSIONS | ||
) | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.