diff options
author | albert-github <albert.tests@gmail.com> | 2018-10-01 16:58:03 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2018-10-01 16:58:03 (GMT) |
commit | 47fee387821113956e10fffa79ea22062de8c817 (patch) | |
tree | 7762308ebbeb2f3465b6515450e2314ab048eb6f /src/doxygen.cpp | |
parent | d7d4d5c443887cc63211febe40d43f26dfe41bc0 (diff) | |
download | Doxygen-47fee387821113956e10fffa79ea22062de8c817.zip Doxygen-47fee387821113956e10fffa79ea22062de8c817.tar.gz Doxygen-47fee387821113956e10fffa79ea22062de8c817.tar.bz2 |
issue_6517: Emoji support
Added issue support for the different output types.
- Sources of the emoji
- based on the Unicode definition v11.0:
- https://unicode.org/emoji/charts/full-emoji-list.html
- http://www.unicode.org/emoji/charts/full-emoji-modifiers.html
- github definition list:
- https://api.github.com/emojis
- Input of emoji: :<test>: with the restriction that direct after the opening colon and direct before the closing colon no space is allowed
- doctokinizer.l, adding detection of emoji and new command `\:`
- doktokinizer.h, adding "word" type TK_EMOJI
- docparser.* handling of new "word" type TK_EMOJI (analogous to HTML Entities), handling of new command `\:`
- cmdmapper,cpp, cmdmapper.h, adding new command `\:`
- htmlentity.cpp, adding new definition required for new command `\:`
- Emoji
- emoji.cpp, emoji.h, class for handling emoji analogous to HTML Entities, including small directions on how to update the code when a new emoji is defined. Not everything is converted to lowercase for comparison and accents are removed.
- doxygen.cpp possibility to create list of supported emoji
- handling emoji for output types (analogous to HTML Entities), see documentation for different output types
- docparser.h, *docvisitor.*
- rtfdocvisitor.* converting output to UTF-16 (based on http://scruss.com/blog/2017/03/12/in-the-unlikely-event-you-need-to-represent-emoji-in-rtf-using-perl/)
- latexdocvisitor.*, handling arguments for emoji in output (see also latexgen.cpp for meaning of the arguments of doxygenemoji).
- latexgen.cpp, adding new latex command for doxygen (doxygenemoji) and prevent too many open file (code before documentclass)
- config.xml, definition of `LATEX_EMOJI_DIRECTORY` with path to images required for LaTeX output
- Documentation:
- emojisup.doc, user description
- commands.doc, description of new command `\:`
- index.doc, reference to emoji chapter
- xmlcmds.doc, adjust reference to next chapter as a new chapter is added
- Doxyfile*, adding emoji chapter
Build system
- CMakeLists.txt adding new files
Diffstat (limited to 'src/doxygen.cpp')
-rw-r--r-- | src/doxygen.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 9d8a914..cd2cc8d 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -103,6 +103,7 @@ #include "settings.h" #include "context.h" #include "fileparser.h" +#include "emoji.h" // provided by the generated file resources.cpp extern void initResources(); @@ -10029,6 +10030,9 @@ static void usage(const char *name) msg(" RTF: %s -e rtf extensionsFile\n\n",name); msg("7) Use doxygen to compare the used configuration file with the template configuration file\n"); msg(" %s -x [configFile]\n\n",name); + msg("8) Use doxygen to show a list of build in emoji.\n"); + msg(" %s -f emoji outputFileName\n\n",name); + msg(" If - is used for outputFileName doxygen will write to standard output.\n\n"); msg("If -s is specified the comments of the configuration items in the config file will be omitted.\n"); msg("If configName is omitted `Doxyfile' will be used as a default.\n\n"); msg("-v print version string\n"); @@ -10229,6 +10233,7 @@ void readConfiguration(int argc, char **argv) const char *layoutName=0; const char *debugLabel; const char *formatName; + const char *listName; bool genConfig=FALSE; bool shortList=FALSE; bool diffList=FALSE; @@ -10306,6 +10311,34 @@ void readConfiguration(int argc, char **argv) cleanUpDoxygen(); exit(1); break; + case 'f': + listName=getArg(argc,argv,optind); + if (!listName) + { + err("option \"-f\" is missing list specifier.\n"); + cleanUpDoxygen(); + exit(1); + } + if (qstricmp(listName,"emoji")==0) + { + if (optind+1>=argc) + { + err("option \"-f emoji\" is missing an output file name\n"); + cleanUpDoxygen(); + exit(1); + } + QFile f; + if (openOutputFile(argv[optind+1],f)) + { + EmojiEntityMapper::instance()->writeEmojiFile(f); + } + cleanUpDoxygen(); + exit(0); + } + err("option \"-f\" has invalid list specifier.\n"); + cleanUpDoxygen(); + exit(1); + break; case 'w': formatName=getArg(argc,argv,optind); if (!formatName) |