Skip to content
This repository

Perl 6 documentation parser #35

Closed
wants to merge 12 commits into from

2 participants

Konrad Borowski Robert Picard
Konrad Borowski
xfix commented July 31, 2012

I have made Perl 6 Documentation parser. I don't know if output.txt is written correctly (I don't know how to test it), so if any changes will be needed to be done, I will fix them.

Robert Picard

We are working on getting Fathead testing integrated into Duckpan to make development much easier, but for now we really appreciate the patience.

  • The first thing I'd point out is that the first element of the line is what the user will search to trigger that zero-click info (ZCI). The "(Perl 6)" part isn't necessary there; it's something that we'll add on our side.

  • It's not likely that the user will be searching, for example, Str.wordcase, so maybe also having the title as just wordcase that redirects to Str.wordcase would be useful.

    In cases where there are multiple items with the same name, e.g. Code.ACCEPTS and Numeric.ACCEPTS, a disambiguation that triggers on ACCEPTS could be the way to go. To create a disambiguation, use the type D and the disambiguation field (see the general file format section of the readme).

    In the disambiguation field you would have something like this (uses the same format as Wikipedia): [[Code.ACCEPTS]], a brief abstract\n[[Numeric.ACCEPTS]], another brief abstract

    Each item would end up linking to a more specific search, e.g. Code.ACCEPTS, that would trigger the releveant ZCI (as it already does).

  • We are currently looking to move away from the programming data file format in favor of using the general format for everything. To include a synopsis (code block) with the general data file format, just wrap it like this: <pre><code># code goes here</code></pre>

I know that's a lot of feedback, but if you have any questions just let me know!

Konrad Borowski
xfix commented August 01, 2012

I've updated output.txt. Is it correct now?

Robert Picard

Thanks for fixing that so quickly. At first glance it looks great! I'll test it out and get back to you.

Konrad Borowski
xfix commented August 01, 2012

I've checked out http://robert.duckduckgo.com/?q=perl6+uc and noticed that linebreaks don't work. 535ecca should fix it.

Also, it seems that when "perl" and "6" is separated by space it doesn't work (possibly conflict with Perl 5 doc?) and disambig pages don't work for some reason (I don't know why)

Robert Picard

@GlitchMr I'm in the process of debugging the disambiguations. I was expecting the issue with "perl 6" as a trigger. I'm just using "perl6" for testing, but once I get the disambiguations figured out, I'll tackle the trigger issue. I know where the problem is coming from, so it shouldn't be too hard to fix.

Robert Picard

@GlitchMr Check out the disambiguation: https://robert.duckduckgo.com/?q=count+perl6

Right now I'm using some sample text, "making some information available," so if you could edit that to give the disambiguation links a small text sample, maybe the first sentence of the description, I think the disambiguations would be all set.

I pushed my changes (updated to include 535ecca) to the branch perl6_doc, so please base your changes on that branch.

and others added some commits August 01, 2012
Robert Picard perl6_doc: Add asterisk and sample abstract to disambiguations d79dff1
Konrad Borowski Make real disambig description e70be23
Konrad Borowski Rewrite Perl 6 documentation scripts according to @moritz hints.
* Add support for generic type information, for example `perl6 Rat`
  will return informations about `Rat` type.
* Add support for class inheritance. You can type `Real.log` and
  you will get information about `Numberic.log`.
* The `output.txt` is now not affected by random hash keys order.
1417a74
Robert Picard

@GlitchMr You may still be working on this, but from looking at e70be23 I'd recommend you limit the disambiguation description to the first sentence of the abstract.

Konrad Borowski
xfix commented August 02, 2012

@rpicard: Actually, i have limited disambiguation descriptions in 1417a74, but by accident I also shortened normal descriptions. Now it should be fixed completely.

Robert Picard

@GlitchMr Just to keep you updated, I'm still trying to figure out the issue where the abstract is getting cut off at a weird spot on for Str.comb on the category page[1]. Everything looks good from your end though.

[1] If it looks really weird, it's because I'm fiddling with it :) https://robert.duckduckgo.com/81/c/Perl_6_Str

Robert Picard

@GlitchMr Okay, we finally got everything figured out and the plugin is live. Sorry it took so long but I've been a little busy getting back into school. Could you give me your Twitter account for attribution?

Konrad Borowski

I don't have Twitter. Anyways, thanks.

Robert Picard rpicard closed this September 24, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.