diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..cd5a6f3d3 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,16 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false + +[*.yml] +indent_style = space +indent_size = 2 diff --git a/.gitignore b/.gitignore index 921875a0a..92dd251b9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ build/ +builddir/ feedreader.service feedreader.desktop feedreader-autostart.desktop @@ -8,4 +9,4 @@ data/org.gnome.FeedReader-autostart.desktop data/org.gnome.FeedReader.desktop data/org.gnome.FeedReader.Daemon.service data/org.gnome.FeedReader.appdata.xml -*.po~ +*.po~ \ No newline at end of file diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..f6797cdd9 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "data/GrabberConfig"] + path = data/GrabberConfig + url = https://github.com/fivefilters/ftr-site-config + branch = master diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100644 index 9c59cfbe6..000000000 --- a/CMakeLists.txt +++ /dev/null @@ -1,301 +0,0 @@ -project (FeedReader) -cmake_minimum_required (VERSION 2.6) -list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) -include_directories(${CMAKE_SOURCE_DIR}/libVilistextum) -include_directories(${CMAKE_SOURCE_DIR}/libgtkimageview) -include_directories(${CMAKE_SOURCE_DIR}) - -add_definitions("-w") - -include(GNUInstallDirs) -set (DATADIR "${CMAKE_INSTALL_PREFIX}/share") -set (PKGDATADIR "${DATADIR}/FeedReader") -set (PKGLIBDIR "${CMAKE_INSTALL_LIBDIR}/FeedReader") -set (GETTEXT_PACKAGE ${CMAKE_PROJECT_NAME}) -set (UI_NAME "feedreader") -set (DAEMON_NAME ${UI_NAME}-daemon) -set (WEBEXTENSION_NAME webextension) -set (RELEASE_NAME "FeedReader") -set (VERSION "2.0.2") -set (GLIB_VERSION 2.40) - -find_package(PkgConfig) -find_package(Vala REQUIRED) -include(ValaVersion) -include(ValaPrecompile) -include(GResource) -ensure_vala_version("0.30" MINIMUM) - -pkg_check_modules(LIBUNITY QUIET unity) - -add_definitions (-DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\") -add_subdirectory (po) -add_subdirectory (schemas) -add_subdirectory (libVilistextum) - -include(GetGitRevisionDescription) -get_git_head_revision(GIT_REFSPEC GIT_SHA1) -configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Constants.vala.in" "${CMAKE_SOURCE_DIR}/Constants.vala" @ONLY) -configure_file("${CMAKE_CURRENT_SOURCE_DIR}/data/org.gnome.FeedReader.Daemon.service.in" "${CMAKE_SOURCE_DIR}/data/org.gnome.FeedReader.Daemon.service" @ONLY) -configure_file("${CMAKE_CURRENT_SOURCE_DIR}/data/org.gnome.FeedReader.appdata.xml.in" "${CMAKE_SOURCE_DIR}/data/org.gnome.FeedReader.appdata.xml" @ONLY) -configure_file("${CMAKE_CURRENT_SOURCE_DIR}/data/org.gnome.FeedReader.desktop.in" "${CMAKE_SOURCE_DIR}/data/org.gnome.FeedReader.desktop" @ONLY) -configure_file("${CMAKE_CURRENT_SOURCE_DIR}/data/org.gnome.FeedReader-autostart.desktop.in" "${CMAKE_SOURCE_DIR}/data/org.gnome.FeedReader-autostart.desktop" @ONLY) - -set(MODULES - gtk+-3.0>=3.22 - json-glib-1.0 - gee-0.8 - libsoup-2.4 - sqlite3 - libsecret-1 - libnotify - libxml-2.0 - rest-0.7 - webkit2gtk-4.0 - gstreamer-1.0 - gstreamer-pbutils-1.0 - libpeas-1.0 - libcurl - goa-1.0) - -if(LIBUNITY_FOUND) - list(APPEND MODULES unity) - message(STATUS "libunity: ON") -endif(LIBUNITY_FOUND) - -pkg_check_modules(DEPS REQUIRED ${MODULES}) - -add_definitions(${DEPS_CFLAGS} -DGOA_API_IS_SUBJECT_TO_CHANGE) -link_libraries(${DEPS_LIBRARIES} -lm) -link_directories(${DEPS_LIBRARY_DIRS}) - -add_subdirectory(WebExtension) -add_subdirectory(libgtkimageview) -add_subdirectory(libgd) - - -################################################################################ - - -vala_precompile(LIBFR libFeedReader - src/Logger.vala - src/Enums.vala - src/dbBase.vala - src/Settings.vala - src/Utils.vala - src/QueryBuilder.vala - src/ContentGrabber/stringPair.vala - src/Model/Feed.vala - src/Model/Category.vala - src/Model/Article.vala - src/Model/Tag.vala - src/Model/CachedAction.vala - src/Model/InterfaceState.vala - src/Model/ShareAccount.vala - Constants.vala - -PACKAGES - gee-0.8 - libsecret-1 - sqlite3 - libsoup-2.4 - -OPTIONS - --target-glib=${GLIB_VERSION} - --vapi=FeedReaderCommon.vapi - --header=FeedReaderCommon.h - -CUSTOM_VAPIS - vapi/libvilistextum.vapi -) - -add_library(FeedReaderCommon STATIC ${LIBFR}) -target_link_libraries(FeedReaderCommon vilistextum) - - -################################################################################ - -set(UI_PACKAGES - glib-2.0>=2.32 - gtk+-3.0 - json-glib-1.0 - libsoup-2.4 - sqlite3 - gee-0.8 - libsecret-1 - libnotify - rest-0.7 - WebKit2-4.0 - gstreamer-1.0 - gstreamer-pbutils-1.0 - libpeas-1.0 - goa-1.0) - -vala_precompile(UI ${UI_NAME} - src/DBusConnection.vala - src/FavIconCache.vala - src/FeedReader.vala - src/LoginInterface.vala - src/dbUI.vala - src/UtilsUI.vala - src/Widgets/AddPopover.vala - src/Widgets/ArticleRow.vala - src/Widgets/ArticleView.vala - src/Widgets/ArticleViewHeader.vala - src/Widgets/ArticleViewLoadProgress.vala - src/Widgets/ArticleViewUrlOverlay.vala - src/Widgets/BackendInfoPopover.vala - src/Widgets/CategorieRow.vala - src/Widgets/ColorCircle.vala - src/Widgets/ColorPopover.vala - src/Widgets/ColumnView.vala - src/Widgets/ColumnViewHeader.vala - src/Widgets/FeedList.vala - src/Widgets/FeedListFooter.vala - src/Widgets/FeedRow.vala - src/Widgets/FullscreenButton.vala - src/Widgets/FullscreenHeader.vala - src/Widgets/HoverButton.vala - src/Widgets/ImagePopup.vala - src/Widgets/InAppNotification.vala - src/Widgets/InfoBar.vala - src/Widgets/LoginPage.vala - src/Widgets/LoginRow.vala - src/Widgets/MainWindow.vala - src/Widgets/MediaPlayer.vala - src/Widgets/MediaPopover.vala - src/Widgets/MediaRow.vala - src/Widgets/ModeButton.vala - src/Widgets/RemovePopover.vala - src/Widgets/ResetPage.vala - src/Widgets/ServiceSettingsPopover.vala - src/Widgets/ShareRow.vala - src/Widgets/ShortcutsWindow.vala - src/Widgets/ServiceInfo.vala - src/Widgets/Setting.vala - src/Widgets/SettingsDialog.vala - src/Widgets/SharePopover.vala - src/Widgets/SimpleHeader.vala - src/Widgets/SpringCleanPage.vala - src/Widgets/TagRow.vala - src/Widgets/TagPopover.vala - src/Widgets/TagPopoverRow.vala - src/Widgets/UpdateButton.vala - src/Widgets/WebLoginPage.vala - src/Widgets/ArticleList/ArticleList.vala - src/Widgets/ArticleList/ArticleListBox.vala - src/Widgets/ArticleList/ArticleListEmptyLabel.vala - src/Widgets/ArticleList/ArticleListScroll.vala - src/Share/share.vala - src/Share/ServiceSetup.vala - src/Share/ShareAccountInterface.vala - -PACKAGES - ${UI_PACKAGES} - -OPTIONS - --target-glib=${GLIB_VERSION} - --header=FeedReaderUI.h - --vapi=FeedReaderUI.vapi - --enable-experimental - -CUSTOM_VAPIS - ${CMAKE_BINARY_DIR}/FeedReaderCommon.vapi - vapi/libvilistextum.vapi - vapi/gtkimageview.vapi - vapi/gd-1.0.vapi -) - -GLIB_COMPILE_RESOURCES(GRESOURCES SOURCE data/org.gnome.FeedReader.gresource.xml) - -add_executable(${UI_NAME} ${UI} ${GRESOURCES}) -target_link_libraries(${UI_NAME} vilistextum gtkimageview gd FeedReaderCommon) - - -################################################################################ - - -set(DAEMON_OPTIONS - --target-glib=${GLIB_VERSION} - --header=FeedReader.h - --vapi=FeedReader.vapi) -set(DAEMON_PACKAGES - glib-2.0>=2.32 - gio-2.0 - sqlite3 - gee-0.8 - libsoup-2.4 - json-glib-1.0 - libnotify - libsecret-1 - libxml-2.0 - rest-0.7 - libpeas-1.0) - -if(LIBUNITY_FOUND) - list(APPEND DAEMON_OPTIONS --define WITH_LIBUNITY) - list(APPEND DAEMON_PACKAGES unity) -endif(LIBUNITY_FOUND) - -vala_precompile(daemon ${DAEMON_NAME} - src/ActionCache.vala - src/Daemon.vala - src/dbDaemon.vala - src/UtilsDaemon.vala - src/Notification.vala - src/CachedActionManager.vala - src/Backend/FeedServer.vala - src/Backend/FeedServerInterface.vala - src/Backend/OPMLparser.vala - src/ContentGrabber/grabberConfig.vala - src/ContentGrabber/grabber.vala - src/ContentGrabber/grabberUtils.vala - - -PACKAGES - ${DAEMON_PACKAGES} - -OPTIONS - ${DAEMON_OPTIONS} - -CUSTOM_VAPIS - vapi/libvilistextum.vapi - ${CMAKE_BINARY_DIR}/FeedReaderCommon.vapi -) - -add_executable(${DAEMON_NAME} ${daemon}) -target_link_libraries(${DAEMON_NAME} vilistextum FeedReaderCommon) - - -################################################################################ - - -add_dependencies(${DAEMON_NAME} FeedReaderCommon) -add_dependencies(${UI_NAME} FeedReaderCommon) - - -# build plugins -add_subdirectory(plugins) - - -################################################################################ - - -# uninstall target -configure_file( - "${CMAKE_CURRENT_SOURCE_DIR}/cmake/uninstall.cmake" - "${CMAKE_CURRENT_BINARY_DIR}/uninstall.cmake" - IMMEDIATE @ONLY) - -add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/uninstall.cmake) - -install (TARGETS ${UI_NAME} RUNTIME DESTINATION bin) -install (TARGETS ${DAEMON_NAME} RUNTIME DESTINATION bin) -install (FILES ${PROJECT_BINARY_DIR}/WebExtension/libwebextension.so DESTINATION ${PKGLIBDIR}) -install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/org.gnome.FeedReader.desktop DESTINATION ${DATADIR}/applications/) -install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/org.gnome.FeedReader-autostart.desktop DESTINATION ${PKGDATADIR}) -install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/org.gnome.FeedReader.appdata.xml DESTINATION ${DATADIR}/appdata/) -install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/org.gnome.FeedReader.Daemon.service DESTINATION ${DATADIR}/dbus-1/services/) -install (DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/application-icons/hicolor DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons) -install (CODE "execute_process (COMMAND gtk-update-icon-cache -t ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor)") -install (DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/GrabberConfig DESTINATION ${PKGDATADIR}) diff --git a/COPYING b/COPYING deleted file mode 100644 index 10926e87f..000000000 --- a/COPYING +++ /dev/null @@ -1,675 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. - diff --git a/Constants.vala.in b/Constants.vala.in index 94cf7679a..ec9fc376c 100644 --- a/Constants.vala.in +++ b/Constants.vala.in @@ -21,7 +21,7 @@ namespace FeedReader { public class AboutInfo : GLib.Object { public const string programmName = "FeedReader"; - public const string copyright = "Copyright © 2016 Jan Lukas Gernert"; + public const string copyright = "Copyright © 2014-2017 Jan Lukas Gernert"; public const string version = "@VERSION@"; public const string comments = N_("Desktop Client for various RSS Services"); public const string[] authors = { "Jan Lukas Gernert", "Bilal Elmoussaoui", "Anwesh Reddy" , "Jason Scurtu", null }; @@ -43,20 +43,22 @@ namespace FeedReader { } public class MediaButton : GLib.Object { - public const string PLAY = N_("Play"); - public const string PAUSE = N_("Pause"); - public const string MUTE = N_("Mute"); - public const string UNMUTE = N_("Unmute"); - public const string CLOSE = N_("Close"); + public const string PLAY = "Play"; + public const string PAUSE = "Pause"; + public const string MUTE = "Mute"; + public const string UNMUTE = "Unmute"; + public const string CLOSE = "Close"; } public class Constants : GLib.Object { - public const string INSTALL_PREFIX = "@CMAKE_INSTALL_PREFIX@"; - public const string INSTALL_LIBDIR = "@PKGLIBDIR@"; - public const string GIT_SHA1 = "@GIT_SHA1@"; + public const string INSTALL_PREFIX = "@PREFIX@"; + public const string INSTALL_LIBDIR = "@PKGLIBDIR@"; + public const string LOCALE_DIR = "@LOCALE_DIR@"; + public const string GIT_SHA1 = "#GIT_SHA1#"; public const string USER_AGENT = "FeedReader @VERSION@"; - public const int DBusAPIVersion = 17; + public const int DB_SCHEMA_VERSION = 7; + public const int REDOWNLOAD_FAVICONS_AFTER_DAYS = 7; // tango colors public const string[] COLORS = { diff --git a/INSTALL.md b/INSTALL.md index 81781ae2c..f91fedaed 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,28 +1,29 @@ ## Dependencies (package names may differ depending on distribution) -- build-essential -- cmake -- vala (>=0.26) -- pkg-config -- libgirepository1.0-dev -- libgtk-3-dev (>= 3.20) -- libsoup2.4-dev -- libjson-glib-dev -- libwebkit2gtk-4.0-dev -- libsqlite3-dev -- libsecret-1-dev -- libnotify-dev -- libxml2-dev -- libunity-dev (optional) -- librest-dev -- libgee-0.8-dev -- libgstreamer1.0-dev -- libgstreamer-plugins-base1.0-dev (gstreamer-pbutils-1.0) -- libgoa-1.0-dev (>= 3.20) -- libcurl-dev -- libpeas-dev +- `build-essential` +- `meson` +- `ninja-build` +- `vala (>=0.38)` +- `pkg-config` +- `libgirepository1.0-dev` +- `libgtk-3-dev (>= 3.22)` +- `libsoup2.4-dev` +- `libjson-glib-dev` +- `libwebkit2gtk-4.0-dev (>=2.18)` +- `libsqlite3-dev` +- `libsecret-1-dev` +- `libnotify-dev` +- `libxml2-dev` +- `libunity-dev (optional)` +- `librest-dev` +- `libgee-0.8-dev` +- `libgstreamer1.0-dev` +- `libgstreamer-plugins-base1.0-dev (gstreamer-pbutils-1.0)` +- `libgoa-1.0-dev (>= 3.20)` +- `libcurl-dev` +- `libpeas-dev` -## Fedora dependencies install +## Fedora dependencies install ``` dnf install gtk3-devel gtk2-devel vala make automake gcc gcc-c++ cmake json-glib-devel libsoup-devel sqlite-devel libgee-devel libsecret-devel libxml-devel rest-devel gstreamer1-devel gstreamer1-plugins-base-devel libpeas-devel webkitgtk4-devel gnome-online-accounts-devel libcurl-devel ``` @@ -30,11 +31,8 @@ dnf install gtk3-devel gtk2-devel vala make automake gcc gcc-c++ cmake json-glib ## Compiling ``` -git clone https://github.com/jangernert/FeedReader +git clone --recursive https://github.com/jangernert/FeedReader cd ./FeedReader -mkdir build -cd build -cmake .. -make -sudo make install +meson builddir --prefix=/usr +sudo ninja -C builddir install ``` diff --git a/README.md b/README.md index e8bd38fea..1f8c88df4 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Bountysource](https://img.shields.io/bountysource/team/jangernert-feedreader/activity.svg)](https://www.bountysource.com/teams/jangernert-feedreader/issues) +[![Translation status](https://hosted.weblate.org/widgets/feedreader/-/svg-badge.svg)](https://hosted.weblate.org/engage/feedreader/?utm_source=widget) [![CircleCI](https://circleci.com/gh/jangernert/FeedReader.svg?style=shield)](https://circleci.com/gh/jangernert/FeedReader) [![Bountysource](https://img.shields.io/bountysource/team/jangernert-feedreader/activity.svg)](https://www.bountysource.com/teams/jangernert-feedreader/issues) [![Join the chat at https://gitter.im/Feedreader-dev/Lobby](https://badges.gitter.im/Feedreader-dev/Lobby.svg)](https://gitter.im/Feedreader-dev/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) # [FeedReader](http://jangernert.github.io/FeedReader/) @@ -9,47 +9,62 @@ FeedReader is a modern desktop application designed to complement existing web-b
Website : http://jangernert.github.io/FeedReader/
-For translators : https://www.transifex.com/dev-feedreader/feedreader - - - -### Dependencies -- build-essential -- cmake -- vala (>=0.26) -- pkg-config -- libgirepository1.0-dev -- libgtk-3-dev (>= 3.22) -- libsoup2.4-dev -- libjson-glib-dev -- libwebkit2gtk-4.0-dev -- libsqlite3-dev -- libsecret-1-dev -- libnotify-dev -- libxml2-dev -- libunity-dev (optional) -- librest-dev -- libgee-0.8-dev -- libgstreamer1.0-dev -- libgstreamer-plugins-base1.0-dev (gstreamer-pbutils-1.0) -- libgoa-1.0-dev (>= 3.20) -- libcurl-dev -- libpeas-dev - - -### How to install - - Arch :
-
-      yaourt -S feedreader
-    
- - Fedora :
-
-      sudo dnf install feedreader
-    
-  - Solus OS : 
-
-      sudo eopkg install feedreader
-    
+For translators : https://hosted.weblate.org/projects/feedreader/ + + + +## Dependencies +- `build-essential` +- `meson` +- `ninja-build` +- `vala (>=0.38)` +- `pkg-config` +- `libgirepository1.0-dev` +- `libgtk-3-dev (>= 3.22)` +- `libsoup2.4-dev` +- `libjson-glib-dev` +- `libwebkit2gtk-4.0-dev (>=2.18)` +- `libsqlite3-dev` +- `libsecret-1-dev` +- `libnotify-dev` +- `libxml2-dev` +- `libunity-dev (optional)` +- `librest-dev` +- `libgee-0.8-dev` +- `libgstreamer1.0-dev` +- `libgstreamer-plugins-base1.0-dev (gstreamer-pbutils-1.0)` +- `libgoa-1.0-dev (>= 3.20)` +- `libcurl-dev` +- `libpeas-dev` + + +## How to install +### Arch Linux :
+```bash +yaourt -S feedreader +``` +### Fedora :
+```bash +sudo dnf install feedreader +``` +### Solus OS :
+```bash +sudo eopkg install feedreader +``` + +### openSUSE :
+```bash +sudo zypper install feedreader +``` + +### Ubuntu :
+ +The easiest way to install the latest FeedReader right now is to build from source, +which you can do with this script: + +```bash +curl https://raw.githubusercontent.com/jangernert/FeedReader/master/scripts/install_ubuntu.sh | bash +``` ### Flatpak @@ -57,13 +72,12 @@ FeedReader is now availble as Flatpak and should be installable on all major Lin For more information about Flatpak and how to use or install it for your distribution see the [Flatpak webpage](http://flatpak.org). -Besides installing the Flatpak Framework, you should also install the following portal packages using your distributions paket manager: -(names can differ depending on the distribution) -
xdg-desktop-portal
-
xdg-desktop-portal-gtk
+Besides installing the Flatpak Framework, you should also install the following portal packages using your distributions package manager: +- `xdg-desktop-portal` +- `xdg-desktop-portal-gtk` -####Install FeedReader Flatpak via repository, this enables OTA updates and is the recommended way: -Defaults to the stable branch. +#### Via repository +This enables OTA updates and is the recommended way. Defaults to the stable branch.
 flatpak install http://feedreader.xarbit.net/feedreader-repo/feedreader.flatpakref
 
@@ -71,15 +85,11 @@ flatpak install http://feedreader.xarbit.net/feedreader-repo/feedreader.flatpakr You can also create your own Flatpak bundle running `make bundle` command in the `flatpak/` sub-directory. -### How to build the latest version +### Manual installation ``` -git clone https://github.com/jangernert/FeedReader +git clone --recursive https://github.com/jangernert/FeedReader cd ./FeedReader -mkdir build -cd ./build -cmake .. -make -sudo make install +meson builddir --prefix=/usr +sudo ninja -C builddir install ``` -Arch users can build the latest version using `yaourt -S feedreader-git` - +Arch Linux users can build the latest version using `yaourt -S feedreader-git` diff --git a/WebExtension/CMakeLists.txt b/WebExtension/CMakeLists.txt deleted file mode 100644 index 81d8e5f8e..000000000 --- a/WebExtension/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -vala_precompile(webext webextension - webextension.vala - -PACKAGES - libsoup-2.4 - gtk+-3.0 - webkit2gtk-web-extension-4.0 - -OPTIONS - --vapidir=${CMAKE_SOURCE_DIR}/vapi/ -) - -add_library(webextension SHARED ${webext}) diff --git a/WebExtension/webextension.vala b/WebExtension/webextension.vala deleted file mode 100644 index 3d7c9142c..000000000 --- a/WebExtension/webextension.vala +++ /dev/null @@ -1,179 +0,0 @@ -[DBus (name = "org.gnome.FeedReader.ArticleView")] -public class FeedReaderWebExtension : Object { - - private WebKit.DOM.Document m_doc; - public signal void onClick(string path, int width, int height, string url); - public signal void message(string message); - - [DBus (visible = false)] - public void on_bus_aquired(DBusConnection connection) - { - try - { - connection.register_object("/org/gnome/FeedReader/ArticleView", this); - } - catch(GLib.IOError e) - { - warning("Could not register object"); - } - } - - [DBus (visible = false)] - public void on_page_created(WebKit.WebExtension extension, WebKit.WebPage page) - { - page.document_loaded.connect(() => { - onDocLoaded(page); - }); - message("on_page_created"); - } - - private void onDocLoaded(WebKit.WebPage page) - { - m_doc = page.get_dom_document(); - message("onDocLoaded"); - } - - public void recalculate() - { - message("recalculate"); - var images = m_doc.get_images(); - ulong count = images.get_length(); - - for(ulong i = 0; i < count; i++) - { - var image = (WebKit.DOM.HTMLImageElement)images.item(i); - - // if image was so huge it had to be replaced with a downscaled version - if(image.has_attribute("FR_huge")) - { - addListener(image); - continue; - } - else if(image.has_attribute("FR_parent")) - { - addListener(image); - continue; - } - - long nHeight = image.get_natural_height(); - long nWidth = image.get_natural_width(); - long height = image.get_height(); - long width = image.get_width(); - - if(nHeight > 250 || nWidth > 250) - { - double hRatio = (double)height / (double)nHeight; - double wRatio = (double)width / (double)nWidth; - double threshold = 0.8; - - if(hRatio <= threshold - || wRatio <= threshold) - addListener(image); - else - removeListener(image); - } - } - } - - [DBus (visible = false)] - private void addListener(WebKit.DOM.HTMLImageElement image) - { - ((WebKit.DOM.EventTarget) image).add_event_listener_with_closure("mouseover", on_enter, false); - ((WebKit.DOM.EventTarget) image).add_event_listener_with_closure("mousemove", on_enter, false); - ((WebKit.DOM.EventTarget) image).add_event_listener_with_closure("mouseout", on_leave, false); - ((WebKit.DOM.EventTarget) image).add_event_listener_with_closure("click", on_click, false); - } - - [DBus (visible = false)] - private void removeListener(WebKit.DOM.HTMLImageElement image) - { - ((WebKit.DOM.EventTarget) image).remove_event_listener_with_closure("mouseover", on_enter, false); - ((WebKit.DOM.EventTarget) image).remove_event_listener_with_closure("mousemove", on_enter, false); - ((WebKit.DOM.EventTarget) image).remove_event_listener_with_closure("mouseout", on_leave, false); - ((WebKit.DOM.EventTarget) image).remove_event_listener_with_closure("click", on_click, false); - - try - { - image.set_attribute("class", ""); - } - catch(GLib.Error e) - { - stderr.printf("WebExtension.recalculate: %s", e.message); - } - } - - [DBus (visible = false)] - private void on_enter(WebKit.DOM.EventTarget target, WebKit.DOM.Event event) - { - try - { - var image = (WebKit.DOM.HTMLImageElement)target; - image.set_attribute("class", "clickable-img-hover"); - } - catch(GLib.Error e) - { - - } - } - - [DBus (visible = false)] - private void on_leave(WebKit.DOM.EventTarget target, WebKit.DOM.Event event) - { - try - { - var image = (WebKit.DOM.HTMLImageElement)target; - image.set_attribute("class", ""); - } - catch(GLib.Error e) - { - - } - } - - [DBus (visible = false)] - public void on_click(WebKit.DOM.EventTarget target, WebKit.DOM.Event event) - { - event.prevent_default(); - var image = (WebKit.DOM.HTMLImageElement)target; - - string url = ""; - var parent = image.get_parent_element(); - if(parent.tag_name == "A") - url = parent.get_attribute("href"); - - - int height = (int)image.natural_height; - int width = (int)image.natural_width; - string src = image.src; - if(src.has_prefix("file://")) - src = src.substring("file://".length); - - if(image.has_attribute("FR_huge")) - { - src = image.get_attribute("FR_huge"); - Gdk.Pixbuf.get_file_info(src, out width, out height); - } - else if(image.has_attribute("FR_parent")) - { - src = image.get_attribute("FR_parent"); - Gdk.Pixbuf.get_file_info(src, out width, out height); - } - - onClick(src, width, height, url); - } -} - -[DBus (name = "org.gnome.FeedReader.ArticleView")] -public errordomain FeedReaderWebExtensionError -{ - ERROR -} - -[CCode (cname = "G_MODULE_EXPORT webkit_web_extension_initialize", instance_pos = -1)] -void webkit_web_extension_initialize(WebKit.WebExtension extension) -{ - var server = new FeedReaderWebExtension(); - extension.page_created.connect(server.on_page_created); - Bus.own_name(BusType.SESSION, "org.gnome.FeedReader.ArticleView", BusNameOwnerFlags.NONE, - server.on_bus_aquired, null, () => { warning("Could not aquire name"); }); -} diff --git a/circle.yml b/circle.yml new file mode 100644 index 000000000..c92c3a4f0 --- /dev/null +++ b/circle.yml @@ -0,0 +1,60 @@ +version: 2 +jobs: + build: + docker: + # See docker/Dockerfile + - image: feedreader/fedora-feedreader-devel + environment: + ELASTICSEARCH_URL: http://127.0.0.1:9200 + # Note: The Feedbin API has to run on subdomain "api" + FEEDBIN_TEST_HOST: http://api.x.localhost:9292 + POSTGRES_USERNAME: postgres + POSTGRES_HOST: 127.0.0.1 + DATABASE_URL: postgres://postgres@127.0.0.1:5432/feedbin_db + REDIS_URL: redis://127.0.0.1:6379 + # Feedbin uses an ancient version of ElasticSearch + # https://github.com/feedbin/feedbin/blob/master/.travis.yml + - image: elasticsearch:2.3.3 + environment: + 'discovery.type': single-node + - image: postgres:9.6.5-alpine + - image: redis:3.2.11-alpine + + working_directory: ~/FeedReader + steps: + - run: + name: Setup Feedbin + # Wait a few seconds for postgres to startup + command: sleep 5 && cd /feedbin && rake db:setup + - run: + name: Run Feedbin background processes + command: cd /feedbin && bundle exec foreman start + background: true + - run: + name: Run Feedbin + command: cd /feedbin && rackup + background: true + - checkout + - run: + name: Configure + command: meson builddir -DBAZQUX=ON -DFEEDHQ=ON + - run: + name: Build + command: cd builddir && ninja -j4 + - run: + name: Test + command: cd builddir && ninja test + - run: + name: Generate JUnit XML + command: | + mkdir -p /tmp/test-results/junit/ + cd builddir + for f in *.gtester.log; do + xsltproc -o /tmp/test-results/junit/$(basename $f .gtester.log).xml ../gtester-to-junit-4.xsl $f; + done + when: always + - store_test_results: + path: /tmp/test-results + - store_artifacts: + path: /tmp/test-results/junit + destination: test-results diff --git a/cmake/FindCurl.cmake b/cmake/FindCurl.cmake deleted file mode 100644 index 6773ff921..000000000 --- a/cmake/FindCurl.cmake +++ /dev/null @@ -1,29 +0,0 @@ -# - Try to find the libesmtp library -# Once done this will define -# -# CURL_FOUND - system has the libesmtp library -# CURL_CONFIG -# CURL_INCLUDE_DIR - the libesmtp include directory -# CURL_LIBRARIES - The libraries needed to use libesmtp -# -# Based on FindESMTP.cmake -# Distributed under the BSD license. - -if (CURL_LIBRARIES) - # Already in cache, be silent - set(CURL_FIND_QUIETLY TRUE) -endif (CURL_LIBRARIES) - -FIND_PROGRAM(CURL_CONFIG curl-config) - -IF (CURL_CONFIG) - EXEC_PROGRAM(${CURL_CONFIG} ARGS --libs OUTPUT_VARIABLE _CURL_LIBRARIES) - string(REGEX REPLACE "[\r\n]" " " _CURL_LIBRARIES "${_CURL_LIBRARIES}") - set (CURL_LIBRARIES ${_CURL_LIBRARIES} CACHE STRING "The libraries needed for Curl") -ENDIF (CURL_CONFIG) - -include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(CURL DEFAULT_MSG CURL_LIBRARIES ) - -MARK_AS_ADVANCED(CURL_LIBRARIES) - diff --git a/cmake/FindGLIB.cmake b/cmake/FindGLIB.cmake deleted file mode 100644 index 7262b92e6..000000000 --- a/cmake/FindGLIB.cmake +++ /dev/null @@ -1,123 +0,0 @@ -# - Try to find Glib and its components (gio, gobject etc) -# Once done, this will define -# -# GLIB_FOUND - system has Glib -# GLIB_INCLUDE_DIRS - the Glib include directories -# GLIB_LIBRARIES - link these to use Glib -# -# Optionally, the COMPONENTS keyword can be passed to find_package() -# and Glib components can be looked for. Currently, the following -# components can be used, and they define the following variables if -# found: -# -# gio: GLIB_GIO_LIBRARIES -# gobject: GLIB_GOBJECT_LIBRARIES -# gmodule: GLIB_GMODULE_LIBRARIES -# gthread: GLIB_GTHREAD_LIBRARIES -# -# Note that the respective _INCLUDE_DIR variables are not set, since -# all headers are in the same directory as GLIB_INCLUDE_DIRS. -# -# Copyright (C) 2012 Raphael Kubo da Costa -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS -# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -find_package(PkgConfig) -pkg_check_modules(PC_GLIB QUIET glib-2.0) - -find_library(GLIB_LIBRARIES - NAMES glib-2.0 - HINTS ${PC_GLIB_LIBDIR} - ${PC_GLIB_LIBRARY_DIRS} -) - -# Files in glib's main include path may include glibconfig.h, which, -# for some odd reason, is normally in $LIBDIR/glib-2.0/include. -get_filename_component(_GLIB_LIBRARY_DIR ${GLIB_LIBRARIES} PATH) -find_path(GLIBCONFIG_INCLUDE_DIR - NAMES glibconfig.h - HINTS ${PC_LIBDIR} ${PC_LIBRARY_DIRS} ${_GLIB_LIBRARY_DIR} - ${PC_GLIB_INCLUDEDIR} ${PC_GLIB_INCLUDE_DIRS} - PATH_SUFFIXES glib-2.0/include -) - -find_path(GLIB_INCLUDE_DIR - NAMES glib.h - HINTS ${PC_GLIB_INCLUDEDIR} - ${PC_GLIB_INCLUDE_DIRS} - PATH_SUFFIXES glib-2.0 -) - -set(GLIB_INCLUDE_DIRS ${GLIB_INCLUDE_DIR} ${GLIBCONFIG_INCLUDE_DIR}) - -# Version detection -if (EXISTS "${GLIBCONFIG_INCLUDE_DIR}/glibconfig.h") - file(READ "${GLIBCONFIG_INCLUDE_DIR}/glibconfig.h" GLIBCONFIG_H_CONTENTS) - string(REGEX MATCH "#define GLIB_MAJOR_VERSION ([0-9]+)" _dummy "${GLIBCONFIG_H_CONTENTS}") - set(GLIB_VERSION_MAJOR "${CMAKE_MATCH_1}") - string(REGEX MATCH "#define GLIB_MINOR_VERSION ([0-9]+)" _dummy "${GLIBCONFIG_H_CONTENTS}") - set(GLIB_VERSION_MINOR "${CMAKE_MATCH_1}") - string(REGEX MATCH "#define GLIB_MICRO_VERSION ([0-9]+)" _dummy "${GLIBCONFIG_H_CONTENTS}") - set(GLIB_VERSION_MICRO "${CMAKE_MATCH_1}") - set(GLIB_VERSION "${GLIB_VERSION_MAJOR}.${GLIB_VERSION_MINOR}.${GLIB_VERSION_MICRO}") -endif () - -# Additional Glib components. We only look for libraries, as not all of them -# have corresponding headers and all headers are installed alongside the main -# glib ones. -foreach (_component ${GLIB_FIND_COMPONENTS}) - if (${_component} STREQUAL "gio") - find_library(GLIB_GIO_LIBRARIES NAMES gio-2.0 HINTS ${_GLIB_LIBRARY_DIR}) - set(ADDITIONAL_REQUIRED_VARS ${ADDITIONAL_REQUIRED_VARS} GLIB_GIO_LIBRARIES) - elseif (${_component} STREQUAL "gobject") - find_library(GLIB_GOBJECT_LIBRARIES NAMES gobject-2.0 HINTS ${_GLIB_LIBRARY_DIR}) - set(ADDITIONAL_REQUIRED_VARS ${ADDITIONAL_REQUIRED_VARS} GLIB_GOBJECT_LIBRARIES) - elseif (${_component} STREQUAL "gmodule") - find_library(GLIB_GMODULE_LIBRARIES NAMES gmodule-2.0 HINTS ${_GLIB_LIBRARY_DIR}) - set(ADDITIONAL_REQUIRED_VARS ${ADDITIONAL_REQUIRED_VARS} GLIB_GMODULE_LIBRARIES) - elseif (${_component} STREQUAL "gthread") - find_library(GLIB_GTHREAD_LIBRARIES NAMES gthread-2.0 HINTS ${_GLIB_LIBRARY_DIR}) - set(ADDITIONAL_REQUIRED_VARS ${ADDITIONAL_REQUIRED_VARS} GLIB_GTHREAD_LIBRARIES) - elseif (${_component} STREQUAL "gio-unix") - # gio-unix is compiled as part of the gio library, but the include paths - # are separate from the shared glib ones. Since this is currently only used - # by WebKitGTK+ we don't go to extraordinary measures beyond pkg-config. - pkg_check_modules(GIO_UNIX QUIET gio-unix-2.0) - endif () -endforeach () - -include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLIB REQUIRED_VARS GLIB_INCLUDE_DIRS GLIB_LIBRARIES ${ADDITIONAL_REQUIRED_VARS} - VERSION_VAR GLIB_VERSION) - -mark_as_advanced( - GLIBCONFIG_INCLUDE_DIR - GLIB_GIO_LIBRARIES - GLIB_GIO_UNIX_LIBRARIES - GLIB_GMODULE_LIBRARIES - GLIB_GOBJECT_LIBRARIES - GLIB_GTHREAD_LIBRARIES - GLIB_INCLUDE_DIR - GLIB_INCLUDE_DIRS - GLIB_LIBRARIES -) - diff --git a/cmake/FindGirCompiler.cmake b/cmake/FindGirCompiler.cmake deleted file mode 100644 index ccec563a5..000000000 --- a/cmake/FindGirCompiler.cmake +++ /dev/null @@ -1,56 +0,0 @@ -## -# Copyright 2009-2010 Jakob Westhoff. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY JAKOB WESTHOFF ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -# EVENT SHALL JAKOB WESTHOFF OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# The views and conclusions contained in the software and documentation are those -# of the authors and should not be interpreted as representing official policies, -# either expressed or implied, of Jakob Westhoff -## - -## -# Find module for the Gir compiler (g-ir-compiler) -# -# This module determines wheter a Gir compiler is installed on the current -# system and where its executable is. -# -# Call the module using "find_package(GirCompiler) from within your CMakeLists.txt. -# -# The following variables will be set after an invocation: -# -# G_IR_COMPILER_FOUND Whether the g-ir-compiler compiler has been found or not -# G_IR_COMPILER_EXECUTABLE Full path to the g-ir-compiler executable if it has been found -## - - -# Search for the g-ir-compiler executable in the usual system paths. -find_program (G_IR_COMPILER_EXECUTABLE - NAMES g-ir-compiler) - -# Handle the QUIETLY and REQUIRED arguments, which may be given to the find call. -# Furthermore set G_IR_COMPILER_FOUND to TRUE if the g-ir-compiler has been found (aka. -# G_IR_COMPILER_EXECUTABLE is set) - -include (FindPackageHandleStandardArgs) -find_package_handle_standard_args (GirCompiler DEFAULT_MSG G_IR_COMPILER_EXECUTABLE) - -mark_as_advanced (G_IR_COMPILER_EXECUTABLE) diff --git a/cmake/FindVala.cmake b/cmake/FindVala.cmake deleted file mode 100644 index aa3a6e7d2..000000000 --- a/cmake/FindVala.cmake +++ /dev/null @@ -1,65 +0,0 @@ -## -# Copyright 2009-2010 Jakob Westhoff. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY JAKOB WESTHOFF ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -# EVENT SHALL JAKOB WESTHOFF OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# The views and conclusions contained in the software and documentation are those -# of the authors and should not be interpreted as representing official policies, -# either expressed or implied, of Jakob Westhoff -## - -## -# Find module for the Vala compiler (valac) -# -# This module determines wheter a Vala compiler is installed on the current -# system and where its executable is. -# -# Call the module using "find_package(Vala) from within your CMakeLists.txt. -# -# The following variables will be set after an invocation: -# -# VALA_FOUND Whether the vala compiler has been found or not -# VALA_EXECUTABLE Full path to the valac executable if it has been found -# VALA_VERSION Version number of the available valac -## - - -# Search for the valac executable in the usual system paths. -find_program(VALA_EXECUTABLE - NAMES valac) - -# Handle the QUIETLY and REQUIRED arguments, which may be given to the find call. -# Furthermore set VALA_FOUND to TRUE if Vala has been found (aka. -# VALA_EXECUTABLE is set) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(Vala DEFAULT_MSG VALA_EXECUTABLE) - -mark_as_advanced(VALA_EXECUTABLE) - -# Determine the valac version -if(VALA_FOUND) - execute_process(COMMAND ${VALA_EXECUTABLE} "--version" - OUTPUT_VARIABLE "VALA_VERSION") - string(REPLACE "Vala" "" "VALA_VERSION" ${VALA_VERSION}) - string(STRIP ${VALA_VERSION} "VALA_VERSION") -endif(VALA_FOUND) diff --git a/cmake/GObjectIntrospectionMacros.cmake b/cmake/GObjectIntrospectionMacros.cmake deleted file mode 100644 index 6a0dc0ba0..000000000 --- a/cmake/GObjectIntrospectionMacros.cmake +++ /dev/null @@ -1,34 +0,0 @@ -macro(add_target_gir TARGET_NAME GIR_NAME HEADER CFLAGS GRANITE_VERSION) - set(PACKAGES "") - foreach(PKG ${ARGN}) - set(PACKAGES ${PACKAGES} --include=${PKG}) - endforeach() - install(CODE "set(ENV{LD_LIBRARY_PATH} \"${CMAKE_CURRENT_BINARY_DIR}:\$ENV{LD_LIBRARY_PATH}\") - execute_process(COMMAND g-ir-scanner ${CFLAGS} -n ${GIR_NAME} - --quiet - --library ${TARGET_NAME} ${PACKAGES} - -o ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.gir - -L${CMAKE_CURRENT_BINARY_DIR} - --nsversion=${GRANITE_VERSION} ${HEADER})") - install(CODE "execute_process(COMMAND g-ir-compiler ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.gir -o ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.typelib)") - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.gir DESTINATION share/gir-1.0/) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.typelib DESTINATION lib/girepository-1.0/) -endmacro() - -macro(add_target_gir_with_executable TARGET_NAME EXE_NAME GIR_NAME HEADER EXE_HEADER CFLAGS GRANITE_VERSION) - set(PACKAGES "") - foreach(PKG ${ARGN}) - set(PACKAGES ${PACKAGES} --include=${PKG}) - endforeach() - install(CODE "set(ENV{LD_LIBRARY_PATH} \"${CMAKE_CURRENT_BINARY_DIR}:\$ENV{LD_LIBRARY_PATH}\") - execute_process(COMMAND g-ir-scanner ${CFLAGS} -n ${GIR_NAME} - --quiet - --library ${TARGET_NAME} --program ${EXE_NAME} ${PACKAGES} - -o ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.gir - -L${CMAKE_CURRENT_BINARY_DIR} - -I${CMAKE_CURRENT_BINARY_DIR} - --nsversion=${GRANITE_VERSION} ${HEADER} ${EXE_HEADER})") - install(CODE "execute_process(COMMAND g-ir-compiler ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.gir -o ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.typelib)") - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.gir DESTINATION share/gir-1.0/) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.typelib DESTINATION lib/girepository-1.0/) -endmacro() diff --git a/cmake/GResource.cmake b/cmake/GResource.cmake deleted file mode 100644 index e4a6aecd7..000000000 --- a/cmake/GResource.cmake +++ /dev/null @@ -1,68 +0,0 @@ -# -# Copyright (C) 2013 Venom authors and contributors -# -# This file is part of Venom. -# -# Venom is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Venom is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Venom. If not, see . -# - -FIND_PROGRAM(GLIB_COMPILE_RESOURCES_EXECUTABLE NAMES glib-compile-resources) -MARK_AS_ADVANCED(GLIB_COMPILE_RESOURCES_EXECUTABLE) - -INCLUDE(CMakeParseArguments) - -FUNCTION(GLIB_COMPILE_RESOURCES output) - cmake_parse_arguments(ARGS "" "SOURCE" "" ${ARGN}) - SET(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) - SET(out_files "") - - FOREACH(src ${ARGS_SOURCE} ${ARGS_UNPARSED_ARGUMENTS}) - SET(in_file "${CMAKE_CURRENT_SOURCE_DIR}/${src}") - GET_FILENAME_COMPONENT(WORKING_DIR ${in_file} PATH) - STRING(REPLACE ".xml" ".c" src ${src}) - SET(out_file "${DIRECTORY}/${src}") - GET_FILENAME_COMPONENT(OUPUT_DIR ${out_file} PATH) - FILE(MAKE_DIRECTORY ${OUPUT_DIR}) - LIST(APPEND out_files "${DIRECTORY}/${src}") - - #FIXME implicit depends currently not working - EXECUTE_PROCESS( - COMMAND - ${GLIB_COMPILE_RESOURCES_EXECUTABLE} - "--generate-dependencies" - ${in_file} - WORKING_DIRECTORY ${WORKING_DIR} - OUTPUT_VARIABLE in_file_dep - ) - STRING(REGEX REPLACE "(\r?\n)" ";" in_file_dep "${in_file_dep}") - SET(in_file_dep_path "") - FOREACH(dep ${in_file_dep}) - LIST(APPEND in_file_dep_path "${WORKING_DIR}/${dep}") - ENDFOREACH(dep ${in_file_dep}) - ADD_CUSTOM_COMMAND( - OUTPUT ${out_file} - WORKING_DIRECTORY ${WORKING_DIR} - COMMAND - ${GLIB_COMPILE_RESOURCES_EXECUTABLE} - ARGS - "--generate-source" - "--target=${out_file}" - ${in_file} - DEPENDS - ${in_file};${in_file_dep_path} - ) - ENDFOREACH(src ${ARGS_SOURCES} ${ARGS_UNPARSED_ARGUMENTS}) - SET(${output} ${out_files} PARENT_SCOPE) -ENDFUNCTION(GLIB_COMPILE_RESOURCES) - diff --git a/cmake/GSettings.cmake b/cmake/GSettings.cmake deleted file mode 100644 index 8fd745c3e..000000000 --- a/cmake/GSettings.cmake +++ /dev/null @@ -1,42 +0,0 @@ -# GSettings.cmake, CMake macros written for Marlin, feel free to re-use them. - -option (GSETTINGS_LOCALINSTALL "Install GSettings Schemas locally instead of to the GLib prefix" ON) - -option (GSETTINGS_COMPILE "Compile GSettings Schemas after installation" ${GSETTINGS_LOCALINSTALL}) - -if(GSETTINGS_LOCALINSTALL) - message(STATUS "GSettings schemas will be installed locally.") -endif() - -if(GSETTINGS_COMPILE) - message(STATUS "GSettings shemas will be compiled.") -endif() - -macro(add_schema SCHEMA_NAME) - - set(PKG_CONFIG_EXECUTABLE pkg-config) - # Have an option to not install the schema into where GLib is - if (GSETTINGS_LOCALINSTALL) - SET (GSETTINGS_DIR "${CMAKE_INSTALL_PREFIX}/share/glib-2.0/schemas/") - else (GSETTINGS_LOCALINSTALL) - execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} glib-2.0 --variable prefix OUTPUT_VARIABLE _glib_prefix OUTPUT_STRIP_TRAILING_WHITESPACE) - SET (GSETTINGS_DIR "${_glib_prefix}/share/glib-2.0/schemas/") - endif (GSETTINGS_LOCALINSTALL) - - # Run the validator and error if it fails - execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} gio-2.0 --variable glib_compile_schemas OUTPUT_VARIABLE _glib_comple_schemas OUTPUT_STRIP_TRAILING_WHITESPACE) - execute_process (COMMAND ${_glib_comple_schemas} --dry-run --schema-file=${CMAKE_CURRENT_SOURCE_DIR}/${SCHEMA_NAME} ERROR_VARIABLE _schemas_invalid OUTPUT_STRIP_TRAILING_WHITESPACE) - - if (_schemas_invalid) - message (SEND_ERROR "Schema validation error: ${_schemas_invalid}") - endif (_schemas_invalid) - - # Actually install and recomple schemas - message (STATUS "GSettings schemas will be installed into ${GSETTINGS_DIR}") - install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/${SCHEMA_NAME} DESTINATION ${GSETTINGS_DIR} OPTIONAL) - - if (GSETTINGS_COMPILE) - install (CODE "message (STATUS \"Compiling GSettings schemas\")") - install (CODE "execute_process (COMMAND ${_glib_comple_schemas} ${GSETTINGS_DIR})") - endif () -endmacro() diff --git a/cmake/GetGitRevisionDescription.cmake b/cmake/GetGitRevisionDescription.cmake deleted file mode 100644 index 058928cdb..000000000 --- a/cmake/GetGitRevisionDescription.cmake +++ /dev/null @@ -1,131 +0,0 @@ -# - Returns a version string from Git -# -# These functions force a re-configure on each git commit so that you can -# trust the values of the variables in your build system. -# -# get_git_head_revision( [ ...]) -# -# Returns the refspec and sha hash of the current head revision -# -# git_describe( [ ...]) -# -# Returns the results of git describe on the source tree, and adjusting -# the output so that it tests false if an error occurs. -# -# git_get_exact_tag( [ ...]) -# -# Returns the results of git describe --exact-match on the source tree, -# and adjusting the output so that it tests false if there was no exact -# matching tag. -# -# Requires CMake 2.6 or newer (uses the 'function' command) -# -# Original Author: -# 2009-2010 Ryan Pavlik -# http://academic.cleardefinition.com -# Iowa State University HCI Graduate Program/VRAC -# -# Copyright Iowa State University 2009-2010. -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or copy at -# http://www.boost.org/LICENSE_1_0.txt) - -if(__get_git_revision_description) - return() -endif() -set(__get_git_revision_description YES) - -# We must run the following at "include" time, not at function call time, -# to find the path to this module rather than the path to a calling list file -get_filename_component(_gitdescmoddir ${CMAKE_CURRENT_LIST_FILE} PATH) - -function(get_git_head_revision _refspecvar _hashvar) - set(GIT_PARENT_DIR "${CMAKE_CURRENT_SOURCE_DIR}") - set(GIT_DIR "${GIT_PARENT_DIR}/.git") - while(NOT EXISTS "${GIT_DIR}") # .git dir not found, search parent directories - set(GIT_PREVIOUS_PARENT "${GIT_PARENT_DIR}") - get_filename_component(GIT_PARENT_DIR ${GIT_PARENT_DIR} PATH) - if(GIT_PARENT_DIR STREQUAL GIT_PREVIOUS_PARENT) - # We have reached the root directory, we are not in git - set(${_refspecvar} "GITDIR-NOTFOUND" PARENT_SCOPE) - set(${_hashvar} "GITDIR-NOTFOUND" PARENT_SCOPE) - return() - endif() - set(GIT_DIR "${GIT_PARENT_DIR}/.git") - endwhile() - # check if this is a submodule - if(NOT IS_DIRECTORY ${GIT_DIR}) - file(READ ${GIT_DIR} submodule) - string(REGEX REPLACE "gitdir: (.*)\n$" "\\1" GIT_DIR_RELATIVE ${submodule}) - get_filename_component(SUBMODULE_DIR ${GIT_DIR} PATH) - get_filename_component(GIT_DIR ${SUBMODULE_DIR}/${GIT_DIR_RELATIVE} ABSOLUTE) - endif() - set(GIT_DATA "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/git-data") - if(NOT EXISTS "${GIT_DATA}") - file(MAKE_DIRECTORY "${GIT_DATA}") - endif() - - if(NOT EXISTS "${GIT_DIR}/HEAD") - return() - endif() - set(HEAD_FILE "${GIT_DATA}/HEAD") - configure_file("${GIT_DIR}/HEAD" "${HEAD_FILE}" COPYONLY) - - configure_file("${_gitdescmoddir}/GetGitRevisionDescription.cmake.in" - "${GIT_DATA}/grabRef.cmake" - @ONLY) - include("${GIT_DATA}/grabRef.cmake") - - set(${_refspecvar} "${HEAD_REF}" PARENT_SCOPE) - set(${_hashvar} "${HEAD_HASH}" PARENT_SCOPE) -endfunction() - -function(git_describe _var) - if(NOT GIT_FOUND) - find_package(Git QUIET) - endif() - get_git_head_revision(refspec hash) - if(NOT GIT_FOUND) - set(${_var} "GIT-NOTFOUND" PARENT_SCOPE) - return() - endif() - if(NOT hash) - set(${_var} "HEAD-HASH-NOTFOUND" PARENT_SCOPE) - return() - endif() - - # TODO sanitize - #if((${ARGN}" MATCHES "&&") OR - # (ARGN MATCHES "||") OR - # (ARGN MATCHES "\\;")) - # message("Please report the following error to the project!") - # message(FATAL_ERROR "Looks like someone's doing something nefarious with git_describe! Passed arguments ${ARGN}") - #endif() - - #message(STATUS "Arguments to execute_process: ${ARGN}") - - execute_process(COMMAND - "${GIT_EXECUTABLE}" - describe - ${hash} - ${ARGN} - WORKING_DIRECTORY - "${CMAKE_CURRENT_SOURCE_DIR}" - RESULT_VARIABLE - res - OUTPUT_VARIABLE - out - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE) - if(NOT res EQUAL 0) - set(out "${out}-${res}-NOTFOUND") - endif() - - set(${_var} "${out}" PARENT_SCOPE) -endfunction() - -function(git_get_exact_tag _var) - git_describe(out --exact-match ${ARGN}) - set(${_var} "${out}" PARENT_SCOPE) -endfunction() - diff --git a/cmake/GetGitRevisionDescription.cmake.in b/cmake/GetGitRevisionDescription.cmake.in deleted file mode 100644 index 210902016..000000000 --- a/cmake/GetGitRevisionDescription.cmake.in +++ /dev/null @@ -1,42 +0,0 @@ -# -# Internal file for GetGitRevisionDescription.cmake -# -# Requires CMake 2.6 or newer (uses the 'function' command) -# -# Original Author: -# 2009-2010 Ryan Pavlik -# http://academic.cleardefinition.com -# Iowa State University HCI Graduate Program/VRAC -# -# Copyright Iowa State University 2009-2010. -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or copy at -# http://www.boost.org/LICENSE_1_0.txt) - -set(HEAD_HASH) - -file(READ "@HEAD_FILE@" HEAD_CONTENTS LIMIT 1024) - -string(STRIP "${HEAD_CONTENTS}" HEAD_CONTENTS) -if(HEAD_CONTENTS MATCHES "ref") - # named branch - string(REPLACE "ref: " "" HEAD_REF "${HEAD_CONTENTS}") - if(EXISTS "@GIT_DIR@/${HEAD_REF}") - configure_file("@GIT_DIR@/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY) - else() - configure_file("@GIT_DIR@/packed-refs" "@GIT_DATA@/packed-refs" COPYONLY) - file(READ "@GIT_DATA@/packed-refs" PACKED_REFS) - if(${PACKED_REFS} MATCHES "([0-9a-z]*) ${HEAD_REF}") - set(HEAD_HASH "${CMAKE_MATCH_1}") - endif() - endif() -else() - # detached HEAD - configure_file("@GIT_DIR@/HEAD" "@GIT_DATA@/head-ref" COPYONLY) -endif() - -if(NOT HEAD_HASH) - file(READ "@GIT_DATA@/head-ref" HEAD_HASH LIMIT 1024) - string(STRIP "${HEAD_HASH}" HEAD_HASH) -endif() - diff --git a/cmake/ParseArguments.cmake b/cmake/ParseArguments.cmake deleted file mode 100644 index 717c0f56f..000000000 --- a/cmake/ParseArguments.cmake +++ /dev/null @@ -1,36 +0,0 @@ -## -# This is a helper Macro to parse optional arguments in Macros/Functions -# It has been taken from the public CMake wiki. -# See http://www.cmake.org/Wiki/CMakeMacroParseArguments for documentation and -# licensing. -## -macro(parse_arguments prefix arg_names option_names) - set(DEFAULT_ARGS) - foreach(arg_name ${arg_names}) - set(${prefix}_${arg_name}) - endforeach(arg_name) - foreach(option ${option_names}) - set(${prefix}_${option} FALSE) - endforeach(option) - - set(current_arg_name DEFAULT_ARGS) - set(current_arg_list) - foreach(arg ${ARGN}) - set(larg_names ${arg_names}) - list(FIND larg_names "${arg}" is_arg_name) - if(is_arg_name GREATER -1) - set(${prefix}_${current_arg_name} ${current_arg_list}) - set(current_arg_name ${arg}) - set(current_arg_list) - else(is_arg_name GREATER -1) - set(loption_names ${option_names}) - list(FIND loption_names "${arg}" is_option) - if(is_option GREATER -1) - set(${prefix}_${arg} TRUE) - else(is_option GREATER -1) - set(current_arg_list ${current_arg_list} ${arg}) - endif(is_option GREATER -1) - endif(is_arg_name GREATER -1) - endforeach(arg) - set(${prefix}_${current_arg_name} ${current_arg_list}) -endmacro(parse_arguments) diff --git a/cmake/README b/cmake/README deleted file mode 100644 index 9d45b32f2..000000000 --- a/cmake/README +++ /dev/null @@ -1,10 +0,0 @@ - Elementary CMake modules - -This is a set of CMake modules: Translations, GSettings, and Vala modules. - -For all the Vala related modules see README.Vala.rst: - - ParseArguments.cmake - - ValaPrecompile.cmake - - ValaVersion.cmake - - FindVala.cmake - diff --git a/cmake/README.Vala.rst b/cmake/README.Vala.rst deleted file mode 100644 index bcc59b763..000000000 --- a/cmake/README.Vala.rst +++ /dev/null @@ -1,173 +0,0 @@ -========== -Vala CMake -========== -:Author: - Jakob Westhoff -:Version: - Draft - - -Overview -======== - -Vala CMake is a collection of macros for the CMake_ build system to allow the -creation and management of projects developed using the Vala_ programming -language or its "Genie" flavor (less tested). - - -Installation -============ - -To use the Vala macros in your own project you need to copy the macro files to -an arbitrary folder in your projects directory and reference them in your -``CMakeLists.txt`` file. - -Assuming the macros are stored under ``cmake/vala`` in your projects folder you -need to add the following information to your base ``CMakeLists.txt``:: - - list(APPEND CMAKE_MODULE_PATH - ${CMAKE_SOURCE_DIR}/cmake/vala - ) - -After the new module path as been added you can simply include the provided -modules or use the provided find routines. - - -Finding Vala -============ - -The find module for vala works like any other Find module in CMake. -You can use it by simply calling the usual ``find_package`` function. Default -parameters like ``REQUIRED`` and ``QUIETLY`` are supported. - -:: - - find_package(Vala REQUIRED) - -After a successful call to the find_package function the following variables -will be set: - -VALA_FOUND - Whether the vala compiler has been found or not - -VALA_EXECUTABLE - Full path to the valac executable if it has been found - -VALA_VERSION - Version number of the available valac - - -Precompiling Vala sources -========================= - -CMake is mainly supposed to handle c or c++ based projects. Luckily every vala -program is translated into plain c code using the vala compiler, followed by -normal compilation of the generated c program using gcc. - -The macro ``vala_precompile`` uses that fact to create c files from your .vala -sources for further CMake processing. - -The first parameter provided is a variable, which will be filled with a list of -c files outputted by the vala compiler. This list can than be used in -conjunction with functions like ``add_executable`` or others to create the -necessary compile rules with CMake. - -The initial variable is followed by a list of .vala files to be compiled. -Please take care to add every vala file belonging to the currently compiled -project or library as Vala will otherwise not be able to resolve all -dependencies. - -The following sections may be specified afterwards to provide certain options -to the vala compiler: - -PACKAGES - A list of vala packages/libraries to be used during the compile cycle. The - package names are exactly the same, as they would be passed to the valac - "--pkg=" option. - -OPTIONS - A list of optional options to be passed to the valac executable. This can be - used to pass "--thread" for example to enable multi-threading support. - -DIRECTORY - Specify the directory where the output source files will be stored. If - ommitted, the source files will be stored in CMAKE_CURRENT_BINARY_DIR. - -CUSTOM_VAPIS - A list of custom vapi files to be included for compilation. This can be - useful to include freshly created vala libraries without having to install - them in the system. - -GENERATE_VAPI - Pass all the needed flags to the compiler to create an internal vapi for - the compiled library. The provided name will be used for this and a - .vapi file will be created. - -GENERATE_HEADER - Let the compiler generate a header file for the compiled code. There will - be a header file as well as an internal header file being generated called - .h and _internal.h - -The following call is a simple example to the vala_precompile macro showing an -example to every of the optional sections:: - - vala_precompile(VALA_C - source1.vala - source2.vala - source3.vala - PACKAGES - gtk+-2.0 - gio-1.0 - posix - OPTIONS - --thread - CUSTOM_VAPIS - some_vapi.vapi - GENERATE_VAPI - myvapi - GENERATE_HEADER - myheader - ) - -Most important is the variable VALA_C which will contain all the generated c -file names after the call. The easiest way to use this information is to tell -CMake to create an executable out of it. - -:: - - add_executable(myexecutable ${VALA_C}) - - -Further reading -=============== - -The `Pdf Presenter Console`__ , which is a vala based project of mine, makes -heavy usage of the here described macros. To look at a real world example of -these macros the mentioned project is the right place to take a look. The svn -trunk of it can be found at:: - - svn://pureenergy.cc/pdf_presenter_console/trunk - - -__ http://westhoffswelt.de/projects/pdf_presenter_console.html - - -Acknowledgments -=============== - -Thanks go out to Florian Sowade, a fellow local PHP-Usergroupie, who helped me -a lot with the initial version of this macros and always answered my mostly -dumb CMake questions. - -.. _CMake: http://cmake.org -.. _Vala: http://live.gnome.org/Vala -.. _Genie: http://live.gnome.org/Genie - - - -.. - Local Variables: - mode: rst - fill-column: 79 - End: - vim: et syn=rst tw=79 diff --git a/cmake/Translations.cmake b/cmake/Translations.cmake deleted file mode 100644 index 4442ff038..000000000 --- a/cmake/Translations.cmake +++ /dev/null @@ -1,79 +0,0 @@ -# Translations.cmake, CMake macros written for Marlin, feel free to re-use them - -macro(add_translations_directory NLS_PACKAGE) - add_custom_target (i18n ALL COMMENT “Building i18n messages.”) - find_program (MSGFMT_EXECUTABLE msgfmt) - # be sure that all languages are present - set (LANGUAGES_NEEDED af am ar ast az be bg bn bs ca ckb cs da de el en_AU en_CA en_GB eo es et eu fa fi fr fr_CA gl he hi hr hu hy id it ja ka ko ky lb lo lt lv ml mr ms nb nl nn pl pt pt_BR ro ru rue si sk sl sma sq sr sv sw ta te th tr uk vi zh_CN zh_HK zh_TW) - foreach (LANGUAGE_NEEDED ${LANGUAGES_NEEDED}) - if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LANGUAGE_NEEDED}.po) - file (APPEND ${CMAKE_CURRENT_SOURCE_DIR}/${LANGUAGE_NEEDED}.po "msgid \"\"\n") - file (APPEND ${CMAKE_CURRENT_SOURCE_DIR}/${LANGUAGE_NEEDED}.po "msgstr \"\"\n") - file (APPEND ${CMAKE_CURRENT_SOURCE_DIR}/${LANGUAGE_NEEDED}.po "\"MIME-Version: 1.0\\n\"\n") - file (APPEND ${CMAKE_CURRENT_SOURCE_DIR}/${LANGUAGE_NEEDED}.po "\"Content-Type: text/plain; charset=UTF-8\\n\"\n") - endif () - endforeach (LANGUAGE_NEEDED ${LANGUAGES_NEEDED}) - # generate .mo from .po - file (GLOB PO_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.po) - foreach (PO_INPUT ${PO_FILES}) - get_filename_component (PO_INPUT_BASE ${PO_INPUT} NAME_WE) - set (MO_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${PO_INPUT_BASE}.mo) - add_custom_command (TARGET i18n COMMAND ${MSGFMT_EXECUTABLE} -o ${MO_OUTPUT} ${PO_INPUT}) - - install (FILES ${MO_OUTPUT} DESTINATION - share/locale/${PO_INPUT_BASE}/LC_MESSAGES - RENAME ${NLS_PACKAGE}.mo) - endforeach (PO_INPUT ${PO_FILES}) -endmacro(add_translations_directory) - -macro(add_translations_catalog NLS_PACKAGE) - add_custom_target (pot COMMENT “Building translation catalog.”) - find_program (XGETTEXT_EXECUTABLE xgettext) - - set(C_SOURCE "") - set(VALA_SOURCE "") - set(GLADE_SOURCE "") - - foreach(FILES_INPUT ${ARGN}) - set(BASE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${FILES_INPUT}) - - - file (GLOB_RECURSE SOURCE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/ ${BASE_DIRECTORY}/*.c) - foreach(C_FILE ${SOURCE_FILES}) - set(C_SOURCE ${C_SOURCE} ${C_FILE}) - endforeach() - - file (GLOB_RECURSE SOURCE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/ ${BASE_DIRECTORY}/*.vala) - foreach(VALA_C_FILE ${SOURCE_FILES}) - set(VALA_SOURCE ${VALA_SOURCE} ${VALA_C_FILE}) - endforeach() - - file (GLOB_RECURSE SOURCE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/ ${BASE_DIRECTORY}/*.ui) - foreach(GLADE_C_FILE ${SOURCE_FILES}) - set(GLADE_SOURCE ${GLADE_SOURCE} ${GLADE_C_FILE}) - endforeach() - endforeach() - - set(BASE_XGETTEXT_COMMAND - ${XGETTEXT_EXECUTABLE} -d ${NLS_PACKAGE} - -o ${CMAKE_CURRENT_SOURCE_DIR}/${NLS_PACKAGE}.pot - --add-comments="/" --keyword="_" --keyword="N_" --keyword="C_:1c,2" --keyword="NC_:1c,2" --keyword="ngettext:1,2" --keyword="Q_:1g" --from-code=UTF-8) - - - set(CONTINUE_FLAG "") - - IF(NOT "${C_SOURCE}" STREQUAL "") - add_custom_command(TARGET pot WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND ${BASE_XGETTEXT_COMMAND} ${C_SOURCE}) - set(CONTINUE_FLAG "-j") - ENDIF() - - IF(NOT "${VALA_SOURCE}" STREQUAL "") - add_custom_command(TARGET pot WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND ${BASE_XGETTEXT_COMMAND} ${CONTINUE_FLAG} -LC\# ${VALA_SOURCE}) - message(${CMAKE_CURRENT_SOURCE_DIR}) - set(CONTINUE_FLAG "-j") - ENDIF() - - IF(NOT "${GLADE_SOURCE}" STREQUAL "") - add_custom_command (TARGET pot WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND ${BASE_XGETTEXT_COMMAND} ${CONTINUE_FLAG} -LGlade ${GLADE_SOURCE}) - ENDIF() -endmacro() diff --git a/cmake/ValaPrecompile.cmake b/cmake/ValaPrecompile.cmake deleted file mode 100644 index 97aa97cec..000000000 --- a/cmake/ValaPrecompile.cmake +++ /dev/null @@ -1,250 +0,0 @@ -## -# Copyright 2009-2010 Jakob Westhoff. All rights reserved. -# Copyright 2012 elementary. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY JAKOB WESTHOFF ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -# EVENT SHALL JAKOB WESTHOFF OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# The views and conclusions contained in the software and documentation are those -# of the authors and should not be interpreted as representing official policies, -# either expressed or implied, of Jakob Westhoff -## - -include(ParseArguments) -find_package(Vala REQUIRED) - -## -# Compile vala files to their c equivalents for further processing. -# -# The "vala_precompile" macro takes care of calling the valac executable on the -# given source to produce c files which can then be processed further using -# default cmake functions. -# -# The first parameter provided is a variable, which will be filled with a list -# of c files outputted by the vala compiler. This list can than be used in -# conjuction with functions like "add_executable" or others to create the -# neccessary compile rules with CMake. -# -# The initial variable is followed by a list of .vala files to be compiled. -# Please take care to add every vala file belonging to the currently compiled -# project or library as Vala will otherwise not be able to resolve all -# dependencies. -# -# The following sections may be specified afterwards to provide certain options -# to the vala compiler: -# -# PACKAGES -# A list of vala packages/libraries to be used during the compile cycle. The -# package names are exactly the same, as they would be passed to the valac -# "--pkg=" option. -# -# OPTIONS -# A list of optional options to be passed to the valac executable. This can be -# used to pass "--thread" for example to enable multi-threading support. -# -# CUSTOM_VAPIS -# A list of custom vapi files to be included for compilation. This can be -# useful to include freshly created vala libraries without having to install -# them in the system. -# -# GENERATE_VAPI -# Pass all the needed flags to the compiler to create an internal vapi for -# the compiled library. The provided name will be used for this and a -# .vapi file will be created. -# -# GENERATE_HEADER -# Let the compiler generate a header file for the compiled code. There will -# be a header file as well as an internal header file being generated called -# .h and _internal.h -# -# GENERATE_GIR -# Have the compiler generate a GObject-Introspection repository file with -# name: .gir. This can be later used to create a binary typelib -# using the GI compiler. -# -# GENERATE_SYMBOLS -# Output a .symbols file containing all the exported symbols. -# -# The following call is a simple example to the vala_precompile macro showing -# an example to every of the optional sections: -# -# vala_precompile(VALA_C mytargetname -# source1.vala -# source2.vala -# source3.vala -# PACKAGES -# gtk+-2.0 -# gio-1.0 -# posix -# DIRECTORY -# gen -# OPTIONS -# --thread -# CUSTOM_VAPIS -# some_vapi.vapi -# GENERATE_VAPI -# myvapi -# GENERATE_HEADER -# myheader -# GENERATE_GIR -# mygir -# GENERATE_SYMBOLS -# mysymbols -# ) -# -# Most important is the variable VALA_C which will contain all the generated c -# file names after the call. -## - -macro(vala_precompile output target_name) - parse_arguments(ARGS "TARGET;PACKAGES;OPTIONS;DIRECTORY;GENERATE_GIR;GENERATE_SYMBOLS;GENERATE_HEADER;GENERATE_VAPI;CUSTOM_VAPIS" "" ${ARGN}) - - if(ARGS_DIRECTORY) - set(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${ARGS_DIRECTORY}) - else(ARGS_DIRECTORY) - set(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) - endif(ARGS_DIRECTORY) - include_directories(${DIRECTORY}) - set(vala_pkg_opts "") - foreach(pkg ${ARGS_PACKAGES}) - list(APPEND vala_pkg_opts "--pkg=${pkg}") - endforeach(pkg ${ARGS_PACKAGES}) - set(in_files "") - set(out_files "") - set(out_files_display "") - set(${output} "") - - foreach(src ${ARGS_DEFAULT_ARGS}) - string(REGEX MATCH "^/" IS_MATCHED ${src}) - if(${IS_MATCHED} MATCHES "/") - set(src_file_path ${src}) - else() - set(src_file_path ${CMAKE_CURRENT_SOURCE_DIR}/${src}) - endif() - list(APPEND in_files ${src_file_path}) - string(REPLACE ".vala" ".c" src ${src}) - string(REPLACE ".gs" ".c" src ${src}) - if(${IS_MATCHED} MATCHES "/") - get_filename_component(VALA_FILE_NAME ${src} NAME) - set(out_file "${CMAKE_CURRENT_BINARY_DIR}/${VALA_FILE_NAME}") - list(APPEND out_files "${CMAKE_CURRENT_BINARY_DIR}/${VALA_FILE_NAME}") - else() - set(out_file "${DIRECTORY}/${src}") - list(APPEND out_files "${DIRECTORY}/${src}") - endif() - list(APPEND ${output} ${out_file}) - list(APPEND out_files_display "${src}") - endforeach(src ${ARGS_DEFAULT_ARGS}) - - set(custom_vapi_arguments "") - if(ARGS_CUSTOM_VAPIS) - foreach(vapi ${ARGS_CUSTOM_VAPIS}) - if(${vapi} MATCHES ${CMAKE_SOURCE_DIR} OR ${vapi} MATCHES ${CMAKE_BINARY_DIR}) - list(APPEND custom_vapi_arguments ${vapi}) - else (${vapi} MATCHES ${CMAKE_SOURCE_DIR} OR ${vapi} MATCHES ${CMAKE_BINARY_DIR}) - list(APPEND custom_vapi_arguments ${CMAKE_CURRENT_SOURCE_DIR}/${vapi}) - endif(${vapi} MATCHES ${CMAKE_SOURCE_DIR} OR ${vapi} MATCHES ${CMAKE_BINARY_DIR}) - endforeach(vapi ${ARGS_CUSTOM_VAPIS}) - endif(ARGS_CUSTOM_VAPIS) - - set(vapi_arguments "") - if(ARGS_GENERATE_VAPI) - list(APPEND out_files "${DIRECTORY}/${ARGS_GENERATE_VAPI}.vapi") - list(APPEND out_files_display "${ARGS_GENERATE_VAPI}.vapi") - set(vapi_arguments "--library=${ARGS_GENERATE_VAPI}" "--vapi=${ARGS_GENERATE_VAPI}.vapi") - - # Header and internal header is needed to generate internal vapi - if (NOT ARGS_GENERATE_HEADER) - set(ARGS_GENERATE_HEADER ${ARGS_GENERATE_VAPI}) - endif(NOT ARGS_GENERATE_HEADER) - endif(ARGS_GENERATE_VAPI) - - set(header_arguments "") - if(ARGS_GENERATE_HEADER) - list(APPEND out_files "${DIRECTORY}/${ARGS_GENERATE_HEADER}.h") - list(APPEND out_files_display "${ARGS_GENERATE_HEADER}.h") - list(APPEND header_arguments "--header=${ARGS_GENERATE_HEADER}.h") - endif(ARGS_GENERATE_HEADER) - - set(gir_arguments "") - set(gircomp_command "") - if(ARGS_GENERATE_GIR) - list(APPEND out_files "${DIRECTORY}/${ARGS_GENERATE_GIR}.gir") - list(APPEND out_files_display "${ARGS_GENERATE_GIR}.gir") - set(gir_arguments "--gir=${ARGS_GENERATE_GIR}.gir") - - include (FindGirCompiler) - find_package(GirCompiler REQUIRED) - - set(gircomp_command - COMMAND - ${G_IR_COMPILER_EXECUTABLE} - ARGS - "${DIRECTORY}/${ARGS_GENERATE_GIR}.gir" - -o "${DIRECTORY}/${ARGS_GENERATE_GIR}.typelib") - endif(ARGS_GENERATE_GIR) - - set(symbols_arguments "") - if(ARGS_GENERATE_SYMBOLS) - list(APPEND out_files "${DIRECTORY}/${ARGS_GENERATE_SYMBOLS}.symbols") - list(APPEND out_files_display "${ARGS_GENERATE_SYMBOLS}.symbols") - set(symbols_arguments "--symbols=${ARGS_GENERATE_SYMBOLS}.symbols") - endif(ARGS_GENERATE_SYMBOLS) - - # Workaround for a bug that would make valac run twice. This file is written - # after the vala compiler generates C source code. - set(OUTPUT_STAMP ${CMAKE_CURRENT_BINARY_DIR}/${target_name}_valac.stamp) - - add_custom_command( - OUTPUT - ${OUTPUT_STAMP} - COMMAND - ${VALA_EXECUTABLE} - ARGS - "-C" - ${header_arguments} - ${vapi_arguments} - ${gir_arguments} - ${symbols_arguments} - "-b" ${CMAKE_CURRENT_SOURCE_DIR} - "-d" ${DIRECTORY} - ${vala_pkg_opts} - ${ARGS_OPTIONS} - "-g" - #"--save-temps" - ${in_files} - ${custom_vapi_arguments} - COMMAND - touch - ARGS - ${OUTPUT_STAMP} - DEPENDS - ${in_files} - ${ARGS_CUSTOM_VAPIS} - COMMENT - "Generating ${out_files_display}" - ${gircomp_command} - ) - - # This command will be run twice for some reason (pass a non-empty string to COMMENT - # in order to see it). Since valac is not executed from here, this won't be a problem. - add_custom_command(OUTPUT ${out_files} DEPENDS ${OUTPUT_STAMP} COMMENT "") -endmacro(vala_precompile) diff --git a/cmake/ValaVersion.cmake b/cmake/ValaVersion.cmake deleted file mode 100644 index 3fff193f5..000000000 --- a/cmake/ValaVersion.cmake +++ /dev/null @@ -1,96 +0,0 @@ -## -# Copyright 2009-2010 Jakob Westhoff. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY JAKOB WESTHOFF ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -# EVENT SHALL JAKOB WESTHOFF OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# The views and conclusions contained in the software and documentation are those -# of the authors and should not be interpreted as representing official policies, -# either expressed or implied, of Jakob Westhoff -## - -include(ParseArguments) -find_package(Vala REQUIRED) - -## -# Ensure a certain valac version is available -# -# The initial argument is the version to check for -# -# It may be followed by a optional parameter to specifiy a version range. The -# following options are valid: -# -# EXACT -# Vala needs to be available in the exact version given -# -# MINIMUM -# The provided version is the minimum version. Therefore Vala needs to be -# available in the given version or any higher version -# -# MAXIMUM -# The provided version is the maximum. Therefore Vala needs to be available -# in the given version or any version older than this -# -# If no option is specified the version will be treated as a minimal version. -## -macro(ensure_vala_version version) - parse_arguments(ARGS "" "MINIMUM;MAXIMUM;EXACT" ${ARGN}) - set(compare_message "") - set(error_message "") - if(ARGS_MINIMUM) - set(compare_message "a minimum ") - set(error_message "or greater ") - elseif(ARGS_MAXIMUM) - set(compare_message "a maximum ") - set(error_message "or less ") - endif(ARGS_MINIMUM) - - message(STATUS - "checking for ${compare_message}Vala version of ${version}" - ) - - unset(version_accepted) - - # MINIMUM is the default if no option is specified - if(ARGS_EXACT) - if(${VALA_VERSION} VERSION_EQUAL ${version} ) - set(version_accepted TRUE) - endif(${VALA_VERSION} VERSION_EQUAL ${version}) - elseif(ARGS_MAXIMUM) - if(${VALA_VERSION} VERSION_LESS ${version} OR ${VALA_VERSION} VERSION_EQUAL ${version}) - set(version_accepted TRUE) - endif(${VALA_VERSION} VERSION_LESS ${version} OR ${VALA_VERSION} VERSION_EQUAL ${version}) - else(ARGS_MAXIMUM) - if(${VALA_VERSION} VERSION_GREATER ${version} OR ${VALA_VERSION} VERSION_EQUAL ${version}) - set(version_accepted TRUE) - endif(${VALA_VERSION} VERSION_GREATER ${version} OR ${VALA_VERSION} VERSION_EQUAL ${version}) - endif(ARGS_EXACT) - - if (NOT version_accepted) - message(FATAL_ERROR - "Vala version ${version} ${error_message}is required." - ) - endif(NOT version_accepted) - - message(STATUS - " found Vala, version ${VALA_VERSION}" - ) -endmacro(ensure_vala_version) diff --git a/cmake/uninstall.cmake b/cmake/uninstall.cmake deleted file mode 100644 index 2037e3653..000000000 --- a/cmake/uninstall.cmake +++ /dev/null @@ -1,21 +0,0 @@ -if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") - message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") -endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") - -file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) -string(REGEX REPLACE "\n" ";" files "${files}") -foreach(file ${files}) - message(STATUS "Uninstalling $ENV{DESTDIR}${file}") - if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") - exec_program( - "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" - OUTPUT_VARIABLE rm_out - RETURN_VALUE rm_retval - ) - if(NOT "${rm_retval}" STREQUAL 0) - message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}") - endif(NOT "${rm_retval}" STREQUAL 0) - else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") - message(STATUS "File $ENV{DESTDIR}${file} does not exist.") - endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") -endforeach(file) diff --git a/data/ArticleView/article.html b/data/ArticleView/article.html index 7c7e3786e..d8af75dea 100644 --- a/data/ArticleView/article.html +++ b/data/ArticleView/article.html @@ -10,19 +10,18 @@ - -
+ +
- $FEED -

$TITLE

- $AUTHOR + $FEED +

$TITLE

+ $AUTHOR
-
+
$HTML
- diff --git a/data/ArticleView/style.css b/data/ArticleView/style.css index 90b344392..fcb0199b0 100644 --- a/data/ArticleView/style.css +++ b/data/ArticleView/style.css @@ -123,18 +123,17 @@ section { div.pw { width: 90%; - max-width: 1100px; margin: 0 auto; padding: 5% 0; } body { - padding: 3rem; cursor: default; - font-family: 'Droid Sans', 'Open Sans'; - font-weight: 300; - max-width: 1200px; - margin: auto; + font-weight: normal; + max-width: 50em; + margin: auto; + text-rendering: optimizeLegibility; + margin-top: 1rem; } .tlblue { @@ -152,42 +151,52 @@ h3, h4, h5, h6 { - color: #318c34; font-weight: 500; - font-family: 'Open Sans', Arial, sans-serif, sans; text-align: left; line-height: 120%; } +h1 a, +h2 a, +h3 a, +h4 a, +h5 a, +h6 a { + color: #1d1f1c; +} + +h1 { + margin-top: 2rem; + margin-bottom: 1rem; + font-size: 2rem; + font-weight: normal; +} + h2 { margin-top: 2rem; margin-bottom: 1rem; - padding-bottom: 0.75rem; - border-bottom: 2px solid #318c34; - font-size: 2.5rem; - font-weight: 300; + font-size: 1.5rem; + font-weight: normal; } h3 { - font-size: 1.5rem; + font-size: 1.25rem; margin-bottom: 0.5rem; } h4 { - font-size: 1.5rem; + font-size: 1.25rem; margin-bottom: 0.5rem; text-transform: uppercase; - font-weight: 300; + font-weight: normal; } h5 { - color: #000; font-size: 1.2rem; margin-bottom: 0.25rem; } h6 { - color: #000; font-size: 1rem; margin-bottom: 0.25rem; text-transform: uppercase; @@ -243,7 +252,6 @@ a :not(img){ } a { - color: #318c34; text-overflow: ellipsis; } @@ -273,7 +281,7 @@ img { figure { display: inline-block; margin: 2rem auto; - padding: 1rem; + margin: 1rem; border: 1px solid rgba(0, 0, 0, 0.05); } @@ -297,8 +305,7 @@ figure:first-child { } header.post { - padding: 2rem; - background: rgba(0, 0, 0, 0.05); + padding: 1rem 2rem; } div.introtext { @@ -306,8 +313,9 @@ div.introtext { } header.post h1 { - color: #000; font-weight: 600; + margin-top: 0.5rem; + margin-bottom: 0.5rem; } header.post a:link { @@ -326,10 +334,8 @@ header.post span.author { font-size: 0.75rem; } -div.content { - padding: 2rem; - margin-bottom: 3rem; - border: 1px solid rgba(0, 0, 0, 0.05); +div.frcontent { + padding: 1rem 2rem; text-align: justify; font-size: inherit; } @@ -353,8 +359,8 @@ dd:after { blockquote { margin-top: 10px; margin-bottom: 10px; - margin-left: 50px; - padding-left: 15px; + padding-left: 15px; + margin-left: 15px; border-left: 3px solid #ccc; } @@ -377,147 +383,162 @@ b { height: 100%; } +/* Themes with no background boxes need less padding */ +body.theme.default header.post, body.theme.parchment header.post, +body.theme.default div.frcontent, body.theme.parchment div.frcontent +{ + padding-top: 0; + padding-bottom: 0; + margin-bottom: 1rem; + margin-top: 1rem; +} /* DEFAULT THEME*/ -div.theme.default { +body.theme.default { background: white; } +footer, +iframe, +img, +figure { + border: none; +} /* MIDNIGHT THEME -- also default dark */ -div.theme.midnight { +body.theme.midnight { color: rgba(255, 255, 255, 0.6); background: #233540; } -div.theme.midnight pre, -div.theme.midnight pre code, -div.theme.midnight code { +body.theme.midnight pre, +body.theme.midnight pre code, +body.theme.midnight code { background-color: rgba(255, 255, 255, 0.6); color: #233540; } -div.theme.midnight table, -div.theme.midnight th, -div.theme.midnight td { +body.theme.midnight table, +body.theme.midnight th, +body.theme.midnight td { border: 1px solid rgba(255, 255, 255, 0.6); } -div.theme.midnight div.content th, -div.theme.midnight header.post { +body.theme.midnight div.frcontent th, +body.theme.midnight header.post { background: rgba(0, 0, 0, 0.1); } -div.theme.midnight header.post h1 { +body.theme.midnight header.post h1 { color: #fff; } -div.theme.midnight header.post h1 a { +body.theme.midnight header.post h1 a { color: #9BA6AC; } -div.theme.midnight header.post span.source { +body.theme.midnight header.post span.source { color: #2978a6; } -div.theme.midnight header.post span.author { +body.theme.midnight header.post span.author { color: rgba(255, 255, 255, 0.6); } -div.theme.midnight div.content { +body.theme.midnight div.frcontent { border: 1px solid rgba(0, 0, 0, 0.1); } -div.theme.midnight div.content a { +body.theme.midnight div.frcontent a { color: #2978a6; } -div.theme.midnight div.content h1, -div.theme.midnight div.content h2, -div.theme.midnight div.content h3, -div.theme.midnight div.content h4 { +body.theme.midnight div.frcontent h1, +body.theme.midnight div.frcontent h2, +body.theme.midnight div.frcontent h3, +body.theme.midnight div.frcontent h4 { color: #2978a6; } -div.theme.midnight div.content h2 { +body.theme.midnight div.frcontent h2 { border-color: #2978a6; } -div.theme.midnight div.content body, -div.theme.midnight div.content ul, -div.theme.midnight div.content figcaption, -div.theme.midnight div.content h5, -div.theme.midnight div.content h6, -div.theme.midnight div.content p { +body.theme.midnight div.frcontent body, +body.theme.midnight div.frcontent ul, +body.theme.midnight div.frcontent figcaption, +body.theme.midnight div.frcontent h5, +body.theme.midnight div.frcontent h6, +body.theme.midnight div.frcontent p { color: rgba(255, 255, 255, 0.6); text-align: justify; } -div.theme.spring { +body.theme.spring { background: #f8fff2; } -div.theme.spring header.post { +body.theme.spring header.post { background: #ccffa6; } -div.theme.spring header.post h1 { +body.theme.spring header.post h1 { color: #405e80; } -div.theme.spring header.post span.source { +body.theme.spring header.post span.source { color: #405e80; } -div.theme.spring div.content { +body.theme.spring div.frcontent { border: 1px solid #ccffa6; } -div.theme.spring div.content a { +body.theme.spring div.frcontent a { color: #405e80; } -div.theme.spring div.content h1, -div.theme.spring div.content h2, -div.theme.spring div.content h3, -div.theme.spring div.content h4 { +body.theme.spring div.frcontent h1, +body.theme.spring div.frcontent h2, +body.theme.spring div.frcontent h3, +body.theme.spring div.frcontent h4 { color: #405e80; } -div.theme.spring div.content h2 { +body.theme.spring div.frcontent h2 { border-color: #405e80; } -div.theme.parchment { +body.theme.parchment { background: #faf2e1; } -div.theme.parchment header.post h1 { +body.theme.parchment header.post h1 { color: #99400f; } -div.theme.parchment div.content a { +body.theme.parchment div.frcontent a { color: #99400f; } -div.theme.parchment div.content h1, -div.theme.parchment div.content h2, -div.theme.parchment div.content h3, -div.theme.parchment div.content h4 { +body.theme.parchment div.frcontent h1, +body.theme.parchment div.frcontent h2, +body.theme.parchment div.frcontent h3, +body.theme.parchment div.frcontent h4 { color: #99400f; } -div.theme.parchment div.content h2 { +body.theme.parchment div.frcontent h2 { border-color: #99400f; } -div.theme.parchment div.content body, -div.theme.parchment div.content ul, -div.theme.parchment div.content figcaption, -div.theme.parchment div.content h5, -div.theme.parchment div.content h6, -div.theme.parchment div.content p { +body.theme.parchment div.frcontent body, +body.theme.parchment div.frcontent ul, +body.theme.parchment div.frcontent figcaption, +body.theme.parchment div.frcontent h5, +body.theme.parchment div.frcontent h6, +body.theme.parchment div.frcontent p { color: rgba(0, 0, 0, 0.8); } diff --git a/data/GrabberConfig b/data/GrabberConfig new file mode 160000 index 000000000..563925676 --- /dev/null +++ b/data/GrabberConfig @@ -0,0 +1 @@ +Subproject commit 563925676d110a51197025aad8ddcac14d18e36a diff --git a/data/GrabberConfig/.about.com.txt b/data/GrabberConfig/.about.com.txt deleted file mode 100644 index 3953d3e5a..000000000 --- a/data/GrabberConfig/.about.com.txt +++ /dev/null @@ -1,3 +0,0 @@ -title: //*[@id='title']//h1 -body: //*[(@id = "articlebody")] -test_url: http://nutrition.about.com/od/changeyourdiet/qt/healthysnacks.htm \ No newline at end of file diff --git a/data/GrabberConfig/.allthingsd.com.txt b/data/GrabberConfig/.allthingsd.com.txt deleted file mode 100644 index ec89c0da9..000000000 --- a/data/GrabberConfig/.allthingsd.com.txt +++ /dev/null @@ -1,6 +0,0 @@ -body: //div[@id='content-left']/div[@class='post'] -strip_id_or_class: social -strip_id_or_class: atd-disqus-disclaimer -tidy: no - -test_url: http://mediamemo.allthingsd.com/20110516/bit-ly-gets-a-new-boss/ \ No newline at end of file diff --git a/data/GrabberConfig/.blog.163.com.txt b/data/GrabberConfig/.blog.163.com.txt deleted file mode 100644 index 2372e1225..000000000 --- a/data/GrabberConfig/.blog.163.com.txt +++ /dev/null @@ -1,26 +0,0 @@ -# To administrator: -# Please replace the hostname with "*.blog.163.com" - -# This filter is tested on: -# http://wangzeke.blog.163.com/blog/static/933015402012410105922228/ -# http://wavow.blog.163.com/blog/static/532284320124117211245/ -# http://elainejeff.blog.163.com/blog/static/1671902912012498727253/ - - -strip://*[contains(@class, 'mcnt ztag')]//span[@style = 'display:none;'] -strip://*[contains(@id, 'divTopLink')] -strip://*[contains(@class, 'phide')] -strip://*[contains(@class, 'thide')] -strip://*[contains(@id, 'topbar')] -strip://*[contains(@class, 'tbar')] -strip://*[contains(@class, 'snl')] -strip://*[contains(@id, 'banner')] - - -title://h3 -author://span[contains(@class, 'ztag pre')] -date://span[contains(@class, 'blogsep')] -body://div[contains(@class, 'mcnt ztag')] - -convert_double_br_tags: yes -test_url: http://lvqiuluwei1510.blog.163.com/blog/static/9028525120124146100841/ \ No newline at end of file diff --git a/data/GrabberConfig/.blogs.nytimes.com.txt b/data/GrabberConfig/.blogs.nytimes.com.txt deleted file mode 100644 index 6517463e6..000000000 --- a/data/GrabberConfig/.blogs.nytimes.com.txt +++ /dev/null @@ -1,17 +0,0 @@ -body: //div[@class='entry-content'] -title: //h1[@class='entry-title'] -# Two author lines because krugman.blogs.nytimes.com is a special case -author: substring-after(//div[@class="box module nocontent"]/h4, "About ") -author: //address/a -date: //meta[@name="PUD"]/@content -date: //*[@class='date'] - -#Removes related content but cleans up article text -strip: //ul[@class='toolsList wrap'] -strip_id_or_class:inlineModule -strip_id_or_class:module -strip_id_or_class:toolsListContainer -prune: no -test_url: http://opinionator.blogs.nytimes.com/2011/02/03/lost-and-gone-forever/ -test_url: http://krugman.blogs.nytimes.com/2012/09/12/a-vote-of-confidence/ -test_url: http://bits.blogs.nytimes.com/2012/01/16/wikipedia-plans-to-go-dark-on-wednesday-to-protest-sopa/ \ No newline at end of file diff --git a/data/GrabberConfig/.blogspot.com.txt b/data/GrabberConfig/.blogspot.com.txt deleted file mode 100644 index d04b76838..000000000 --- a/data/GrabberConfig/.blogspot.com.txt +++ /dev/null @@ -1,11 +0,0 @@ -date: //*[contains(@class, 'date-header')] -title://*[contains(@class,'post-title')] -body://div[contains(@class,'post-body')] -body://div[contains(@class,'entry-content')] -strip_comments:no -prune:no - -tidy:yes - -test_url: http://themerryone.blogspot.com/2010/08/new-move-new-blog.html -test_url: http://strobist.blogspot.com/2012/01/qa-down-phase-one-rabbit-hole.html \ No newline at end of file diff --git a/data/GrabberConfig/.businessinsider.com.txt b/data/GrabberConfig/.businessinsider.com.txt deleted file mode 100644 index 43aede216..000000000 --- a/data/GrabberConfig/.businessinsider.com.txt +++ /dev/null @@ -1,9 +0,0 @@ -title://div[@class="sl-layout-post"]/h1 -body: //div[contains(@class, 'post-content') or contains(@class, 'KonaBody')] -strip: //div[contains(@class, "post-sidebar")] -strip: //div[@id='related-links'] -author://div[@class="byline"]/a -date://div[@class="byline"]/span[@class="date"] -prune: no - -test_url: http://www.businessinsider.com/as-europe-booms-on-bailout-deal-john-boehner-just-confirmed-that-the-us-is-nowhere-2011-7 \ No newline at end of file diff --git a/data/GrabberConfig/.calepin.co.txt b/data/GrabberConfig/.calepin.co.txt deleted file mode 100644 index 6b3d0107b..000000000 --- a/data/GrabberConfig/.calepin.co.txt +++ /dev/null @@ -1,5 +0,0 @@ -author: //address/a -date: //article/abbr/@title - -# Please consider *.calepin.co -test_url: http://jokull.calepin.co/nutrition-pt-1.html \ No newline at end of file diff --git a/data/GrabberConfig/.chicagotribune.com.txt b/data/GrabberConfig/.chicagotribune.com.txt deleted file mode 100644 index 55a9ed2ff..000000000 --- a/data/GrabberConfig/.chicagotribune.com.txt +++ /dev/null @@ -1,8 +0,0 @@ -date: //span[@class='pubdate'] -author: //div[@id='mod-article-byline']/span[3] -body: //div[@id='area-article-first-block'] | //div[@id='mod-a-body-after-first-para'] -strip_id_or_class: byline - -strip: //div[@id='mod-article-byline'] - -test_url: http://www.chicagotribune.com/classified/automotive/used/chi-auto-refinance-pros-cons-20130513,0,4116070.story diff --git a/data/GrabberConfig/.cnet.com.txt b/data/GrabberConfig/.cnet.com.txt deleted file mode 100644 index eac08aaa0..000000000 --- a/data/GrabberConfig/.cnet.com.txt +++ /dev/null @@ -1,16 +0,0 @@ -title: //meta[@property="og:title"]/@content -body: //div[contains(@class, 'postBody')] -date: //div[@id='nameAndTime']/time -author: //div[@id='nameAndTime']/span[@class='author'] - -strip_id_or_class: image-credit -strip_id_or_class: noAutolink -strip_id_or_class: related - -prune: no -tidy: no - -# early end -replace_string(Download today's podcast): Download today's podcast
- -test_url: http://www.cnet.com/8301-13952_1-57367607-81/the-404-981-where-the-world-is-a-vampire-podcast/ \ No newline at end of file diff --git a/data/GrabberConfig/.craigslist.org.txt b/data/GrabberConfig/.craigslist.org.txt deleted file mode 100644 index a39aa35ef..000000000 --- a/data/GrabberConfig/.craigslist.org.txt +++ /dev/null @@ -1,8 +0,0 @@ -title: //h2[@class='postingtitle'] -date: //p[@class='postinginfo']/date - -body: //figure[@class='iw'] | //section[@class='cltags' or @id='postingbody'] -prune: no -tidy: no - -test_url: http://sfbay.craigslist.org/hhh/index.rss \ No newline at end of file diff --git a/data/GrabberConfig/.ctv.ca.txt b/data/GrabberConfig/.ctv.ca.txt deleted file mode 100644 index e12fc65a8..000000000 --- a/data/GrabberConfig/.ctv.ca.txt +++ /dev/null @@ -1,8 +0,0 @@ -title: //h3[@class='jhl'] -body: //div[@class='storyBody'] -strip: //p[contains(., 'Please Add Comments')]//following-sibling::* -strip: //p[contains(., 'Please Add Comments')] -strip: //p[em[contains(., 'This story has been updated from its original version')]] -strip: //hr - -test_url: http://montreal.ctv.ca/servlet/an/local/CTVNews/20110914/mtl_construction_110914/20110915?hub=MontrealHome \ No newline at end of file diff --git a/data/GrabberConfig/.dreamwidth.org.txt b/data/GrabberConfig/.dreamwidth.org.txt deleted file mode 100644 index 726e30d69..000000000 --- a/data/GrabberConfig/.dreamwidth.org.txt +++ /dev/null @@ -1,7 +0,0 @@ -# Please convert this to *.dreamwidth.org, as users receive individual subdomains. -convert_double_br_tags: yes -strip_image_src: 'dreamwidth.org' -strip_id_or_class: 'currents' -title: //div[contains(@id, 'entrysubj')] -body: //div[contains(@class, 'usercontent')] -test_url: http://dw-news.dreamwidth.org/28922.html \ No newline at end of file diff --git a/data/GrabberConfig/.dxy.cn.txt b/data/GrabberConfig/.dxy.cn.txt deleted file mode 100644 index d567b66f8..000000000 --- a/data/GrabberConfig/.dxy.cn.txt +++ /dev/null @@ -1,4 +0,0 @@ -body: //div[@id='content'] -prune: no - -test_url: http://neurosurg.dxy.cn/article/87224 \ No newline at end of file diff --git a/data/GrabberConfig/.elpais.com.txt b/data/GrabberConfig/.elpais.com.txt deleted file mode 100644 index 0e7eebc38..000000000 --- a/data/GrabberConfig/.elpais.com.txt +++ /dev/null @@ -1,13 +0,0 @@ -title: //meta[@name='DC.title']/@content -date: //meta[@name='DC.date']/@content -body: //div[@class='columna_texto'] -body: //div[@id='cuerpo_noticia'] -prune: no - -strip_id_or_class: disposicion_vertical -strip_id_or_class: ampliar_foto - -strip: //div[starts-with(@id, 'sumario') and contains(., 'más información')] - -test_url: http://economia.elpais.com/economia/2012/02/07/actualidad/1328611790_342868.html -test_url: http://internacional.elpais.com/internacional/2012/02/07/actualidad/1328602145_448315.html \ No newline at end of file diff --git a/data/GrabberConfig/.etc.se.txt b/data/GrabberConfig/.etc.se.txt deleted file mode 100644 index e2cb033c6..000000000 --- a/data/GrabberConfig/.etc.se.txt +++ /dev/null @@ -1,9 +0,0 @@ -body: //div[contains(@class, '-body-')] -date: //meta[@name='dcterms.date']/@content -author: //meta[@name='dcterms.creator']/@content - -test_url: http://stockholm.etc.se/debatt/jobbgaraget-gav-hopp-ungdomar-i-tensta -test_contains: Jobbgaraget startades av Angeles - -test_url: http://goteborg.etc.se/inrikes/snart-oppnar-stans-forsta-ekogalleria -test_contains: Krasnapolsky och just nu diff --git a/data/GrabberConfig/.ew.com.txt b/data/GrabberConfig/.ew.com.txt deleted file mode 100644 index c4b886f0d..000000000 --- a/data/GrabberConfig/.ew.com.txt +++ /dev/null @@ -1,14 +0,0 @@ -next_page_link: //span[@class='paging-next']/a[contains(., 'NEXT')] -strip_id_or_class: article-paging -strip_id_or_class: eyebrow -strip_id_or_class: underbar -strip_id_or_class: extras -strip_id_or_class: share -strip_id_or_class: recap-links -strip_id_or_class: tvr-author -strip_id_or_class: pub-date -strip_id_or_class: post-title - -title: //h1[@class='post-title'] - -test_url: http://tvrecaps.ew.com/recap/fringe-season-4-episode-2/ \ No newline at end of file diff --git a/data/GrabberConfig/.finance.yahoo.com.txt b/data/GrabberConfig/.finance.yahoo.com.txt deleted file mode 100644 index a10b86cd3..000000000 --- a/data/GrabberConfig/.finance.yahoo.com.txt +++ /dev/null @@ -1,12 +0,0 @@ -title: //meta[@property='og:title']/@content -body: //div[@id='y-article-bd'] -body: //div[contains(@class, 'yom-art-content')] -strip: //div[contains(@class, 'related-companies')] -strip: //div[@id='y-article-related'] -strip: //div[@id='ypf-article-related'] -prune: no - -single_page_link: //div[@class='ft']//a[contains(@href, 'page=all')] - -test_url: https://sg.finance.yahoo.com/news/former-xstrata-bosss-venture-raises-095622450.html -test_contains: The former boss of mining company Xstrata diff --git a/data/GrabberConfig/.fivefilters.org.txt b/data/GrabberConfig/.fivefilters.org.txt deleted file mode 100644 index dc1db432f..000000000 --- a/data/GrabberConfig/.fivefilters.org.txt +++ /dev/null @@ -1 +0,0 @@ -prune: no \ No newline at end of file diff --git a/data/GrabberConfig/.fok.nl.txt b/data/GrabberConfig/.fok.nl.txt deleted file mode 100644 index e6ad7d52e..000000000 --- a/data/GrabberConfig/.fok.nl.txt +++ /dev/null @@ -1,13 +0,0 @@ -title: //h1[@class='title'] -body: //div[@id='itemBody'] - -strip_id_or_class: itemFooter - -replace_string(90%;">Lees ook): 0%;">
- -tidy: no -prune: no - -http_header(user-agent): Googlebot/2.1 - -test_url: http://sport.fok.nl/nieuws/548725/1/1/50/rosicky-traint-weer-mee-bij-tsjechie.html \ No newline at end of file diff --git a/data/GrabberConfig/.hardware.info.txt b/data/GrabberConfig/.hardware.info.txt deleted file mode 100644 index 82c33790b..000000000 --- a/data/GrabberConfig/.hardware.info.txt +++ /dev/null @@ -1,6 +0,0 @@ -title: //h1[@itemprop='headline'] -author: //span[@itemprop='author'] -body: //article[@itemprop='articleBody'] -date: //span[@itemprop='datePublished']/@content - -test_url: http://be.hardware.info/reviews/6197/game-pcs-van-0-25-en-5-jaar-oud-review-tijd-om-te-upgraden diff --git a/data/GrabberConfig/.ibm.com.txt b/data/GrabberConfig/.ibm.com.txt deleted file mode 100644 index 2e0a6832b..000000000 --- a/data/GrabberConfig/.ibm.com.txt +++ /dev/null @@ -1,11 +0,0 @@ -# this config useful for the jive forum part of the ibm site. would probably work on any like jive forum -# suggest URL path filter of "*.ibm.com/developerworks/forums/*" -title://h1 -body://div[@id='jive-message-holder'] -strip_id_or_class:jive-first -strip_id_or_class:jive-buttons -strip_id_or_class:jive-description -strip_id_or_class:jive-rating-buttons -strip_id_or_class:jive-message-list-footer - -test_url: http://www.ibm.com/developerworks/forums/thread.jspa?messageID=14547837&tstart=0#14547837 diff --git a/data/GrabberConfig/.ifeng.com.txt b/data/GrabberConfig/.ifeng.com.txt deleted file mode 100644 index f8b7993b0..000000000 --- a/data/GrabberConfig/.ifeng.com.txt +++ /dev/null @@ -1,14 +0,0 @@ -# Please change host to *.ifeng.com -# same config works well on other subdomains -# tested on following links -# http://phtv.ifeng.com/program/qqsrx/detail_2012_11/28/19613849_0.shtml -# http://finance.ifeng.com/news/corporate/20121128/7359279.shtml - -tidy:no - -title://h1[contains(@id,'artical_topic')] - -body://div[contains(@id,'artical_real')] - -next_page_link://*[contains(@id,'pagenext')] -test_url: http://news.ifeng.com/history/zhongguojindaishi/detail_2012_04/01/13605159_0.shtml \ No newline at end of file diff --git a/data/GrabberConfig/.livejournal.com.txt b/data/GrabberConfig/.livejournal.com.txt deleted file mode 100644 index 551ace47d..000000000 --- a/data/GrabberConfig/.livejournal.com.txt +++ /dev/null @@ -1,6 +0,0 @@ -title: //title -strip_image_src: 'l-stat.livejournal.com' -strip_image_src: 'www.livejournal.com' -strip_image_src: 'l-userpic.livejournal.com' -test_url: http://news.livejournal.com/136664.html -test_url: http://stelazin.livejournal.com/91363.html \ No newline at end of file diff --git a/data/GrabberConfig/.m.wikihow.com.txt b/data/GrabberConfig/.m.wikihow.com.txt deleted file mode 100644 index 5be49fe11..000000000 --- a/data/GrabberConfig/.m.wikihow.com.txt +++ /dev/null @@ -1,17 +0,0 @@ -# ...&printable=yes -body: //div[@id='bodycontents'] -# m.wikihow.com/... -body: //div[@id='article'] -prune: no -tidy: no -strip_id_or_class: gatEditSection -strip_id_or_class: relatedwikihows -#strip: //div[contains(@class, 'step_num')] - -replace_string(): - -single_page_link: //a[@id='gatPrintView'] -single_page_link: concat(//link[@rel='canonical']/@href, '?printable=yes') - -test_url: http://pt.wikihow.com/Criar-um-Script-de-Login-Seguro-em-PHP-e-MySQL -test_url: http://m.wikihow.com/Check-out-a-Used-Car-Before-Buying-It \ No newline at end of file diff --git a/data/GrabberConfig/.wikimedia.org.txt b/data/GrabberConfig/.wikimedia.org.txt deleted file mode 100644 index ff990c2c2..000000000 --- a/data/GrabberConfig/.wikimedia.org.txt +++ /dev/null @@ -1,12 +0,0 @@ -title: //h1[@id='firstHeading'] -body: //div[@id = 'bodyContent'] -strip_id_or_class: editsection -strip_id_or_class: toc -strip_id_or_class: vertical-navbox -strip: //div[@id='catlinks'] -strip: //div[@id='jump-to-nav'] -strip: //div[@class='thumbcaption']//div[@class='magnify'] -strip: //table[@class='navbox'] -prune: no -tidy: no -test_url: https://secure.wikimedia.org/wikipedia/en/wiki/Christopher_Lloyd \ No newline at end of file diff --git a/data/GrabberConfig/.wikipedia.org.txt b/data/GrabberConfig/.wikipedia.org.txt deleted file mode 100644 index 1da400bc5..000000000 --- a/data/GrabberConfig/.wikipedia.org.txt +++ /dev/null @@ -1,24 +0,0 @@ -title: //h1[@id='firstHeading'] -body: //div[@id = 'bodyContent'] -strip_id_or_class: editsection -#strip_id_or_class: toc -strip_id_or_class: vertical-navbox -strip: //*[@id='toc'] -strip: //div[@id='catlinks'] -strip: //div[@id='jump-to-nav'] -strip: //div[@class='thumbcaption']//div[@class='magnify'] -strip: //table[@class='navbox'] -#strip: //table[contains(@class, 'infobox')] -strip: //div[@class='dablink'] -strip: //div[@id='contentSub'] -strip: //table[contains(@class, 'metadata')] -strip: //*[contains(@class, 'noprint')] -strip: //span[@class='noexcerpt'] - -http_header(user-agent): Mozilla/5.2 - -prune: no -tidy: no -test_url: http://en.wikipedia.org/wiki/Christopher_Lloyd -test_url: https://en.wikipedia.org/wiki/Ronnie_James_Dio -test_url: https://en.wikipedia.org/wiki/Metallica \ No newline at end of file diff --git a/data/GrabberConfig/.wordpress.com.txt b/data/GrabberConfig/.wordpress.com.txt deleted file mode 100644 index 18fd36233..000000000 --- a/data/GrabberConfig/.wordpress.com.txt +++ /dev/null @@ -1,27 +0,0 @@ -# try to target content block within div#content -body: //div[@id="content"]//div[contains(@class, 'entry-content') or contains(@class, 'entrytext') or @class='main' or @class='entry'] -# if that fails, get div#content -body: //div[@id='content'] -title: //meta[@property='og:title']/@content - -date: //div[@id='content']//span[contains(@class, 'entry-date')] -date: //div[contains(@class, 'entry-meta')]//time[@pubdate or @pubDate] -author: //div[contains(@class, 'entry-meta')]//a[@rel='author'] - -prune: no - -strip: //nav -strip: //header -strip: //*[@id='comments' or @id='respond'] -strip: //div[contains(@class, 'comments')] -strip_id_or_class: sharedaddy -strip_id_or_class: wpadvert -strip_id_or_class: commentlist -strip_id_or_class: sociable -strip_id_or_class: related_post -strip_id_or_class: wp-socializer -strip_id_or_class: addtoany -strip: //div[contains(@class, 'navigation')] -#strip: //iframe - -test_url: https://elisehahn.wordpress.com/2013/09/22/looking-back-to-move-forward-navigating-race-and-racism-in-neoliberal-terrain/ diff --git a/data/GrabberConfig/20min.ch.txt b/data/GrabberConfig/20min.ch.txt deleted file mode 100644 index cd8e3fc02..000000000 --- a/data/GrabberConfig/20min.ch.txt +++ /dev/null @@ -1,24 +0,0 @@ -# Author: cirnod@gmail.com - -tidy: no -prune: no - -title: //h1 -date: /html/body/div[3]/div[1]/div[6]/div/div[1]/div[2]/div[1]/div/p -body: //div[@class='published clearfix'] | //div[@class='story_titles']/h3 | //div[@class='story_text'] - -# General Cleanup -strip_id_or_class: info_panel -strip_id_or_class: info_poll -strip_id_or_class: teaser -strip_id_or_class: panelbox -strip_id_or_class: polls -strip_id_or_class: warning -strip_id_or_class: vplaceholder - -# visual removal only -> complete removal doesn't work -replace_string(Print): - -# Try yourself -test_url: http://www.20min.ch/wissen/news/story/31588952 -test_url: http://www.20min.ch/digital/dossier/apple/story/So-einfach-laesst-sich-das-iPhone-6-Plus-verbiegen-24651169 diff --git a/data/GrabberConfig/24.ae.txt b/data/GrabberConfig/24.ae.txt deleted file mode 100644 index 6e5150765..000000000 --- a/data/GrabberConfig/24.ae.txt +++ /dev/null @@ -1,8 +0,0 @@ -title: //div[@id='DivTitle'] -body: //div[@id='divImages' or @id='Divkhabarcontent'] -author: //div[@id='DivAuthor'] - -prune: no - -test_url: http://24.ae/article.aspx?ArticleId=123304 -test_url: http://24.ae/rss.aspx?pageId=30 diff --git a/data/GrabberConfig/24ways.org.txt b/data/GrabberConfig/24ways.org.txt deleted file mode 100644 index 86c9e077d..000000000 --- a/data/GrabberConfig/24ways.org.txt +++ /dev/null @@ -1,6 +0,0 @@ -title: //div[@class='meta']/h2/a -author: //div[@class='meta']/h2/following-sibling::p/a/text() -date://div[@class='meta']/h2/strong -body: //div[@id='article'] -strip: //div[@class='domore'] -test_url: http://24ways.org/2011/composing-the-new-canon \ No newline at end of file diff --git a/data/GrabberConfig/36kr.com.txt b/data/GrabberConfig/36kr.com.txt deleted file mode 100644 index d73d7de51..000000000 --- a/data/GrabberConfig/36kr.com.txt +++ /dev/null @@ -1,8 +0,0 @@ -title: //h1[contains(@class, 'entry-title')] -date: //meta[@name='weibo: article:create_at']/@content -body: //div[contains(@class, 'mainContent')] -strip_id_or_class: related_topics - -prune: no - -test_url: http://www.36kr.com/p/207879.html \ No newline at end of file diff --git a/data/GrabberConfig/37signals.com.txt b/data/GrabberConfig/37signals.com.txt deleted file mode 100644 index 531cac1ee..000000000 --- a/data/GrabberConfig/37signals.com.txt +++ /dev/null @@ -1,6 +0,0 @@ -title: //div[@class='post_header']//h2/a -author: //span[@class='author'] -date: //span[@class='date'] -body: //div[@id='Content'] - -test_url: http://37signals.com/svn/posts/2785-the-end-of-the-it-department \ No newline at end of file diff --git a/data/GrabberConfig/3quarksdaily.com.txt b/data/GrabberConfig/3quarksdaily.com.txt deleted file mode 100644 index 80a3958f9..000000000 --- a/data/GrabberConfig/3quarksdaily.com.txt +++ /dev/null @@ -1,9 +0,0 @@ -body: //div[@class='content'] -date: //div[@class='content']/h2 -strip: //div[@class='content']/h2 -title: //div[@class='content']/h3 - -strip: //div[@id='postmenu'] -strip: //div[@class='trackback'] -tidy: no -test_url: http://www.3quarksdaily.com/3quarksdaily/2012/01/martin-luther-king-i-have-a-dream.html \ No newline at end of file diff --git a/data/GrabberConfig/3voor12.vpro.nl.txt b/data/GrabberConfig/3voor12.vpro.nl.txt deleted file mode 100644 index b846b050c..000000000 --- a/data/GrabberConfig/3voor12.vpro.nl.txt +++ /dev/null @@ -1,11 +0,0 @@ -body: //div[@id='main'] -title: //div[@class='intro']/h1 -author: //ul[@class='text-data']/li[@class='author'] -date: //ul[@class='text-data']/li[@class='date'] -convert_double_br_tags: yes -tidy: no - -strip: //div[@class='share'] -strip: //*[@class='zoom'] -strip: //div[@id='disqus_thread'] -test_url: http://3voor12.vpro.nl/nieuws/2012/januari/Ook-website-GroenLinks-woensdag-op-zwart-i-v-m--SOPA.html \ No newline at end of file diff --git a/data/GrabberConfig/43folders.com.txt b/data/GrabberConfig/43folders.com.txt deleted file mode 100644 index 3777c66fd..000000000 --- a/data/GrabberConfig/43folders.com.txt +++ /dev/null @@ -1,4 +0,0 @@ -body: //*[@class = 'content'] -author: //*[@class = 'submitted']/a -date: substring-after(//*[@class = 'submitted']/text(), '|') -test_url: http://www.43folders.com/2011/04/22/cranking \ No newline at end of file diff --git a/data/GrabberConfig/500px.com.txt b/data/GrabberConfig/500px.com.txt deleted file mode 100644 index b9b7e9ddf..000000000 --- a/data/GrabberConfig/500px.com.txt +++ /dev/null @@ -1,27 +0,0 @@ -# very loose setup for both 500px.com/photo/* and 500px.com/blog/* -# photo page example: http://500px.com/photo/4181666 -# blog page example: http://500px.com/blog/110 - -# avoid "no text" error -tidy:no -prune:no - -# reorganize photo page elements -#body://div[contains(@class,'container')] -move_into(body)://div[contains(@id,'thephoto')] -move_into(body)://div[contains(@id,'description')] -move_into(body)://div[contains(@id,'tags')] -move_into(body)://div[contains(@id,'photo-info')] - -# clean photo page info -strip://span[contains(@id,'copyright')] -strip://*[contains(@id,'store')] -strip://*[contains(@id,'user-info')] -strip://*[contains(@id,'photo-stats')] -strip://*[contains(@id,'voting_controls_container')] -strip://*[contains(@id,'more-photos')] -strip://*[contains(@id,'embed-photo')] - -# clean blog page side bar -strip://*[contains(@class,'col d3 clearafter')] -test_url: http://500px.com/photo/3641041?from=editors \ No newline at end of file diff --git a/data/GrabberConfig/512pixels.net.txt b/data/GrabberConfig/512pixels.net.txt deleted file mode 100644 index 02a996f79..000000000 --- a/data/GrabberConfig/512pixels.net.txt +++ /dev/null @@ -1,2 +0,0 @@ -title: //meta[@property='og:title']/@content -test_url: http://www.512pixels.net/blog/2014/10/the-move diff --git a/data/GrabberConfig/5by5.tv.txt b/data/GrabberConfig/5by5.tv.txt deleted file mode 100644 index 59b70a991..000000000 --- a/data/GrabberConfig/5by5.tv.txt +++ /dev/null @@ -1,9 +0,0 @@ -body: //*[@id="episode"] -prune: no -tidy: no - -autodetect_next_page: no -strip_id_or_class: player - -strip://*[@id="header"] -test_url: http://5by5.tv/buildanalyze/60 \ No newline at end of file diff --git a/data/GrabberConfig/7newsbelize.com.txt b/data/GrabberConfig/7newsbelize.com.txt deleted file mode 100644 index 46d09f8e7..000000000 --- a/data/GrabberConfig/7newsbelize.com.txt +++ /dev/null @@ -1,7 +0,0 @@ -title: //*[@id='sstitle'] -body: //div[@id='sstory'] -strip_id_or_class: newsoptions -prune: no - -test_url: http://www.7newsbelize.com/sstory.php?nid=25654 -test_url: http://www.7newsbelize.com/7news.xml \ No newline at end of file diff --git a/data/GrabberConfig/9gag.com.txt b/data/GrabberConfig/9gag.com.txt deleted file mode 100644 index 4ebb62ad4..000000000 --- a/data/GrabberConfig/9gag.com.txt +++ /dev/null @@ -1,6 +0,0 @@ -# Generated by FiveFilters.org's web-based selection tool -# Place this file inside your site_config/custom/ folder -# Source: http://siteconfig.fivefilters.org/grab.php?url=http%3A%2F%2F9gag.com%2Fgag%2FaDwQnO7 - -body: //div[contains(concat(' ',normalize-space(@class),' '),' badge-post-container ')] -test_url: http://9gag.com/gag/aDwQnO7 diff --git a/data/GrabberConfig/README.md b/data/GrabberConfig/README.md deleted file mode 100644 index ab5b12d9c..000000000 --- a/data/GrabberConfig/README.md +++ /dev/null @@ -1,40 +0,0 @@ -Full-Text RSS site config files -================ - -[Full-Text RSS](http://fivefilters.org/content-only/), our article extraction tool, makes use of site-specific extraction rules to improve results. Each time a URL is processed, it checks to see if there are extraction rules for the site being processed. If there are no rules are found, it tries to detect the content block automatically. - -This repository contains the site-specific extraction rules we rely on in Full-Text RSS. - -### Contributing changes - -We run automated tests on these files to detect issues. If you'd like to help keep these up to date, please look at the [test results](http://siteconfig.fivefilters.org/test/) and see which files you'd like to contribute fixes for. - -We chose GitHub for this set of files because they offer one feature which we hope will make contributing changes easier: [file editing](https://github.com/blog/844-forking-with-the-edit-button) through the web interface. - -You can now make changes to any of our site config files and request that your changes be pulled into the main set we maintain. This is what GitHub calls the Fork and Pull model: - -> The Fork & Pull Model lets anyone fork an existing repository and push changes to their personal fork without requiring access be granted to the source repository. The changes must then be pulled into the source repository by the project maintainer. This model reduces the amount of friction for new contributors and is popular with open source projects because it allows people to work independently without upfront coordination. - -When we receive a pull request we'll review the changes and if everything's okay we'll update our copy. - -If a site is not in our set, you can create a file for it in the same way. See [Creating files on GitHub](https://github.com/blog/1327-creating-files-on-github). - -### How to write a site config file - -The quickest and simplest way is to use our [point-and-click interface](http://siteconfig.fivefilters.org). It's a simple tool only intended to create a rule to extract the correct content block. - -For further refinements, e.g. selecting the title, stripping elements, dealing with multi-page articles, please see our [help page](http://help.fivefilters.org/customer/portal/articles/223153-site-patterns). - -### Instapaper - -When we introduced site patterns, we chose to adopt the [same format](http://blog.instapaper.com/post/730281947) used by Instapaper. This allows us to make use of the existing extraction rules contributed by Instapaper users. - -Marco, Instapaper's creator, graciously opened up the database of contributions to everyone: - -> And, recognizing that your efforts could be useful to a wide range of other tools and services, I'll make the list of all of these site-specific configurations available to the public, free, with no strings attached. - -Most of the extraction rules in our set are borrowed from Instapaper. You can see the list maintained by Instapaper at [instapaper.com/bodytext/](http://instapaper.com/bodytext/) (no longer available since Instapaper was sold). - -### Testing site config files - -Currently you will have to have a copy of Full-Text RSS to test changes to the site config files. In the future we will try to make this process easier. diff --git a/data/GrabberConfig/aachener-nachrichten.de.txt b/data/GrabberConfig/aachener-nachrichten.de.txt deleted file mode 100644 index b60c15de2..000000000 --- a/data/GrabberConfig/aachener-nachrichten.de.txt +++ /dev/null @@ -1,10 +0,0 @@ -title: //meta[@property='og:title']/@content -body: //*[@class='fliesstext_detail' or @class='detail_fliesstext'] | //img[@itemprop="image" and starts-with(@src, "/sixcms/media.php/")] - -strip_id_or_class: socialshareprivacy1 -strip_id_or_class: zvaFacebookButton - -tidy: no -prune: no - -test_url: http://www.aachener-nachrichten.de/lokales/aachen-detail-an/2517757 \ No newline at end of file diff --git a/data/GrabberConfig/abc-luxe.com.txt b/data/GrabberConfig/abc-luxe.com.txt deleted file mode 100644 index 7c8f859fd..000000000 --- a/data/GrabberConfig/abc-luxe.com.txt +++ /dev/null @@ -1,4 +0,0 @@ -title: //div[contains(concat(' ',normalize-space(@class),' '),' brandMarginT ')]//h1 -body: //div[contains(concat(' ',normalize-space(@class),' '),' article ')] - -test_url: http://www.abc-luxe.com/actus/produits/article/kenzo-world-une-campagne-dejantee-pour-le-premier-parfum-signe-carol-lim-et-humberto-leon diff --git a/data/GrabberConfig/abc.es.txt b/data/GrabberConfig/abc.es.txt deleted file mode 100644 index 43aadc49d..000000000 --- a/data/GrabberConfig/abc.es.txt +++ /dev/null @@ -1,7 +0,0 @@ -title: //meta[@property='og:title']/@content -body: //div[@class='datosi' or @class='date' or @class='photo-alt1' or @class='text' or @itemprop='articleBody'] -strip_id_or_class: colB - -prune: no - -test_url: http://www.abc.es/20120209/tv-series/abci-house-ultima-temporada-201202090936.html \ No newline at end of file diff --git a/data/GrabberConfig/abc.net.au.txt b/data/GrabberConfig/abc.net.au.txt deleted file mode 100644 index 22b3a0f41..000000000 --- a/data/GrabberConfig/abc.net.au.txt +++ /dev/null @@ -1,18 +0,0 @@ -title: //div[@class='article section']//h1 -author: //div[@class="byline"]/a -date: //span[@class="timestamp"] -body: //div[@class="page section"] - -strip: //a[@class="inline-caption"] -strip: //p[@class="ticker section noprint"] -strip: //p[@class="topics"] -strip: //h1 -strip: //div[@class="byline"] -strip: //p[@class="published"] -strip: //div[contains(@class,"featured-scroller")] -strip_id_or_class: footer - -tidy: no - -test_url: http://www.abc.net.au/news/2013-03-27/open-speed-highways-change-clp-giles/4597892 -test_url: http://www.abc.net.au/news/2013-04-30/credit-growth-remains-subdued/4660054?section=business diff --git a/data/GrabberConfig/abcnews.go.com.txt b/data/GrabberConfig/abcnews.go.com.txt deleted file mode 100644 index 8d3673511..000000000 --- a/data/GrabberConfig/abcnews.go.com.txt +++ /dev/null @@ -1,27 +0,0 @@ -title: //h1[@class='headline'] -body: //div[@id='storyText'] -# for video entries -body: //img[@id='ff-img'] | //div[@id='meta']//div[contains(@class, 'overview')] -author: //div[@class='byline'] -date: //div[@class='date'] -strip: //*[@id='date_partner'] - -strip: //div[@class='breadcrumb'] -strip: //div[contains(@class,'show_tools')] -strip: //div[@id='sponsoredByAd'] -strip: //div[contains(@class,'rel_container')] -strip: //p[a[starts-with(@href, 'http://www.twitter.com')]] -strip: //p[a[starts-with(@href, 'http://www.facebook.com')]] -strip: //p[contains(., 'Click here to return to')] -#strip_id_or_class: media -strip_id_or_class: mediaplayer - -replace_string( -replace_string:
Price: - -strip_id_or_class: collapsePS -strip_id_or_class: expandPS -strip_id_or_class: psPlaceHolde -strip: //li[contains(., 'update product info') or contains(., 'give feedback on images')] - -test_url: http://www.amazon.com/Common-Sense-Forestry-Living-Mother/dp/1931498210/ \ No newline at end of file diff --git a/data/GrabberConfig/americandrink.net.txt b/data/GrabberConfig/americandrink.net.txt deleted file mode 100644 index 7145f3fff..000000000 --- a/data/GrabberConfig/americandrink.net.txt +++ /dev/null @@ -1,6 +0,0 @@ -title: //div[@class='head']/h2/a -author: //div[@class='head']/a -date: //div[@class='head']/p[@class='date']/a -body: //div[@class='copy'] -strip: //p[@class='meta'] -test_url: http://americandrink.net/post/10567188712/free-the-hooch \ No newline at end of file diff --git a/data/GrabberConfig/americastestkitchenfeed.com.txt b/data/GrabberConfig/americastestkitchenfeed.com.txt deleted file mode 100644 index c2b62b5a7..000000000 --- a/data/GrabberConfig/americastestkitchenfeed.com.txt +++ /dev/null @@ -1,5 +0,0 @@ -title: //h1[@class="post-title"] -author: //span[@class="author"]/a -date: //span[@class="date"] -body: //div[@class="post-content main"] -test_url: http://www.americastestkitchenfeed.com/gadgets-and-gear/2012/07/chill-out-with-tovolos-king-cube-silicone-ice-cube-tray/ \ No newline at end of file diff --git a/data/GrabberConfig/amptoons.com.txt b/data/GrabberConfig/amptoons.com.txt deleted file mode 100644 index 87547c630..000000000 --- a/data/GrabberConfig/amptoons.com.txt +++ /dev/null @@ -1,8 +0,0 @@ -title: //title - -body: //div[@class="entry-content"] - -author: //span[@class="author vcard"] - -date: //span[@class="entry-date"] -test_url: http://www.amptoons.com/blog/2013/03/14/open-thread-and-link-farm-i-hate-being-sick-edition/ \ No newline at end of file diff --git a/data/GrabberConfig/anandtech.com.txt b/data/GrabberConfig/anandtech.com.txt deleted file mode 100644 index faba9fb8d..000000000 --- a/data/GrabberConfig/anandtech.com.txt +++ /dev/null @@ -1,16 +0,0 @@ -body: //section[@class='main_cont']/img | //div[@class='articleContent'] -title: //div[@class='blog_top_left']//h2 -author: //a[@class='b'][1] -date: substring-after(substring-before(//div, 'Posted in'), ' on ') -strip_image_src: /content/images/globals/ -strip: //h2[. = 'Page 1']/preceding::p -strip: //h2 - -prune: no - -single_page_link: concat('http://www.anandtech.com/print/', substring-after(//meta[@property='og:url']/@content, '/show/')) -next_page_link: //div[@class='article_links']/a[@class='fl-rt'] - -test_url: http://www.anandtech.com/show/8370/gigabyte-am1m-s2h-review -test_url: http://www.anandtech.com/show/8402/sandisk-releases-ultra-ii-ssd-the-second-tlc-nand-ssd-in-the-market -test_url: http://www.anandtech.com/show/8400/arms-cortex-m-even-smaller-and-lower-power-cpu-cores diff --git a/data/GrabberConfig/androidandme.com.txt b/data/GrabberConfig/androidandme.com.txt deleted file mode 100644 index bb48a7cb5..000000000 --- a/data/GrabberConfig/androidandme.com.txt +++ /dev/null @@ -1,5 +0,0 @@ -body: //img[@class='attachment-large wp-post-image'] | //div[@class='entry-content'] -prune: no - -test_url: http://androidandme.com/2015/12/news/google-introduces-trial-run-ads-and-interactive-interstitials/ -test_url: http://androidandme.com/2015/12/applications/top-10-new-android-games-this-week-maestria-mad-aces/ \ No newline at end of file diff --git a/data/GrabberConfig/androidpolice.com.txt b/data/GrabberConfig/androidpolice.com.txt deleted file mode 100644 index 3588e5887..000000000 --- a/data/GrabberConfig/androidpolice.com.txt +++ /dev/null @@ -1,10 +0,0 @@ -body: //div[@class='post_content'] -date: //div[@class='date_day'] | div[@class='date_month'] -strip_id_or_class: author-box -strip_id_or_class: multi-page-post -strip_id_or_class: toc_container -author: //h2[@class='author-box-heading']/a -next_page_link: //link[@rel='next']/@href - -test_url: http://www.androidpolice.com/2014/03/30/music-boss-for-pebble-can-now-control-playback-and-volume-on-chromecast-content-from-your-smartwatch/ -test_url: http://www.androidpolice.com/2015/12/07/32-new-and-notable-android-games-from-the-last-2-weeks-112415-12715/ \ No newline at end of file diff --git a/data/GrabberConfig/andyrutledge.com.txt b/data/GrabberConfig/andyrutledge.com.txt deleted file mode 100644 index ce31fcf59..000000000 --- a/data/GrabberConfig/andyrutledge.com.txt +++ /dev/null @@ -1,9 +0,0 @@ -title: //h2 -author: string('Andy Rutledge') -date: //div[@class='articledate'] -body: //div[@class='copybody'] - -strip: //*[@class='space'] -strip: //*[@class='articleFoot'] - -test_url: http://www.andyrutledge.com/hungry-for-a-better-menu.php \ No newline at end of file diff --git a/data/GrabberConfig/annatravelling.wordpress.com.txt b/data/GrabberConfig/annatravelling.wordpress.com.txt deleted file mode 100644 index 2d8937f72..000000000 --- a/data/GrabberConfig/annatravelling.wordpress.com.txt +++ /dev/null @@ -1,9 +0,0 @@ -title: //h1[@class="title"] - -author: ("Anna Manasova") -# is ignored, unfortunately - -date: //p[@class="date"] - -body: //div[@class="entry"] -test_url: http://annatravelling.wordpress.com/2011/11/07/a-day-of-cooking-thai/ \ No newline at end of file diff --git a/data/GrabberConfig/antirez.com.txt b/data/GrabberConfig/antirez.com.txt deleted file mode 100644 index f8bef02c5..000000000 --- a/data/GrabberConfig/antirez.com.txt +++ /dev/null @@ -1,6 +0,0 @@ -# Generated by FiveFilters.org's web-based selection tool -# Place this file inside your site_config/custom/ folder -# Source: http://siteconfig.fivefilters.org/grab.php?url=http%3A%2F%2Fantirez.com%2Fnews%2F104 - -body: //article/pre -test_url: http://antirez.com/news/104 diff --git a/data/GrabberConfig/apotheke-adhoc.de.txt b/data/GrabberConfig/apotheke-adhoc.de.txt deleted file mode 100644 index 3a702e7b0..000000000 --- a/data/GrabberConfig/apotheke-adhoc.de.txt +++ /dev/null @@ -1,23 +0,0 @@ -# Author: zinnober - -prune: no - -title: substring-before(//div[@id='content']/h1, ',') - -single_page_link: //a[@title='Seite drucken'] - -body: //div[@id='detail-body'] - -replace_string(): -replace_string(

):

- -# Fix headlines -replace_string(Patrick Hollstein):   -replace_string(APOTHEKE ADHOC):   -replace_string(dpa):   -replace_string(Katharina Lübke):   -replace_string(Julia Pradel):   -replace_string(Franziska Gerhardt):   - -test_url: http://www.apotheke-adhoc.de/nachrichten/politik/nachricht-detail-politik/deutscher-apothekertag-antraege-gegen-lieferengpaesse-2/ - diff --git a/data/GrabberConfig/apple.com.txt b/data/GrabberConfig/apple.com.txt deleted file mode 100644 index a54dccc8f..000000000 --- a/data/GrabberConfig/apple.com.txt +++ /dev/null @@ -1,7 +0,0 @@ -strip: //p[@class='sosumi'] -# Aren't they witty? - -# I can't work out what causes the  before the title. -title: //h1[@class='title'] -strip: //h1[@class='title'] -test_url: http://www.apple.com/pr/library/2011/02/15appstore.html \ No newline at end of file diff --git a/data/GrabberConfig/appledaily.com.tw.txt b/data/GrabberConfig/appledaily.com.tw.txt deleted file mode 100644 index 82d6f3768..000000000 --- a/data/GrabberConfig/appledaily.com.tw.txt +++ /dev/null @@ -1,4 +0,0 @@ -body: //div[contains(@class, 'articulum')] - -test_url: http://www.appledaily.com.tw/realtimenews/article/new/20140120/330479 -test_url: http://www.appledaily.com.tw/rss/create/kind/rnews/type/new/ \ No newline at end of file diff --git a/data/GrabberConfig/appleinsider.com.txt b/data/GrabberConfig/appleinsider.com.txt deleted file mode 100644 index 5ae1050be..000000000 --- a/data/GrabberConfig/appleinsider.com.txt +++ /dev/null @@ -1,23 +0,0 @@ -title: //h1[@class="art-head"] - -author: //p[contains(@class, 'byline')]/a -#author: //p[text() = 'By ']/a/text() -#strip: //p[text() = 'By '] - -date: //p[contains(@class, 'date-header')] - -body: //div[@class="article"] -strip_id_or_class: lazy -#strip_id_or_class: minor -strip_id_or_class: multipagefooter -strip_id_or_class: date-header -strip_id_or_class: byline - -find_string:

-find_string: -replace_string:
- -test_url: http://www.appleinsider.com/articles/12/02/29/inside_os_x_108_mountain_lion_safari_52_gets_a_simplified_user_interface_with_new_sharing_features.html -test_url: http://appleinsider.com/articles/13/10/03/goldee-companion-app-for-philips-hue-bulbs-offers-shifting-dynamic-light-scenes -test_url: http://appleinsider.com/appleinsider.rss \ No newline at end of file diff --git a/data/GrabberConfig/appleweblog.com.txt b/data/GrabberConfig/appleweblog.com.txt deleted file mode 100644 index 023c9ccb0..000000000 --- a/data/GrabberConfig/appleweblog.com.txt +++ /dev/null @@ -1,2 +0,0 @@ -body: //*[(@class = "historia")] -test_url: http://appleweblog.com/2011/09/encontrada-vulnerabilidad-grave-en-skype-para-ios \ No newline at end of file diff --git a/data/GrabberConfig/archdaily.com.txt b/data/GrabberConfig/archdaily.com.txt deleted file mode 100644 index 0178639e1..000000000 --- a/data/GrabberConfig/archdaily.com.txt +++ /dev/null @@ -1,5 +0,0 @@ -date: //div[@class='post_date'] - -body: //div[@class='post_content'] - -test_url: http://www.archdaily.com/185325/p10-mixed-use-building-studio-up \ No newline at end of file diff --git a/data/GrabberConfig/archiveofourown.org.txt b/data/GrabberConfig/archiveofourown.org.txt deleted file mode 100644 index 579de5176..000000000 --- a/data/GrabberConfig/archiveofourown.org.txt +++ /dev/null @@ -1,22 +0,0 @@ -# Description: Fix XPaths to include ALL chapters on 'view_full_work' pages. -# Include: work meta, summary, chapter information, and notes which Instapaper strips out on default. -# Exclude: header, footer, navigation, comments. -# Notes: User is a newbie with XPaths. - -title: //h2[@class='title'] -author: //h3[@class='byline'] -author: //a[@class='login author'] - -strip_id_or_class:header -strip_id_or_class:navigation -strip_id_or_class:feedback -strip_id_or_class:kudos -strip_id_or_class:add_comment_placeholder -strip_id_or_class:add_comment -strip_id_or_class:globalize -strip_id_or_class:footer - -single_page_link: //div[@id='main']//a[contains(@href, 'view_adult=true')] - -test_url: http://archiveofourown.org/works/229402?view_full_work=true -test_url: http://archiveofourown.org/works/750111/chapters/1399929 \ No newline at end of file diff --git a/data/GrabberConfig/arstechnica.co.uk.txt b/data/GrabberConfig/arstechnica.co.uk.txt deleted file mode 100644 index 9ec8ff698..000000000 --- a/data/GrabberConfig/arstechnica.co.uk.txt +++ /dev/null @@ -1,6 +0,0 @@ -strip: //aside -next_page_link: //nav//a[contains(text(), 'Next')]/@href - -test_url: http://arstechnica.co.uk/science/2016/06/what-is-open-access-free-sharing-of-all-human-knowledge/ -test_url: http://arstechnica.co.uk/information-technology/2016/05/eben-moglen-gpl-online-advertising-is-becoming-a-perfect-despotism/ - diff --git a/data/GrabberConfig/arstechnica.com.txt b/data/GrabberConfig/arstechnica.com.txt deleted file mode 100644 index ffd5cc898..000000000 --- a/data/GrabberConfig/arstechnica.com.txt +++ /dev/null @@ -1,20 +0,0 @@ -author: //p[@class='byline']/a -body: //div[contains(@class,'article-content')] -strip: //h2[@class='title'] -strip_id_or_class: byline -strip_id_or_class: story-sidebar -prune: no - -date: //div[@class='byline']/span[@class='posted']//abbr/@original-title -date: //div[@class='byline']/span[@class='posted']//abbr - -title: //div[@id='story']//h2[@class='title'] - -strip: //div[@class='pager'] -native_ad_clue: //meta[@property="og:url" and contains(@content, '/sponsored/')] - -strip: //aside -next_page_link: //nav//a[contains(text(), 'Next')]/@href - -test_url: http://arstechnica.com/tech-policy/news/2012/02/gigabit-internet-for-80-the-unlikely-success-of-californias-sonicnet.ars -test_url: http://arstechnica.com/apple/2005/04/macosx-10-4/ diff --git a/data/GrabberConfig/articles.boston.com.txt b/data/GrabberConfig/articles.boston.com.txt deleted file mode 100644 index 73bcdb4ec..000000000 --- a/data/GrabberConfig/articles.boston.com.txt +++ /dev/null @@ -1,6 +0,0 @@ -title: //div[@class="mod-bostonarticleheader mod-articleheader"]/h1 -author: substring-after(//div[@class="mod-bostonarticlebyline mod-articlebyline"]/span[3],"By ") -date: //div[@class="mod-bostonarticlebyline mod-articlebyline"]/span[@class="pubdate"] - -strip_id_or_class: mod-pagination -test_url: http://articles.boston.com/2011-10-23/news/30313691_1_bigfoot-free-speech-monadnock-state-park \ No newline at end of file diff --git a/data/GrabberConfig/articles.courant.com.txt b/data/GrabberConfig/articles.courant.com.txt deleted file mode 100644 index 984d81ded..000000000 --- a/data/GrabberConfig/articles.courant.com.txt +++ /dev/null @@ -1,11 +0,0 @@ -title: //div[@class="mod-courantarticleheader mod-articleheader"]/h1 -date: //div[@class="mod-courantarticlebyline mod-articlebyline"]/span[@class="pubdate"] -author: //div[@class="mod-courantarticlebyline mod-articlebyline"]/span[3] - -strip_id_or_class: mod-article-byline -strip_id_or_class: mod-article-header -strip_id_or_class: mod-article-subtitle -#This leaves some crud after the article, but it's better than nothing. -#It would be ideal if we could set the body to every element matching //div[contains(@class, "mod-articletext")]/p, but it seems like body only takes the first matching element. - -test_url: http://articles.courant.com/2011-10-22/news/hc-green-drugsearch--1022-20111022_1_drugs-in-student-lockers-police-dogs-lockdown \ No newline at end of file diff --git a/data/GrabberConfig/articles.washingtonpost.com.txt b/data/GrabberConfig/articles.washingtonpost.com.txt deleted file mode 100644 index a76c2d02a..000000000 --- a/data/GrabberConfig/articles.washingtonpost.com.txt +++ /dev/null @@ -1,11 +0,0 @@ -body: //div[contains(@class, "article_body")] -# print view -body: //div[@id='print_facet']//div[@id='body'] - -tidy: no -prune: no - -single_page_link: concat(substring-before(//div[@id="echo_container_a"]/@guid, '_story.html'), '_print.html') - -test_url: http://articles.washingtonpost.com/2011-10-22/world/35279694_1_germany-acts-german-leaders-chancellor-angela-merkel -test_url: http://articles.washingtonpost.com/2013-05-31/opinions/39658000_1_chemical-weapons-mass-destruction-cartels \ No newline at end of file diff --git a/data/GrabberConfig/artofmanliness.com.txt b/data/GrabberConfig/artofmanliness.com.txt deleted file mode 100644 index b29ea0db0..000000000 --- a/data/GrabberConfig/artofmanliness.com.txt +++ /dev/null @@ -1,6 +0,0 @@ -parser: html5php -date: //article/p[contains(@class, 'single-date')] -author: //article/p[contains(@class, 'byline')] - -test_url: http://www.artofmanliness.com/2013/01/31/relationship-red-flags/ -test_contains: It seems that once we get close to a person \ No newline at end of file diff --git a/data/GrabberConfig/ascarter.net.txt b/data/GrabberConfig/ascarter.net.txt deleted file mode 100644 index 0327e846b..000000000 --- a/data/GrabberConfig/ascarter.net.txt +++ /dev/null @@ -1,5 +0,0 @@ -title: //h1[@class='article_title'] -author: //span[@class='author'] -date: //h2[@class='dateline'] -body: //div[@class='article_body'] -test_url: http://ascarter.net/2012/02/20/enough-is-enough.html \ No newline at end of file diff --git a/data/GrabberConfig/astronews.com.txt b/data/GrabberConfig/astronews.com.txt deleted file mode 100644 index 8de222700..000000000 --- a/data/GrabberConfig/astronews.com.txt +++ /dev/null @@ -1,7 +0,0 @@ -title: //span[@class='titel'] -author: //span[@class='metadaten_C']/a//span[@class='metadaten_C'] -date: substring-after(//span[@class='metadaten_C'],'astronews.com') -strip: //span[@class='bu'] -strip_image_src: '/_images/' - -test_url: http://www.astronews.com/news/artikel/2011/10/1110-021.shtml \ No newline at end of file diff --git a/data/GrabberConfig/asymco.com.txt b/data/GrabberConfig/asymco.com.txt deleted file mode 100644 index f639b0482..000000000 --- a/data/GrabberConfig/asymco.com.txt +++ /dev/null @@ -1,8 +0,0 @@ -# Johannes Stühler - -title://h2 -author://span[@class='meta-content'] -date://abbr[@class='date published']/@title -body://div[@class='entry-content'] - -test_url: http://www.asymco.com/2011/01/14/is-android-more-efficient-than-ios-at-generating-search-revenue/ \ No newline at end of file diff --git a/data/GrabberConfig/au.businessinsider.com.txt b/data/GrabberConfig/au.businessinsider.com.txt deleted file mode 100644 index 46bcddf20..000000000 --- a/data/GrabberConfig/au.businessinsider.com.txt +++ /dev/null @@ -1,12 +0,0 @@ -title://div[@class="sl-layout-post"]/h1 -body: //div[@id='content_post'] -strip: //div[contains(@class, "post-sidebar")] -strip: //div[@id='related-links'] -strip: //img[@class='size_xlarge'] -author://div[@class="byline"]/a -date://div[@class="byline"]/span[@class="date"] -prune: no -tidy: no - - -test_url: http://www.businessinsider.com/microsoft-just-put-one-of-its-hardcore-technical-geniuses-on-xbox-2012-1 diff --git a/data/GrabberConfig/au.news.yahoo.com.txt b/data/GrabberConfig/au.news.yahoo.com.txt deleted file mode 100644 index 65753c4c5..000000000 --- a/data/GrabberConfig/au.news.yahoo.com.txt +++ /dev/null @@ -1,5 +0,0 @@ -strip: //a[contains(text(), "RELATED:")] -author: //div[@class="info"]//span[@class="association printer-source"] -author: //div[@class="info"]//span[@class="stamp printer-date"] - -test_url: https://au.news.yahoo.com/a/31334394/brave-subway-employee-fights-off-masked-robber-using-her-bare-hands/ diff --git a/data/GrabberConfig/autoblog.com.txt b/data/GrabberConfig/autoblog.com.txt deleted file mode 100644 index 291db992c..000000000 --- a/data/GrabberConfig/autoblog.com.txt +++ /dev/null @@ -1,6 +0,0 @@ -prune: no -body: //div[@class='post-body'] -author: //p[@class='byline']//a -date: substring-after(//div[@class='about']/p[2], 'Posted') -strip: //div[@class='body']/div[@class='meta'] -test_url: http://www.autoblog.com/2012/01/17/next-gen-bmw-x5-caught-again/ \ No newline at end of file diff --git a/data/GrabberConfig/autocar.co.uk.txt b/data/GrabberConfig/autocar.co.uk.txt deleted file mode 100644 index 9f4fe18b8..000000000 --- a/data/GrabberConfig/autocar.co.uk.txt +++ /dev/null @@ -1,13 +0,0 @@ -title: //div[@class='col-center']/h1 -author: //div[@class='personality']/a -date: //div[@class='personality-date'] -body: //div[@class='content-top ']//div[@class='content'][1] | //div[contains(@class,'article-body')] | //div[contains(@class,'main-article')] - -next_page_link: //div[@id='review-link']/a - -strip: //div[@class='author-block'] -strip: //p//iframe[contains(@src,'signup')]/preceding::p[1] - -test_url: http://www.autocar.co.uk/car-review/volkswagen/golf -test_url: http://www.autocar.co.uk/car-news/pebble-beach/saleen-unveils-performance-electric-vehicle-based-tesla-model-s -test_url: http://www.autocar.co.uk/car-review/rolls-royce/first-drives/rolls-royce-ghost-series-ii-first-drive-review diff --git a/data/GrabberConfig/avclub.com.txt b/data/GrabberConfig/avclub.com.txt deleted file mode 100644 index c365a7aaa..000000000 --- a/data/GrabberConfig/avclub.com.txt +++ /dev/null @@ -1,4 +0,0 @@ -author: //*[@id="article_wrapper"]/div[1]/a[1] -body: //*[@id="article_wrapper"]/div[2] -date: //*[@id="article_wrapper"]/div[1]/text()[2] -test_url: http://www.avclub.com/articles/forgetmenot,70904 \ No newline at end of file diff --git a/data/GrabberConfig/baltimoresun.com.txt b/data/GrabberConfig/baltimoresun.com.txt deleted file mode 100644 index 35b624274..000000000 --- a/data/GrabberConfig/baltimoresun.com.txt +++ /dev/null @@ -1,12 +0,0 @@ -single_page_link: //div[@class='toppaginate']//a[@rel='nofollow'] -convert_double_br_tags: yes - -title: //div[@class="story"]/h1 -body: //div[@id="story-body-text"] -author: //span[@class="byline"] -date: //p[@class="date"] - -strip: //*[@class='all'] -strip: //*[@class='articlerail'] - -test_url: http://www.baltimoresun.com/news/maryland/bs-md-omalley-budget-2-20120116,0,5340585.story \ No newline at end of file diff --git a/data/GrabberConfig/baseballprospectus.com.txt b/data/GrabberConfig/baseballprospectus.com.txt deleted file mode 100644 index 1207b3433..000000000 --- a/data/GrabberConfig/baseballprospectus.com.txt +++ /dev/null @@ -1,13 +0,0 @@ -title: //h1[@class='title'] -author: //p[@class="author"]/a[1] -body: //div[@class="article"] -date: //p[@class="date"] - -# remove user tools -strip: //div[@class='tools'] -strip: //h1 -strip: //h2[@class='subtitle'] -strip: //p[@class='author'] -strip: //p[@class='date'] - -test_url: http://www.baseballprospectus.com/article.php?articleid=18463 \ No newline at end of file diff --git a/data/GrabberConfig/basicthinking.de.txt b/data/GrabberConfig/basicthinking.de.txt deleted file mode 100644 index f08c1f26f..000000000 --- a/data/GrabberConfig/basicthinking.de.txt +++ /dev/null @@ -1,7 +0,0 @@ -title: //h2 -date: //span[@class='date'] -body: //div[@class='entry'] - -strip: //div[@class='zusatz'] - -test_url: http://www.basicthinking.de/blog/2011/12/13/sagt-social-networks-adieu-begrust-private-networks/ \ No newline at end of file diff --git a/data/GrabberConfig/bastamag.net.txt b/data/GrabberConfig/bastamag.net.txt deleted file mode 100644 index 142c959c4..000000000 --- a/data/GrabberConfig/bastamag.net.txt +++ /dev/null @@ -1,10 +0,0 @@ -# Generated by FiveFilters.org's web-based selection tool -# Place this file inside your site_config/custom/ folder -# Source: http://siteconfig.fivefilters.org/grab.php?url=http%3A%2F%2Fwww.bastamag.net%2FEncadrement-des-loyers-pourquoi-Anne-Hidalgo-ferait-bien-de-visiter-Vienne-l - -body: //div[@id='content']//article - -strip_id_or_class: appel-soutien -strip_id_or_class: liste dossiers-content - -test_url: http://www.bastamag.net/Encadrement-des-loyers-pourquoi-Anne-Hidalgo-ferait-bien-de-visiter-Vienne-l diff --git a/data/GrabberConfig/baylon-industries.com.txt b/data/GrabberConfig/baylon-industries.com.txt deleted file mode 100644 index 381e0a7de..000000000 --- a/data/GrabberConfig/baylon-industries.com.txt +++ /dev/null @@ -1,6 +0,0 @@ -# Generated by FiveFilters.org's web-based selection tool -# Place this file inside your site_config/custom/ folder -# Source: http://siteconfig.fivefilters.org/grab.php?url=http%3A%2F%2Fwww.baylon-industries.com%2Fnews%2F%3Fp%3D1440 - -body: //div[contains(concat(' ',normalize-space(@class),' '),' entry_content ')] -test_url: http://www.baylon-industries.com/news/?p=1440 diff --git a/data/GrabberConfig/bb.is.txt b/data/GrabberConfig/bb.is.txt deleted file mode 100644 index 57f7fdfa6..000000000 --- a/data/GrabberConfig/bb.is.txt +++ /dev/null @@ -1,13 +0,0 @@ -author: substring(//h3[@class='headlines']/span[@class='dates'],0,string-length(//h3[@class='headlines']/span[@class='dates'])-20) - - -date: substring((//h3[@class='headlines']/span[@class='dates']),string-length(//h3[@class='headlines']/span[@class='dates'])-18,12) - - -body: //div[@class='first-article-big'] -strip: //table[@class='newsimagecontainer'] -strip: //h3[@class='headlines'] -strip: //iframe[@class='headlines'] -strip: //a[@class='newslink'] -convert_double_br_tags: yes -test_url: http://bb.is/Pages/82?NewsID=174119 \ No newline at end of file diff --git a/data/GrabberConfig/bbc.co.uk.txt b/data/GrabberConfig/bbc.co.uk.txt deleted file mode 100644 index 8abacdedd..000000000 --- a/data/GrabberConfig/bbc.co.uk.txt +++ /dev/null @@ -1,70 +0,0 @@ -body: //div[@id="story-body"] -# for video entries -body: //div[contains(@class, "videoInStory") or @id="meta-information"] -title: //h1[@class="story-header"] -date: //span[@class="story-date"]/span[@class='date'] -# for sport site -date: //meta[@name='DCTERMS.created']/@content -author: //div[@id='headline']//span[@class='byline-name'] - -# recipes, e.g. http://www.bbc.co.uk/food/recipes/mymincepies_71055 -body: //div[contains(@class, 'hrecipe')]//div[@id='subcolumn-1'] - -#strip: //div[@class="story-feature narrow"] -#strip: //div[@class="story-feature wide"] -#strip: //div[@class="story-feature dslideshow-enclosure"] -strip: //div[contains(@class, "story-feature") and not(contains(@class, 'full-width'))] -strip: //span[@class="story-date"] -#strip: //div[@class="caption body-narrow-width"] -strip: //div[@class="warning"]//p -strip: //div[@id='page-bookmark-links-head'] -strip: //object -strip: //div[contains(@class, "bbccom_advert_placeholder")] -strip: //div[contains(@class, "embedded-hyper")] -strip: //div[contains(@class, 'market-data')] -strip: //a[contains(@class, 'hidden')] -strip: //div[contains(@class, 'hypertabs')] -strip: //div[contains(@class, 'related')] -strip: //form[@id='comment-form'] -strip: //div[contains(@class, 'comment-introduction')] -strip: //div[contains(@class, 'share-tools')] -strip: //div[@id='also-related-links'] - -strip: //figcaption -strip_id_or_class: image-and-copyright-container - -strip: //aside[contains(@class, 'sp-pullout')] - -strip_id_or_class: share-help -strip_id_or_class: comments_module - -find_string: http://ichef.bbci.co.uk/news/200/ -replace_string: http://ichef.bbci.co.uk/news/624/ - -find_string: http://ichef.bbci.co.uk/news/304/ -replace_string: http://ichef.bbci.co.uk/news/624/ - -replace_string({width}{hidpi}): 624 - -replace_string(