-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add source link to classes and method #94
Comments
From Anonymous on 2009-01-17 20:13:29+00:00 Bump! |
From Georg Brandl on 2009-02-20 09:37:41+00:00 An extensive source link extension is planned for some later release. It will include options to either let Sphinx generate highlighted sources, or just generate links to an external source like you do here. |
From Anonymous on 2009-02-28 15:47:34+00:00 Bump! |
From Anonymous on 2009-03-12 01:59:52+00:00 Bump! |
From Anonymous on 2009-07-10 10:45:23+00:00 Bump! |
From Anonymous on 2009-07-21 10:52:19+00:00 Online shopping is a wonderful way to save time as well as money.<<issue http://www.coupons4save.comAnjolee>> often have great sales and many even have free shipping coupons. These tips will help you find the coolest gifts for the best prices, all without leaving your house. |
From Anonymous on 2009-07-24 12:09:17+00:00 Bump! |
From Anonymous on 2010-01-31 10:30:10+00:00 Bump! |
From Anonymous on 2012-06-26 02:07:37+00:00 baobao If you are able to keep both cover plans utilizing the same insurance broker, it could save you time and keep the two insurance policies ordered.So one can discover van and car cover policy at the cheapest charge for the company, it is best to go looking and evaluate cover firms. Perhaps you have learnt many people are coughing up a lot for van insurance. Should you put some effort and study into some insurance agencies, you will discover an inexpensive quote which effort pays out for you. http://www.fakeoakleyssunglasses4u.com/ Fake Oakleys http://www.coachonlineoutlet-us.org/ Coach Online Outlet http://www.nikehyperfuselow-2012.com/ Nike Hyperfuse Low |
I start hacking autodoc in Sphinx to add a //source// link after each class/method/function name. This link will link to web page showing the code of the current module, like the browse view in Trac.
To attemp to do this I hack the //desc_directive()// function like this (from line 420:
This is really preliminary code with everything hard coded. In the final version the URL will be taken from the conf.py file and a directive option (like :source:) will be added to the automodule directive.
Side note: I saw your proposal //Easily extendable autodoc// (issue #3), it looks a very very good idea. Any idea of a timeframe for when you will add this ? Hacking //desc_directive()// is not a good way to go.
In my attemp to do this I hit 2 problems:
The first one is the //Source// link was in front of the method name instead of after (HTML output):
I have no idea why because the nodes I add are childrens of the signode ?
My second problem is that I wish to add the line number to the URL of the class/method/function so we can jump directly to the good place in the code. The URL will be of this form:
www.example.com/trac/project/browser/trunk/py/ui/cli/cli.py#L234
There's a //lineno// variable in the //desc_directive()// function, but the number it give don't correspond to the real line number. But after I dig a little more into the Sphinx/docutils code, I was with the impression that //lineno// is supposed to be the real line number ?
Is there's a way to get the real line number (line number in the script file) in the //desc_directive()// function ?
The text was updated successfully, but these errors were encountered: