Context - Doxygen tool on C codes to generated RTF documents.
In the documentation of Modules/Groups, we are getting the header "Detailed Description" even if no detail description is provided for some particular module/group.
In generated RTF document this looks ugly. Is it possible to get rid of this empty Detail Description sections?
I tried "ALWAYS_DETAILED_SEC = NO" but it is not working. I cannot do "HIDE_UNDOC_MEMBERS = YES" as the group/module contains members (struct, functions ...) which are documented.
This may be a bit late, however others may be interested (I was).
You can remove the group detailed description completely using the layout file, though if you have a brief description a More... link will still be created (which links to nothing). My solution was the disable brief description for groups and move detailed description to the top of the page (essentially replacing it).
Create a layout file by running the following command dOxygen -l. The creates the default layout file. The section we are interested in is groups, near the bottom:
<!-- Layout definition for a group page -->
<group>
<briefdescription visible="yes"/>
<groupgraph visible="$GROUP_GRAPHS"/>
Now set visible="yes" to visible="no" in the briefdescription field. Near the bottom of the file you will see a <detaileddescription title=""/> Move this to the top, above or below briefdescription. You should now have:
<!-- Layout definition for a group page -->
<group>
<briefdescription visible="no"/>
<detaileddescription title="Description"/>
<groupgraph visible="$GROUP_GRAPHS"/>
Note that I've changed the title to "Description" by filling in the title field. Save the file. Now in your Doxyfile, you need to specify a custom layoutfile. Add the following line (or search for it and fill it in):
LAYOUT_FILE=DoxygenLayout.xml
Assuming your paths are correct etc, you should now have group pages with brief description replaced with the full description.
The reason as to why "Detailed Description" gets generated even if there is no Documentation in the Entities (Modules/Groups, etc..) is because the Doxyfile tag EXTRACT_ALL is set to YES.
By Setting,
EXTRACT_ALL = NO
ALWAYS_DETAILED_SEC = NO
Only the entities documented with Doxygen special comments will get Documented. And only those entities having #details -> Detailed description will be listed under the Detailed Description section.
Unfortunately it doesn't generate if the class has been documented like:
/// <summary>
/// This is..
/// </summary>
class ABC
{
}
remove the 'summary' tags, i.e. it should be like
///
/// This is..
///
class ABC
{
}
search for detailed description(at the begining) in the link below
http://www.star.bnl.gov/public/comp/sofi/doxygen/docblocks.html
Related
I have made read only computed URL-field based on invoice number. It works nicely but I would like to produce text part only itself like 400:
400
Now it's producing whole link as text which is quite ugly
https://external_site_invoice?num=400
My Odoo fields are defined this way...
ext_invoice_number= fields.Integer(string="Ext number")
def _showlink(self):
for rec in self:
if rec.ext_invoice_number:
if rec.ext_invoice_number>0:
rec.ext_link="https://external site/invoice?num=%d" % (rec.ext_invoice_number,)
ext_link = fields.Char(string="Link",compute=_showlink,)
How can I define text part of URL in Odoo to be different than link? This is poorly documented or it's not possible?
you can define the text attribute in widget definition like that:
<field name="field_with_url" widget="url" readonly="1" text="My own text"/>
Regards
I have a custom search index that I want to index pdf file content. The master index seems to be indexing pdf files fine and sitecore's built in search functionality searches through the pdf files perfectly fine. I seem to be having an issue on trying to index the PDF field and then search the contents of it.
In my indexConfiguration i add the filed by name
<fieldNames hint="raw:AddFieldByFieldName">
<field fieldName="publication pdf" storageType="YES" indexType="TOKENIZED" vectorType="NO" boost="1f" type="System.String" settingType="Sitecore.ContentSearch.LuceneProvider.LuceneSearchFieldConfiguration, Sitecore.ContentSearch.LuceneProvider" />
...
</fieldNames>
My results Item contains index field definition
[IndexField("publication pdf")]
public virtual string PDF { get; set; }
However when I create search context and try to find something inside the PDF, i get 0 results.
var query = context.GetQueryable<ResultItem>();
query = query.Where(p => p.PDF.Equals(SearchString));
Any help is greatly appreciated.
I'm guessing your "Publication PDF" field is some kind of reference field to a media library item. Content of the PDF is in fact not content of your current item. This means that you would need to write a custom computed field that would extract that media library item and crawl its content.
If you want to crawl content of a media item, you might want to use some reflector to check the code of Sitecore.ContentSearch.ComputedFields.MediaItemContentExtractor class. It's used by Sitecore to get the content of media items, as defined in Sitecore.ContentSearch.Lucene.DefaultIndexConfiguration.config:
<field fieldName="_content" type="Sitecore.ContentSearch.ComputedFields.MediaItemContentExtractor,Sitecore.ContentSearch">
<mediaIndexing ref="contentSearch/indexConfigurations/defaultLuceneIndexConfiguration/mediaIndexing"/>
</field>
You would need to first get media item and then use code copied from this class to get the content of PDF.
BUT
Yeah, there is always but. If the media library item has changed and your item has not changed, your item will not be reindexed automatically. So if you plan to change pdfs (uploading new item and selecting it should be fine), you would need either think about custom code that would execute reindexing of the item which holds reference to your pdf file, or manually reindex your item.
I am pasting together all "paragraph" child nodes from an "article" node in a computed field. This is to achieve that an article can be searched & found by its paragraph contents.
To achieve this, I did the following, under the <fields hint="raw:AddComputedIndexField"> node:
<field fieldName="Paragraphs" storageType="YES" indexType="TOKENIZED">
MyWebsite.ComputedFields.Paragraphs,MyWebsite
</field>
In this computed field, I concat the paragraph HTML bodies together.
I was assuming Sitecore would strip the HTML for me (like it does for rich text fields), but it does noet.
For "rich text" fields, it is probably the RichTextFieldReader that strips the HTML tags out. Decompiling the code confirms this.
The RichTextFieldReader is configured in the FieldReaders section. Trying to add a raw:AddFieldReaderByFieldNamesection below, does not seem to do anything.
The full section looks as follows, but does not work in this setup:
<FieldReaders type="Sitecore.ContentSearch.FieldReaders.FieldReaderMap, Sitecore.ContentSearch">
<mapFieldByTypeName hint="raw:AddFieldReaderByFieldTypeName">
....default stuff here...
</mapFieldByTypeName>
<mapFieldByFieldName hint="raw:AddFieldReaderByFieldName">
<fieldReader fieldName="Paragraphs" fieldReaderType="Sitecore.ContentSearch.FieldReaders.RichTextFieldReader, Sitecore.ContentSearch"></fieldReader>
</mapFieldByFieldName>
</FieldReaders>
Any other clues on how to achieve this (by config, not by using HTML agility pack etc)
The problem is the mapFieldByFieldName is expecting to match a field with that name from the Sitecore item, not a custom computed field in your index so the field reader is never called.
I don't know how to achieve this from config, but if you do not want to directly use HAP but are willing to use some code then after you paste your fields together in your computed field class just do what Sitecore does in the GetPlainText() method:
string input = "concatenated string";
return HttpUtility.HtmlDecode(Regex.Replace(input, "<[^>]*>", string.Empty));
or use the util method Sitecore.StringUtil.RemoveTags(text)
I want to start a mediaWiki based site, but rather than manually adding categories and subcategories I want to add them in an automated fashion, where I provide something like an xml file and the bot/script/algorithm/... goes through the list and creates the categories and subcategories with their pages automatically.
There are no pages yet, but I want to start with a clean set of categories, helping users to sort the pages.
I found the pywikipediabot, but I can't figure out how to use it for my purposes - it seems to only work for categories of existing pages. Would you use pywikipediabot for creating hierarchies of new categories and if yes how? Can an xml file be used as a template?
I found a solution to my initial problem of creating categories in bulk, however I don't mark the question as closed, if you know a better solution - please post.
MediaWiki has an import functionality. With your admin account go to
http://yourMediaWiki/index.php/Special:Import
This allows you to choose to import an xml file, which has to follow a certain structure: see here
For a category with the name "Test Category" and the text "Category Testing", you have to create a 'page' element like this:
<page>
<title>Category:Test Category</title> <!-- Name of the category, don't forget to prefix with 'Categroy:' -->
<ns>14</ns> <!-- 14 is the namespace of categories -->
<id>n</id> <!-- identifier for category -->
<revision>
<id>16</id> <!-- number of revision -->
<timestamp>2013-02-10T22:07:46Z</timestamp> <!-- Creation date & time -->
<contributor>
<username>admin</username> <!-- Name of user who created the category -->
<id>1</id> <!-- ID of the user -->
</contributor>
<comment></comment> <!-- Comment about the category. Can be left blank -->
<sha1></sha1> <!-- sha1 hash can be left blank -->
<text xml:space="preserve" bytes="1">Category Testing</text> <!-- It seems it doesn't matter what you write into the bytes attribute. -->
</revision>
</page>
If you want to create hierarchies of categories just add the parent category tags into the text element. Say the category should be part of the 'Parent Category' category then the text element should look like this:
<text xml:space="preserve" bytes="1">Category Testing [[Category:Parent Category]]</text>
If you are able to get pywikibot up and running, then you can use the its Category class. Main entry point on Github search for class Category(Page).
Categories in Mediawiki are basically standard pages but in Namespace 14. To include any page in a Category - including a page which is a category - in the wikitext of the page you include [[Category:<The-Category>]]
So you can do something like this
>>> import pywikibot as pwb
#Your site will be different than this
>>> testwiki = pwb.Site('en','test')
>>> catA = pwb.Category(testwiki, 'testCatA')
>>> catA.namespace()
14
>>> catA._text = u'[[Category:testCatB]]'
>>> catA.save()
Page [[test:Category:TestCatA]] saved
Now you have a page Category:TestCatA which is a subcategory of Category:TestCatB.
I am trying to get VB.NET XML Comments to work with IntelliSense, and maybe it doesn't work the way I think it does.
''' <summary>
''' Gets or sets the Patient Code.
''' <list type="bullet">
''' <listheader><description>Validation:</description></listheader>
''' <item><description>Field Required</description></item>
''' <item><description>Field Max Length: 25</description></item>
''' </list>
''' </summary>
''' <value>The region reference key.</value>
This should, when you are typing in a function, display the "Get or sets the Patient Code" then below that, it should display a list of bulleted items with "Validation:" as the header?
alt text http://www.codejames.com/errored.jpg
Maybe I am doing it wrong, but it doesn't seem to be working correctly.
You are not doing this incorrectly, it's just simply not supported. While the HTML markups may appear in the output of some tools, IntelliSense is not one of them.
IntelliSense is a textual display in Visual Studio 2008 and we do not support displaying many / most of the markups as they should appear in an HTML style display. Instead we tend to strip out the markup tags that are not supported and display the resulting text.
You can "fake" it (without the numbers) by surrounding the <description> contents with the <para> tag -- this will at least show up in Intellisense nicely spaced, but without the appropriate list delimiter (bullet, number).
<summary>
Gets or sets the Patient Code.
<list type="bullet">
<listheader><description>Validation:</description></listheader>
<item><description>Field Required</description></item>
<item><description>Field Max Length: 25</description></item>
</list>
</summary>
<value>The region reference key.</value>
If you don't care all that much about the generated output, just add your bullet in each line:
<item><description><para>* Field Required</para></description></item>
See also <list> XML Documentation
Update
Since posting this, VS2012 11.0.60610.01 Update 3 seems to have added formatting support, so you no longer need the <para> internal wrapping or adding your own bullets.