enhancement Pending

User tests: Successful: Unsuccessful:

avatar elkuku
elkuku
16 Oct 2012

This will add..

  1. A content plugin containing a markdown parser based on ElephantMarkdown with some additional @Spice (like on GitHub spice)
  2. An editor plugin, based on the core no-editor that uses a method in com_tracker to generate a "preview".
  3. The Luminous PHP library for highlighting source code. (Only a small set of languages)
  4. A com_tracker "add" view to test this out.
  5. A com_tracker markdown test page that also serves as a syntax cheat sheet.

As an unrelated change this also contains default classes for model and view. I can imagine use cases of view templates that might not need special classes.

Actually I like this very much, so I plan to release something based on this work in a separate extension(s) - I hope we are clear with our GPL license ;)

avatar elkuku elkuku - open - 16 Oct 2012
avatar elkuku elkuku - open - 16 Oct 2012
avatar elkuku elkuku - reference | - 16 Oct 12
avatar vietvh
vietvh - comment - 17 Oct 2012

Great ;)

I did a quick test of your branch and it works quite well, except this

http://screencast.com/t/UVK41B61TdDR

vs

joomla/joomla-cms#280

avatar mbabker
mbabker - comment - 17 Oct 2012

It looks like the parser might be choking on actual URLs, it handled the comment at index.php?option=com_tracker&view=issue&id=5#issue-comment-7 on the branch pretty well (aside from parsing the number that was already in the string to parse as the full link, see here.

Also, just an FYI, the link in plugins/content/kisscontent/parser/emarkdown.php on line 379 is bad. Change the line to $href = $baseHref.'/'.$user.'/'.$project.'/issues/'.$id; and the path on GitHub is fine. That doesn't explain the extra [ I'm getting in URLs though (like https://github.com/[/joomla-cms/issues/#issue/26905 for text [#26905]).

Aside from these couple of kinks, everything else I've looked at looks good.

avatar elkuku
elkuku - comment - 19 Oct 2012

OK I think I got this fixed (hopefully..)

@vietvh The issue here is - The sample data :) - They contain <br> elements for line breaks, and the parser chokes here (well, it shouldn't but it does..).
So installing without sample data and retrieving all the issues from github solves this.

@mbabker All issues due to the authors poor regex capabilities..

Note that the standard and the extended markup both don't support plain links. They know why I suppose.. I implemented this because most people seem to use links this way.. I hope that we will not run into too many issues ;)

There is a known issue with links (and images) containing spaces. If someone with better regexknowledge could step up here, that'd be great ;)

P.S.: I ran into a strange issue while retrieving issues and comments:
Error 403 - API Rate Limit Exceeded for my.ip.address

Seems that there is some sort of "flood protection" on github, and once you hit this thingy you get blocked - not sure when this block ends but I got two hours waiting now :(
There is a similar report on arthur-debert/google-code-issues-migrator#4 - seems we have to put the script to sleep() for some secs..

avatar mbabker
mbabker - comment - 19 Oct 2012

Looks better to me. I'm not a regex guy either, but maybe we'll get lucky and stumble on one somewhere along the way. Couldn't check out comments since trying to pull the data fresh made me hit the API's rate limit. Guess I'll check on that later.

avatar mbabker mbabker - reference | - 19 Oct 12
avatar mbabker mbabker - merge - 19 Oct 2012
avatar mbabker mbabker - close - 19 Oct 2012
avatar - close - 19 Oct 2012
avatar drmmr763
drmmr763 - comment - 19 Oct 2012

I believe the reason that the sample data contains the
elements is
because early on, michael and I realized that there was no formatting
coming from the issues import at all. Therefore what I did was modify the
import CLI script and do a regex for /n, and change that to a
. That
stored it in the database with line breaks.

From then on I suppose the sample data just was saved with the breaks or it
gets imported that way every single time. Not sure what the preferred
direction at this point is with the markdown integration. Thoughts?

-Chad

Regards,
Chad Windnagle
Fight SOPA https://www.google.com/landing/takeaction/

On Thu, Oct 18, 2012 at 9:18 PM, Michael Babker notifications@github.comwrote:

Looks better to me. I'm not a regex guy either, but maybe we'll get lucky
and stumble on one somewhere along the way. Couldn't check out comments
since trying to pull the data fresh made me hit the API's rate limit. Guess
I'll check on that later.


Reply to this email directly or view it on GitHubhttps://github.com/JTracker/jissues/pull/23#issuecomment-9587064.

avatar mbabker
mbabker - comment - 19 Oct 2012

When I did data updates, I just did a database dump and went with it. Since we were modifying the data before injecting it into the database, the
elements stayed with it.

I'm over the API rate limit right now, otherwise I'd update the data. If someone else could update the #__issues and #__issue_comments tables, that'd be great, otherwise, it'll have to wait for me to get unblocked.

avatar pjwiseman
pjwiseman - comment - 19 Oct 2012

The github API documentation re rate limiting is quite good. (http://developer.github.com/v3/#rate-limiting)

60 requests per hour unauthenticated.
5000 requests per hour authenticated.
12500 requests per hour unauthenticated with clientid and secret

I expect the current data pull code is using the unauthenticated method.

Example: Checking the limit and remaining requests

curl -i -u "myusername" https://api.github.com/rate_limit
Enter host password for user 'myusername':
HTTP/1.1 200 OK
Server: nginx
Date: Fri, 19 Oct 2012 01:40:27 GMT
Content-Type: application/json; charset=utf-8
Connection: keep-alive
Status: 200 OK
Content-Length: 61
X-GitHub-Media-Type: github.beta
X-RateLimit-Remaining: 4996
X-RateLimit-Limit: 5000
Cache-Control: max-age=0, private, must-revalidate
X-Content-Type-Options: nosniff
ETag: "127fa09c4557e6e452b02f79c22f46cb"

{
"rate": {
"remaining": 4996,
"limit": 5000
}
}

avatar mbabker
mbabker - comment - 19 Oct 2012

Well, 63917f6 should fix that for now.

avatar elkuku
elkuku - comment - 19 Oct 2012

@elkuku RTFM :P

avatar mbabker mbabker - reference | - 24 Apr 13
avatar elkuku elkuku - head_ref_deleted - 3 Mar 2016

Add a Comment

Login with GitHub to post a comment