Giter Club home page Giter Club logo

duckduckgo-publisher's Introduction

DuckDuckGo Publisher Build Status

Installation

You require the following libraries of https://duck.co/

  • DDG
  • DDGC::Locale::DuckduckgoDuckduckgo
  • DDGC::Locale::DuckduckgoDontbubbleus
  • DDGC::Locale::DuckduckgoDonttrackus

You can install App::DuckPAN of CPAN for this and then do the following command:

duckpan \
	DDG \
	DDGC::Locale::DuckduckgoDuckduckgo \
	DDGC::Locale::DuckduckgoDontbubbleus \
	DDGC::Locale::DuckduckgoDonttrackus

Proxying Requests to Dev Server

My default, asset URLs are relative (e.g. /style.css). To proxy these request to a development server, you can specify the domain for individual sites:

duckpan publisher --duckduckgo=http://moollaza.duckduckgo.com

Now all relative URLs will be directed to the specified server. In this case /style.css will be requested as http://moollaza.duckduckgo.com/style.css.

This allows you to develop locally and load assets from another server.

Publishing

Inside the repository you can do this to get a live simulation:

duckpan publisher

If you want to generate the static files you can do the following from the repository:

perl -Ilib bin/ddg_publisher test_publish

The directory test_publish will be generated and filled up with the results.

duckduckgo-publisher's People

Contributors

ak2344 avatar alohaas avatar andrey-p avatar bbraithwaite avatar bsstoner avatar chrismorast avatar crazedpsyc avatar dharb avatar getty avatar jagtalon avatar jbarrett avatar jkv avatar kablamo avatar kdzwinel avatar majuscule avatar mariagraziaalastra avatar moollaza avatar mwmiller avatar nataliebanegas avatar nilnilnil avatar preemeijer avatar rasikapohankar avatar rpicard avatar russellholt avatar sdougbrown avatar tagawa avatar tommytommytommy avatar yegg avatar zachthompson avatar zekiel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

duckduckgo-publisher's Issues

HTML::Tidy fails to install when tidyp not already installed

I ran into this issue today trying to install Publisher on my Mac. It seems you need the C program tidyp installed for HTML::Tidy to successfully install.

HTML::Tidy docs explain that installing Alien::Tidyp will install tidyp for you. Should we add Alien::Tidyp to the dist.ini then?

Our Global Team on About Page is not working anymore

About Global Team is not zooming in anymore

I am always proud to promote DDG and when people say great and why are you doing this I will lead them to the About page and let them see that I'm in the Global Team and proud of it of course.

I am seeing a open pull request removing map-js so maybe it is on purpose that it is not working anymore. I personally think this is unfortunate cause I am proud of it to show people especially when they start using DDG and I try to get them over for good to the Duck side.

Cheers, Paul

/bang : broken link to image

Broken link here: site/duckduckgo/bang.tx

ddg bang img issue mov opt

In html i see:

<img class="js-lazyretina no-js__hide bang--about__screenshot" src="/assets/bang/screenshot" data-src="/assets/bang/screenshot">

I don't know why /assets/bang/screenshot without .png. I have no any plugin what can modify src attr of img.

`duckpan publisher` no longer works.

I am no longer able to view changes locally with duckpan publisher. I had some local changes to the duckpan application, which I thought might be responsible. However, I did a duckpan reinstall, cleared my publisher cache and still get this same result:

Passing a list of values to enum is deprecated. Enum values should be wrapped in an arrayref. at /home/matt/perl5/lib/perl5/Markdent/Types/Internal.pm line 83.
    require Markdent/Types/Internal.pm called at /usr/share/perl5/Module/Runtime.pm line 317
    Module::Runtime::require_module("Markdent::Types::Internal") called at /usr/share/perl5/Module/Runtime.pm line 348
    Module::Runtime::use_module("Markdent::Types::Internal") called at /home/matt/perl5/lib/perl5/MooseX/Types/Combine.pm line 70
    MooseX::Types::Combine::_check_type_lib("Markdent::Types", "Markdent::Types::Internal") called at /home/matt/perl5/lib/perl5/MooseX/Types/Combine.pm line 53
    MooseX::Types::Combine::provide_types_from("Markdent::Types", "Markdent::Types::Internal", "MooseX::Types::Moose") called at /home/matt/perl5/lib/perl5/Markdent/Types.pm line 14
    require Markdent/Types.pm called at /home/matt/perl5/lib/perl5/Markdent/Handler/HTMLStream/Document.pm line 13
    Markdent::Handler::HTMLStream::Document::BEGIN() called at /home/matt/perl5/lib/perl5/Markdent/Types/Internal.pm line 0
    eval {...} called at /home/matt/perl5/lib/perl5/Markdent/Types/Internal.pm line 0
    require Markdent/Handler/HTMLStream/Document.pm called at lib/DDG/Publisher/Site/Duckduckhack/Root.pm line 15
    DDG::Publisher::Site::Duckduckhack::Root::BEGIN() called at /home/matt/perl5/lib/perl5/Markdent/Types/Internal.pm line 0
    eval {...} called at /home/matt/perl5/lib/perl5/Markdent/Types/Internal.pm line 0
    require DDG/Publisher/Site/Duckduckhack/Root.pm called at /usr/share/perl5/Module/Runtime.pm line 317
    Module::Runtime::require_module("DDG::Publisher::Site::Duckduckhack::Root") called at /usr/share/perl5/Class/Load.pm line 180
    Class::Load::try {...} () called at /usr/share/perl5/Try/Tiny.pm line 77
    eval {...} called at /usr/share/perl5/Try/Tiny.pm line 72
    Try::Tiny::try(CODE(0x4076388), Try::Tiny::Catch=REF(0x3f2b5c0)) called at /usr/share/perl5/Class/Load.pm line 186
    Class::Load::try_load_class("DDG::Publisher::Site::Duckduckhack::Root", undef) called at /usr/share/perl5/Class/Load.pm line 41
    Class::Load::load_class("DDG::Publisher::Site::Duckduckhack::Root") called at lib/DDG/Publisher/SiteRole.pm line 73
    DDG::Publisher::SiteRole::_build_dirs(DDG::Publisher::Site::Duckduckhack=HASH(0x40765b0)) called at (eval 242) line 18
    DDG::Publisher::SiteRole::dirs(DDG::Publisher::Site::Duckduckhack=HASH(0x40765b0)) called at lib/DDG/Publisher/SiteRole.pm line 114
    DDG::Publisher::SiteRole::_build_fullpath_files(DDG::Publisher::Site::Duckduckhack=HASH(0x40765b0)) called at (eval 241) line 18
    DDG::Publisher::SiteRole::fullpath_files(DDG::Publisher::Site::Duckduckhack=HASH(0x40765b0)) called at /home/matt/perl5/lib/perl5/App/DuckPAN/WebPublisher.pm line 78
    App::DuckPAN::WebPublisher::request(App::DuckPAN::WebPublisher=HASH(0x33c7d90), Plack::Request=HASH(0x33ddff0)) called at /home/matt/perl5/lib/perl5/App/DuckPAN/WebPublisher.pm line 51
    App::DuckPAN::WebPublisher::run_psgi(App::DuckPAN::WebPublisher=HASH(0x33c7d90), HASH(0x33de170)) called at /home/matt/perl5/lib/perl5/App/DuckPAN/Cmd/Publisher.pm line 74
    App::DuckPAN::Cmd::Publisher::__ANON__(HASH(0x33de170)) called at /home/matt/perl5/lib/perl5/Plack/Util.pm line 142
    eval {...} called at /home/matt/perl5/lib/perl5/Plack/Util.pm line 142
    Plack::Util::run_app(CODE(0x32d32d8), HASH(0x33de170)) called at /home/matt/perl5/lib/perl5/Starman/Server.pm line 273
    Starman::Server::process_request(Starman::Server=HASH(0x33b4548), Net::Server::Proto::TCP=GLOB(0x33fe0a0)) called at /home/matt/perl5/lib/perl5/Net/Server.pm line 75
    Net::Server::run_client_connection(Starman::Server=HASH(0x33b4548)) called at /home/matt/perl5/lib/perl5/Net/Server/PreFork.pm line 229
    eval {...} called at /home/matt/perl5/lib/perl5/Net/Server/PreFork.pm line 229
    Net::Server::PreFork::run_child(Starman::Server=HASH(0x33b4548)) called at /home/matt/perl5/lib/perl5/Net/Server/PreFork.pm line 187
    Net::Server::PreFork::run_n_children(Starman::Server=HASH(0x33b4548), 5) called at /home/matt/perl5/lib/perl5/Net/Server/PreFork.pm line 111
    Net::Server::PreFork::loop(Starman::Server=HASH(0x33b4548)) called at /home/matt/perl5/lib/perl5/Net/Server.pm line 61
    Net::Server::run(Starman::Server=HASH(0x33b4548), "port", ARRAY(0x3049a88), "host", "*", "proto", "tcp", "serialize", "none", ...) called at /home/matt/perl5/lib/perl5/Starman/Server.pm line 84
    Starman::Server::run(Starman::Server=HASH(0x33b4548), CODE(0x32d32d8), HASH(0x3191b98)) called at /home/matt/perl5/lib/perl5/Plack/Handler/Starman.pm line 18
    Plack::Handler::Starman::run(Plack::Handler::Starman=HASH(0x317fe20), CODE(0x32d32d8)) called at /home/matt/perl5/lib/perl5/App/DuckPAN/Cmd/Publisher.pm line 74
    App::DuckPAN::Cmd::Publisher::run(App::DuckPAN::Cmd::Publisher=HASH(0x314ba70)) called at /home/matt/perl5/lib/perl5/App/DuckPAN/Cmd.pm line 19
    App::DuckPAN::Cmd::execute(App::DuckPAN::Cmd::Publisher=HASH(0x314ba70), ARRAY(0x11b5fe0), ARRAY(0x3136a38)) called at /home/matt/perl5/lib/perl5/MooX/Cmd/Role.pm line 120
    MooX::Cmd::Role::__ANON__(App::DuckPAN::Cmd::Publisher=HASH(0x314ba70), "execute", ARRAY(0x11b5fe0), ARRAY(0x3136a38)) called at /home/matt/perl5/lib/perl5/MooX/Cmd/Role.pm line 197
    MooX::Cmd::Role::_initialize_from_cmd("App::DuckPAN") called at /home/matt/perl5/bin/duckpan line 17

Link to the API from DDH

duckduckhack.com is the target of a 'Develop' link in the More menu, making it inviting to people who just want the API. Link to the API from DDH, maybe with a message along the lines of "You just want to use these answers with a web API?"

DuckDuckHack (Docs) - Should use local repo clone as source dir when present

Currently when making changes to the DuckDuckGo-Documentation repo, there is no easy way to preview your changes as Publisher doesn't check locally for a clone of the repo to use as the source, rather it clones the master branch of the documentation repo into the Publisher cache (~/.publisher) and uses that as the source:
https://github.com/duckduckgo/duckduckgo-publisher/blob/master/lib/DDG/Publisher/Site/Duckduckhack/Root.pm#L51

This unfortunately means you can only preview the current state of the Documentation repo, which isn't very helpful. It should first check for a local clone of the Documentation repo so developers can easily preview their changes like they are able to do with the DuckPAN Server for Spice and Goodies.

xslate errors

$ perl -Ilib bin/ddg_publisher test_publish
Publishing to /home/ubuntu/projects/duckduckgo-publisher/test_publish
  - DDG::Publisher::Site::Duckduckhack
  - DDG::Publisher::Site::Duckduckgo
Text::Xslate: Missing argument in sprintf at /opt/perlbrew/perls/perl-5.16.3/lib/site_perl/5.16.3/Locale/Simple.pm line 124.
 (/home/ubuntu/projects/duckduckgo-publisher/share/site/duckduckgo//bang.tx:15) at lib/DDG/Publisher/SiteRole.pm line 181.
----------------------------------------------------------------------------
<div style="margin-bottom:15px;"></div>
<: l('We call these commands %s, and this syntax works for 100s of sites:','!bangs') :>

----------------------------------------------------------------------------
  - DDG::Publisher::Site::Dontbubbleus
  - DDG::Publisher::Site::Donttrackus
Text::Xslate: Argument "<a href="h..." isn't numeric in sprintf at /opt/perlbrew/perls/perl-5.16.3/lib/site_perl/5.16.3/Locale/Simple.pm line 124.
 (/home/ubuntu/projects/duckduckgo-publisher/share/site/donttrackus//index.tx:83) at lib/DDG/Publisher/SiteRole.pm line 181.
----------------------------------------------------------------------------

<h4><: l("Your saved searches can be legally requested,%sand then come back to haunt you.", r('</h4>

----------------------------------------------------------------------------

6733 files generated

I don't believe these are related to erroneous translations - placeholders seem to be present and correct in all published translations for each token.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.