diff --git a/cmake/modules/FindDiscount.cmake b/cmake/modules/FindDiscount.cmake new file mode 100644 --- /dev/null +++ b/cmake/modules/FindDiscount.cmake @@ -0,0 +1,36 @@ +# - Find Discount +# Find the discount markdown library. +# +# This module defines +# discount_FOUND - whether the discount library was found +# discount_LIBRARIES - the discount library +# discount_INCLUDE_DIR - the include path of the discount library + +# Copyright (c) 2017, Julian Wolff, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +if (discount_INCLUDE_DIR AND discount_LIBRARIES) + + # Already in cache + set (discount_FOUND TRUE) + +else (discount_INCLUDE_DIR AND discount_LIBRARIES) + + find_library (discount_LIBRARIES + NAMES markdown libmarkdown + ) + + find_path (discount_INCLUDE_DIR + NAMES mkdio.h + ) + + include (FindPackageHandleStandardArgs) + find_package_handle_standard_args (discount DEFAULT_MSG discount_LIBRARIES discount_INCLUDE_DIR) + +endif (discount_INCLUDE_DIR AND discount_LIBRARIES) + +mark_as_advanced(discount_INCLUDE_DIR discount_LIBRARIES) + diff --git a/generators/CMakeLists.txt b/generators/CMakeLists.txt --- a/generators/CMakeLists.txt +++ b/generators/CMakeLists.txt @@ -88,6 +88,13 @@ URL "https://commits.kde.org/kdegraphics-mobipocket" TYPE RECOMMENDED PURPOSE "Support for Mobipocket documents in Okular.") + +find_package(Discount) +set_package_properties("discount" PROPERTIES + DESCRIPTION "A library that gives you formatting functions suitable for marking down entire documents or lines of text" + URL "http://www.pell.portland.or.us/~orc/Code/discount/" + TYPE RECOMMENDED + PURPOSE "Support for Markdown documents in Okular.") # let's enable the generators properly configured @@ -140,3 +147,7 @@ if(QMobipocket_FOUND) add_subdirectory(mobipocket) endif() + +if(discount_FOUND) + add_subdirectory(markdown) +endif() diff --git a/generators/markdown/16-apps-okular-md.png b/generators/markdown/16-apps-okular-md.png new file mode 100644 index 0000000000000000000000000000000000000000..c09c4dfa7caa93eb790302fcda69d8a7cdbcb9c6 GIT binary patch literal 335 zc%17D@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf4nJ z@ErkR#;MwT(m+AU64!{5;QX|b^2DN4hVt@qz0ADq;^f4FRK5J7^x5xhq=1Ufc)B=- zSoB`KwAahoQK0SN@d<~Vf|gv6{=iqnIIYnn^U|`7UzmLIbv0S{a=lJiI7eAxjR+HG zV~E+UwuZT4eeF*l@P9OU*4p|rExl}C?6lr=?&TI86|(mVm?K%4D|H3kEu4)@xSwaJ zo2my+-=!fF#v#7msKEY!H-F-glHwFUjc4#iPY*n*OwF|8omFF8l89TjkhriGT4G Z><6D}DBqsDpc3dW22WQ%mvv4FO#lPKeX9Tf literal 0 Hc$@x0ThSm^ijYEV zQrOu@k`JIwf=&DaHWs3Vh(f?btfGwxBv@GalG+3eh%woXYjJPjvdm;=VVMZ-1H+s- z^S^T*=DyNXPyf4WIF1K6hrWvHHnE6_8s6YM=FzCgKtC?yJ#1s9qQa?Wuw9RCw)Vlm z7W%XL{3uSu_!mB9Fb8oa#!akbFvB<;<5jHXIcZ@!c^-?o7Itv8jjv-iVZP^l_eH{t zWxSt8tDfg7DfSqrliU=p6tpX?A_H&)uW$(0G2X4>l%Mx!@m!d$wQd?H`U4-a5#x&( zjPXKM2EJfa7>v7G#+@8~6rbaDDalX8+%isfVgO#_UX0g;aj==gJ{7v^6b>Z$V;I6D zzIAEyY~g0Smtk)Uv*%jO-NmykxRc$lOz~aq2!`kI z77z2lECVlvtr>pgv|CM>W)8C{ELcDHa++me%^vG^)Nd>mFp7#324MpOB|g?|4WLmI y4k8zX{;KLg(uWbe+s`A}2TW8{ucw~=Vf_V@MOVxdiDYpA00000wDc~P)NqavT))841pXhe1E0!hdmCp98LOFWXM{(Z9acXQ`oF>+;lrd5_i$L~?O3WwU{-i5 z4~jnRDqs@(@GHjl6bHFQZMvqDUaS4zF&ckc4ElPPO8} z)>7eMt5?u&z}(?hE0qj3}@Rn~tg*(|9I))>gU$NJ&XaNl9rA{sA3$;E$(8 R;Y9!d002ovPDHLkV1hleNr(Ud literal 0 Hc$@ * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + ***************************************************************************/ + +#ifndef MARKDOWN_CONVERTER_H +#define MARKDOWN_CONVERTER_H + +#include + +#include + +class QTextCursor; +class QTextFrame; + +namespace Markdown { + +class Converter : public Okular::TextDocumentConverter +{ + Q_OBJECT + + public: + Converter(); + ~Converter(); + + QTextDocument *convert( const QString &fileName ) override; + + private: + void convertLinks(); + void convertImages(); + + void convertLinks(QTextFrame *parent); + void convertLinks(QTextBlock& parent); + void convertImages(QTextFrame *parent); + void convertImages(QTextBlock& parent); + + QTextDocument *mTextDocument; + QDir mDir; +}; + +} + +#endif diff --git a/generators/markdown/converter.cpp b/generators/markdown/converter.cpp new file mode 100644 --- /dev/null +++ b/generators/markdown/converter.cpp @@ -0,0 +1,173 @@ +/*************************************************************************** + * Copyright (C) 2017 by Julian Wolff * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + ***************************************************************************/ + +#include "converter.h" + +#include + +#include +#include +#include +#include +#include + +#include + +#include "debug_md.h" + +extern "C" { +#include +} + +using namespace Markdown; + +Converter::Converter() +: mTextDocument(nullptr) +{ +} + +Converter::~Converter() +{ +} + +QTextDocument* Converter::convert( const QString &fileName ) +{ + FILE *markdownFile = fopen( fileName.toStdString().c_str(), "rb" ); + mDir = QDir( fileName.left( fileName.lastIndexOf( '/' ) ) ); + + MMIOT *markdownHandle = mkd_in( markdownFile, 0 ); + + QTemporaryFile temporaryFile; + if ( !temporaryFile.open() ) { + emit error( i18n( "Unable to open temporary file!" ), -1 ); + return 0; + } + + QString tmpFileName = temporaryFile.fileName(); + temporaryFile.close(); + + FILE *tmpFile = fopen( tmpFileName.toStdString().c_str(), "w+" ); + markdown( markdownHandle, tmpFile, MKD_FENCEDCODE | MKD_GITHUBTAGS | MKD_AUTOLINK ); + fclose( tmpFile ); + + mTextDocument = new QTextDocument; + mTextDocument->setPageSize( QSizeF( 980, 1307 ) ); + + QFile htmlFile( tmpFileName ); + if ( !htmlFile.open( QIODevice::ReadOnly ) ) { + emit error( i18n( "Unable to open temporary file!" ), -1 ); + return 0; + } + + QTextStream htmlStream( &htmlFile ); + + mTextDocument->setHtml( htmlStream.readAll() ); + + QTextFrameFormat frameFormat; + frameFormat.setMargin( 45 ); + + QTextFrame *rootFrame = mTextDocument->rootFrame(); + rootFrame->setFrameFormat( frameFormat ); + + convertLinks(); + convertImages(); + + return mTextDocument; +} + +void Converter::convertLinks() +{ + convertLinks( mTextDocument->rootFrame() ); +} + + +void Converter::convertLinks(QTextFrame * parent) +{ + for ( QTextFrame::iterator it = parent->begin(); !it.atEnd(); ++it ) { + QTextFrame *textFrame = it.currentFrame(); + QTextBlock textBlock = it.currentBlock(); + + if ( textFrame ) { + convertLinks(textFrame); + } + else if ( textBlock.isValid() ) { + convertLinks(textBlock); + } + } +} + +void Converter::convertLinks(QTextBlock & parent) +{ + for ( QTextBlock::iterator it = parent.begin(); !it.atEnd(); ++it ) { + QTextFragment textFragment = it.fragment(); + if ( textFragment.isValid() ) { + QTextCharFormat textCharFormat = textFragment.charFormat(); + if ( textCharFormat.isAnchor() ) { + Okular::BrowseAction *action = new Okular::BrowseAction( QUrl( textCharFormat.anchorHref() ) ); + emit addAction( action, textFragment.position(), textFragment.position()+textFragment.length()-1 ); + + } + } + } +} + +void Converter::convertImages() +{ + convertImages( mTextDocument->rootFrame() ); +} + +void Converter::convertImages(QTextFrame * parent) +{ + for ( QTextFrame::iterator it = parent->begin(); !it.atEnd(); ++it ) { + QTextFrame *textFrame = it.currentFrame(); + QTextBlock textBlock = it.currentBlock(); + + if ( textFrame ) { + convertImages(textFrame); + } + else if ( textBlock.isValid() ) { + convertImages(textBlock); + } + } +} + +void Converter::convertImages(QTextBlock & parent) +{ + for ( QTextBlock::iterator it = parent.begin(); !it.atEnd(); ++it ) { + QTextFragment textFragment = it.fragment(); + if ( textFragment.isValid() ) { + QTextCharFormat textCharFormat = textFragment.charFormat(); + if( textCharFormat.isImageFormat() ) { + + //TODO: Show images from http URIs + + QTextImageFormat format; + + format.setName( QDir::cleanPath( mDir.absoluteFilePath( textCharFormat.toImageFormat().name() ) ) ); + const QImage img = QImage( format.name() ); + + if ( img.width() > 890 ) { + format.setWidth( 890 ); + format.setHeight( img.height() * 890. / img.width() ); + } + else { + format.setWidth( img.width() ); + format.setHeight( img.height() ); + } + + QTextCursor cursor( mTextDocument ); + cursor.setPosition( textFragment.position(), QTextCursor::MoveAnchor ); + cursor.setPosition( textFragment.position() + textFragment.length(), QTextCursor::KeepAnchor ); + cursor.removeSelectedText(); + cursor.insertImage( format ); + + } + } + } +} diff --git a/generators/markdown/debug_md.h b/generators/markdown/debug_md.h new file mode 100644 --- /dev/null +++ b/generators/markdown/debug_md.h @@ -0,0 +1,19 @@ + +/*************************************************************************** + * Copyright (C) 2006 by Luigi Toscano * + * Copyright (C) 2014 by Frederik Gladhorn * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + ***************************************************************************/ + +#ifndef OKULAR_MD_DEBUG_P_H +#define OKULAR_MD_DEBUG_P_H + +#include + +Q_DECLARE_LOGGING_CATEGORY(OkularMdDebug) + +#endif diff --git a/generators/markdown/generator_md.h b/generators/markdown/generator_md.h new file mode 100644 --- /dev/null +++ b/generators/markdown/generator_md.h @@ -0,0 +1,27 @@ +/*************************************************************************** + * Copyright (C) 2017 by Julian Wolff * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + ***************************************************************************/ + +#ifndef _OKULAR_GENERATOR_MD_H_ +#define _OKULAR_GENERATOR_MD_H_ + +#include + +class MarkdownGenerator : public Okular::TextDocumentGenerator +{ + Q_OBJECT + Q_INTERFACES( Okular::Generator ) + + public: + MarkdownGenerator( QObject *parent, const QVariantList &args ); + + // [INHERITED] reparse configuration + void addPages( KConfigDialog* dlg ) override; +}; + +#endif diff --git a/generators/markdown/generator_md.cpp b/generators/markdown/generator_md.cpp new file mode 100644 --- /dev/null +++ b/generators/markdown/generator_md.cpp @@ -0,0 +1,37 @@ +/*************************************************************************** + * Copyright (C) 2017 by Julian Wolff * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + ***************************************************************************/ + +#include "generator_md.h" + +#include "converter.h" +#include "debug_md.h" + +#include +#include +#include + +OKULAR_EXPORT_PLUGIN(MarkdownGenerator, "libokularGenerator_md.json") + +MarkdownGenerator::MarkdownGenerator( QObject *parent, const QVariantList &args ) + : Okular::TextDocumentGenerator( new Markdown::Converter, QStringLiteral("okular_markdown_generator_settings"), parent, args ) +{ +} + +void MarkdownGenerator::addPages( KConfigDialog* dlg ) +{ + Okular::TextDocumentSettingsWidget *widget = new Okular::TextDocumentSettingsWidget(); + + dlg->addPage( widget, generalSettings(), i18n("Markdown"), QStringLiteral("okular-md"), i18n("Markdown Backend Configuration") ); +} + + +Q_LOGGING_CATEGORY(OkularMdDebug, "org.kde.okular.generators.md", QtWarningMsg) + +#include "generator_md.moc" + diff --git a/generators/markdown/hi32-app-okular-md.svg b/generators/markdown/hi32-app-okular-md.svg new file mode 100644 --- /dev/null +++ b/generators/markdown/hi32-app-okular-md.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/generators/markdown/libokularGenerator_md.json b/generators/markdown/libokularGenerator_md.json new file mode 100644 --- /dev/null +++ b/generators/markdown/libokularGenerator_md.json @@ -0,0 +1,26 @@ +{ + "KPlugin": { + "Authors": [ + { + "Email": "wolff@julianwolff.de", + "Name": "Julian Wolff", + "Name[x-test]": "xxJulian Wolffxx" + } + ], + "Copyright": "© 2017 Julian Wolff", + "Id": "okular_markdown", + "License": "GPL", + "MimeTypes": [ + "text/markdown", + "text/x-markdown" + ], + "Name": "Markdown Backend", + "ServiceTypes": [ + "okular/Generator" + ], + "Version": "0.1.0" + }, + "X-KDE-Priority": 1, + "X-KDE-okularAPIVersion": 1, + "X-KDE-okularHasInternalSettings": false +} diff --git a/generators/markdown/okularApplication_md.desktop b/generators/markdown/okularApplication_md.desktop new file mode 100644 --- /dev/null +++ b/generators/markdown/okularApplication_md.desktop @@ -0,0 +1,110 @@ +[Desktop Entry] +MimeType=text/markdown; +Terminal=false +Name=Okular +GenericName=Document Viewer +GenericName[ar]=عارض المستندات +GenericName[ast]=Visor de documentos +GenericName[bg]=Преглед на документи +GenericName[bs]=Prikazivač dokumenata +GenericName[ca]=Visualitzador de documents +GenericName[ca@valencia]=Visualitzador de documents +GenericName[cs]=Prohlížeč dokumentů +GenericName[da]=Dokumentfremviser +GenericName[de]=Dokumentenbetrachter +GenericName[el]=Προβολέας εγγράφων +GenericName[en_GB]=Document Viewer +GenericName[eo]=Dokumenta rigardilo +GenericName[es]=Visor de documentos +GenericName[et]=Dokumendinäitaja +GenericName[eu]=Dokumentu ikustailea +GenericName[fa]=مشاهده‌گر سند +GenericName[fi]=Asiakirjakatselin +GenericName[fr]=Afficheur de documents +GenericName[ga]=Amharcán Cáipéisí +GenericName[gl]=Visor de documentos +GenericName[hi]=दस्तावेज़ प्रदर्शक +GenericName[hne]=कागद प्रदर्सक +GenericName[hr]=Preglednik dokumenata +GenericName[hu]=Dokumentumnézegető +GenericName[ia]=Visor de documento +GenericName[is]=Skjalaskoðari +GenericName[it]=Visore di documenti +GenericName[ja]=文書ビューア +GenericName[kk]=Құжатты қарау құралы +GenericName[km]=កម្មវិធី​មើល​ឯកសារ +GenericName[ko]=문서 뷰어 +GenericName[ku]=Nîşanderê Belgeyan +GenericName[lt]=Dokumentų žiūryklė +GenericName[lv]=Dokumentu skatītājs +GenericName[mr]=दस्तऐवज प्रदर्शक +GenericName[nb]=Dokumentviser +GenericName[nds]=Dokmentkieker +GenericName[ne]=कागजात दर्शक +GenericName[nl]=Documentenviewer +GenericName[nn]=Dokumentvisar +GenericName[oc]=Visualizaire de documents +GenericName[pa]=ਡੌਕੂਮੈਂਟ ਦਰਸ਼ਕ +GenericName[pl]=Przeglądarka dokumentów +GenericName[pt]=Visualizador de Documentos +GenericName[pt_BR]=Visualizador de documentos +GenericName[ro]=Vizualizor de documente +GenericName[ru]=Просмотр документов +GenericName[sk]=Prehliadač dokumentov +GenericName[sl]=Pregledovalnik dokumentov +GenericName[sq]=Shikues dokumentesh +GenericName[sr]=Приказивач докумената +GenericName[sr@ijekavian]=Приказивач докумената +GenericName[sr@ijekavianlatin]=Prikazivač dokumenata +GenericName[sr@latin]=Prikazivač dokumenata +GenericName[sv]=Dokumentvisare +GenericName[th]=เครื่องมือแสดงเอกสาร +GenericName[tr]=Belge Gösterici +GenericName[ug]=پۈتۈك كۆرگۈ +GenericName[uk]=Переглядач документів +GenericName[x-test]=xxDocument Viewerxx +GenericName[zh_CN]=文档查看器 +GenericName[zh_TW]=文件檢視器 +Comment=Universal document viewer +Comment[ast]=Visor universal de documentos +Comment[ca]=Visualitzador universal de documents +Comment[ca@valencia]=Visualitzador universal de documents +Comment[cs]=Univerzální prohlížeč dokumentů +Comment[da]=Universel dokumentfremviser +Comment[de]=Universeller Dokumentenbetrachter +Comment[el]=Καθολικός προβολέας εγγράφων +Comment[en_GB]=Universal document viewer +Comment[es]=Visor de documentos universal +Comment[et]=Universaalne dokumendinäitaja +Comment[fi]=Yleinen asiakirjakatselin +Comment[fr]=Afficheur de document universel +Comment[gl]=Visor de documentos universal +Comment[ia]=Visor de documento universal +Comment[is]=Fjölhæfur skjalaskoðari +Comment[it]=Visore di documenti universale +Comment[ko]=만능 문서 뷰어 +Comment[nl]=Universele documentviewer +Comment[nn]=Dokumentvisar for mange format +Comment[pl]=Wszechstronna przeglądarka dokumentów +Comment[pt]=Visualizador de documentos universal +Comment[pt_BR]=Visualizador de documentos universal +Comment[ru]=Универсальная программа просмотра документов +Comment[sk]=Univerzálny prehliadač dokumentov +Comment[sl]=Vsestranski pregledovalnik dokumentov +Comment[sr]=Универзални приказивач докумената +Comment[sr@ijekavian]=Универзални приказивач докумената +Comment[sr@ijekavianlatin]=Univerzalni prikazivač dokumenata +Comment[sr@latin]=Univerzalni prikazivač dokumenata +Comment[sv]=Generell dokumentvisare +Comment[tr]=Evrensel belge görüntüleyici +Comment[uk]=Універсальний переглядач документів +Comment[x-test]=xxUniversal document viewerxx +Comment[zh_CN]=通用文档查看器 +Comment[zh_TW]=通用文件檢視器 +Exec=okular %U +Icon=okular +Type=Application +InitialPreference=7 +Categories=Qt;KDE;Graphics;Viewer; +NoDisplay=true +X-KDE-Keywords=Markdown diff --git a/generators/markdown/okularMd.desktop b/generators/markdown/okularMd.desktop new file mode 100644 --- /dev/null +++ b/generators/markdown/okularMd.desktop @@ -0,0 +1,66 @@ +[Desktop Entry] +Icon=okular +Name=Okular +Name[ar]=اوكلار +Name[ast]=Okular +Name[bg]=Okular +Name[bs]=Okular +Name[ca]=Okular +Name[ca@valencia]=Okular +Name[cs]=Okular +Name[da]=Okular +Name[de]=Okular +Name[el]=Okular +Name[en_GB]=Okular +Name[eo]=Okular +Name[es]=Okular +Name[et]=Okular +Name[eu]=Okular +Name[fi]=Okular +Name[fr]=Okular +Name[ga]=Okular +Name[gl]=Okular +Name[hne]=ओकुलर +Name[hr]=Okular +Name[hu]=Okular +Name[ia]=Okular +Name[is]=Okular +Name[it]=Okular +Name[ja]=Okular +Name[kk]=Okular +Name[km]=Okular +Name[ko]=Okular +Name[ku]=Okular +Name[lt]=Okular +Name[lv]=Okular +Name[mr]=ओक्युलर +Name[nb]=Okular +Name[nds]=Okular +Name[nl]=Okular +Name[nn]=Okular +Name[pa]=ਓਕੁਲਾਰ +Name[pl]=Okular +Name[pt]=Okular +Name[pt_BR]=Okular +Name[ro]=Okular +Name[ru]=Okular +Name[si]=Okular +Name[sk]=Okular +Name[sl]=Okular +Name[sq]=Okular +Name[sr]=Окулар +Name[sr@ijekavian]=Окулар +Name[sr@ijekavianlatin]=Okular +Name[sr@latin]=Okular +Name[sv]=Okular +Name[th]=โอกูลาร์ +Name[tr]=Okular +Name[ug]=Okular +Name[uk]=Okular +Name[x-test]=xxOkularxx +Name[zh_CN]=Okular +Name[zh_TW]=文件檢視_Okular +X-KDE-ServiceTypes=KParts/ReadOnlyPart +X-KDE-Library=okularpart +Type=Service +MimeType=text/markdown; diff --git a/generators/markdown/org.kde.mobile.okular_md.desktop b/generators/markdown/org.kde.mobile.okular_md.desktop new file mode 100644 --- /dev/null +++ b/generators/markdown/org.kde.mobile.okular_md.desktop @@ -0,0 +1,159 @@ +[Desktop Entry] +MimeType=text/markdown; +Name=Reader +Name[ar]=التصيير +Name[ast]=Llector +Name[bg]=Четец +Name[bs]=Čitač +Name[ca]=Lector +Name[ca@valencia]=Lector +Name[cs]=Čtečka +Name[da]=Læser +Name[de]=Lesegerät +Name[el]=Πρόγραμμα ανάγνωσης +Name[en_GB]=Reader +Name[es]=Lector +Name[et]=Lugeja +Name[fi]=Lukija +Name[fr]=Lecteur +Name[ga]=Léitheoir +Name[gl]=Lector +Name[hu]=Olvasó +Name[ia]=Lector +Name[is]=Lesari +Name[it]=Lettore +Name[kk]=Оқу құралы +Name[ko]=리더 +Name[lt]=Skaitytuvas +Name[mr]=वाचक +Name[nb]=Leser +Name[nds]=Leser +Name[nl]=Lezer +Name[nn]=Lesar +Name[pa]=ਰੀਡਰ +Name[pl]=Czytnik +Name[pt]=Leitor +Name[pt_BR]=Leitor +Name[ro]=Cititor +Name[ru]=Просмотрщик +Name[sk]=Čítačka +Name[sl]=Bralnik +Name[sr]=Читач +Name[sr@ijekavian]=Читач +Name[sr@ijekavianlatin]=Čitač +Name[sr@latin]=Čitač +Name[sv]=Läsprogram +Name[tr]=Okuyucu +Name[ug]=ئوقۇغۇ +Name[uk]=Переглядач +Name[x-test]=xxReaderxx +Name[zh_CN]=阅读器 +Name[zh_TW]=閱讀器 +GenericName=Document viewer +GenericName[ar]=عارض المستندات +GenericName[ast]=Visor de documentos +GenericName[bg]=Преглед на документи +GenericName[bs]=Prikazivač dokumenata +GenericName[ca]=Visualitzador de documents +GenericName[ca@valencia]=Visualitzador de documents +GenericName[cs]=Prohlížeč dokumentů +GenericName[da]=Dokumentfremviser +GenericName[de]=Dokumentenbetrachter +GenericName[el]=Προβολέας εγγράφων +GenericName[en_GB]=Document Viewer +GenericName[es]=Visor de documentos +GenericName[et]=Dokumendinäitaja +GenericName[fi]=Asiakirjakatselin +GenericName[fr]=Afficheur de document +GenericName[ga]=Amharcán cáipéisí +GenericName[gl]=Visor de documentos +GenericName[hu]=Dokumentummegjelenítő +GenericName[ia]=Visor de documento +GenericName[is]=Skjalaskoðari +GenericName[it]=Visore di documenti +GenericName[ja]=文書ビューア +GenericName[kk]=Құжатты қарау құралы +GenericName[ko]=문서 뷰어 +GenericName[lt]=Dokumentų žiūryklė +GenericName[mr]=दस्तऐवज प्रदर्शक +GenericName[nb]=Dokumentviser +GenericName[nds]=Dokmentkieker +GenericName[nl]=Documentenviewer +GenericName[nn]=Dokumentvisar +GenericName[pa]=ਡੌਕੂਮੈਂਟ ਦਰਸ਼ਕ +GenericName[pl]=Przeglądarka dokumentów +GenericName[pt]=Visualizador de documentos +GenericName[pt_BR]=Visualizador de documentos +GenericName[ro]=Vizualizor de documente +GenericName[ru]=Просмотр документов +GenericName[sk]=Prehliadač dokumentov +GenericName[sl]=Pregledovalnik dokumentov +GenericName[sr]=Приказивач докумената +GenericName[sr@ijekavian]=Приказивач докумената +GenericName[sr@ijekavianlatin]=Prikazivač dokumenata +GenericName[sr@latin]=Prikazivač dokumenata +GenericName[sv]=Dokumentvisare +GenericName[tr]=Belge görüntüleyici +GenericName[uk]=Переглядач документів +GenericName[x-test]=xxDocument viewerxx +GenericName[zh_CN]=文档查看器 +GenericName[zh_TW]=文件檢視器 +Comment=Viewer for various types of documents +Comment[ar]=عارض للعديد من أنواع المستندات +Comment[ast]=Visor pa delles tribes de documentos +Comment[bg]=Преглед на различни видове документи +Comment[bs]=Pregledač raznih vrsta dokumenata +Comment[ca]=Visualitzador de diversos tipus de documents +Comment[ca@valencia]=Visualitzador de diversos tipus de documents +Comment[cs]=Prohlížeč různých typů dokumentů +Comment[da]=Fremviser af diverse dokumenttyper +Comment[de]=Betrachter für verschiedene Arten von Dokumenten +Comment[el]=Πρόγραμμα προβολής για διάφορους τύπους εγγράφων +Comment[en_GB]=Viewer for various types of documents +Comment[es]=Visor de diversos tipos de documentos +Comment[et]=Eri tüüpi dokumentide näitaja +Comment[fi]=Monenlaisten asiakirjojen katseluohjelma +Comment[fr]=Afficheur pour différents types de documents +Comment[ga]=Amharcán le haghaidh cáipéisí éagsúla +Comment[gl]=Visor de varios tipos de documentos. +Comment[hu]=Megjelenítő különféle típusú dokumentumokhoz +Comment[ia]=Visor pro varie typos de documento +Comment[is]=Skoðari fyrir ýmsar gerðir skjala +Comment[it]=Visore per vari tipi di documenti +Comment[kk]=Түрлі құжаттар қарау құралы +Comment[ko]=여러 형식의 문서 뷰어 +Comment[lt]=Žiūryklė įvairiems dokumentų tipams +Comment[mr]=विविध प्रकारच्या दस्तऐवजांचा प्रदर्शक +Comment[nb]=Framviser for forskjellige dokumenttyper +Comment[nds]=Kieker för en Reeg Dokmenttypen +Comment[nl]=Viewer voor verschillende typen documenten +Comment[nn]=Framvisar for forskjellige dokumenttypar +Comment[pa]=ਕਈ ਕਿਸਮ ਦੇ ਡੌਕੂਮੈਂਟ ਵੇਖਾਉਣ ਲਈ ਦਰਸ਼ਕ +Comment[pl]=Przeglądarka dla różnych typów dokumentów +Comment[pt]=Visualizador de vários tipos de documentos +Comment[pt_BR]=Visualizador para vários tipos de documentos +Comment[ro]=Vizualizor pentru diferite tipuri de documente +Comment[ru]=Программа для просмотра различных типов документов +Comment[sk]=Prehliadač pre rôzne typy dokumentov +Comment[sl]=Pregledovalnik raznih vrst dokumentov +Comment[sr]=Приказивач различитих врста докумената +Comment[sr@ijekavian]=Приказивач различитих врста докумената +Comment[sr@ijekavianlatin]=Prikazivač različitih vrsta dokumenata +Comment[sr@latin]=Prikazivač različitih vrsta dokumenata +Comment[sv]=Visningsprogram för diverse typer av dokument +Comment[tr]=Çeşitli belge türü için görüntüleyici +Comment[ug]=ھەر خىل تىپتىكى پۈتۈكلەرنى كۆرىدىغان پروگرامما +Comment[uk]=Програма для перегляду документів різних типів +Comment[x-test]=xxViewer for various types of documentsxx +Comment[zh_CN]=可以查看多种文档的工具 +Comment[zh_TW]=多種型態文件的檢視器 + +TryExec=kpackagelauncherqml -a org.kde.mobile.okular +Exec=kpackagelauncherqml -a org.kde.mobile.okular %u +Terminal=false +Icon=okular +Type=Application +Categories=Qt;KDE;Graphics;Office;Viewer; +InitialPreference=2 +NoDisplay=true +X-KDE-Keywords=Markdown diff --git a/generators/markdown/org.kde.okular-md.metainfo.xml b/generators/markdown/org.kde.okular-md.metainfo.xml new file mode 100644 --- /dev/null +++ b/generators/markdown/org.kde.okular-md.metainfo.xml @@ -0,0 +1,13 @@ + + + org.kde.okular-md + org.kde.okular.desktop + CC0-1.0 + GPL-2.0+ and GFDL-1.3 + Markdown + Adds support for reading Markdown documents + + text/markdown + + https://okular.kde.org + diff --git a/okular.categories b/okular.categories --- a/okular.categories +++ b/okular.categories @@ -5,6 +5,7 @@ org.kde.okular.generators.dvi.core Okular (Generator DVI/Core) org.kde.okular.generators.dvi.shell Okular (Generator DVI/Shell) org.kde.okular.generators.txt Okular (Generator TXT) +org.kde.okular.generators.md Okular (Generator Markdown) org.kde.kio.msits kioslave (kio_msits) org.kde.okular.generators.fax Okular (Generator Fax) org.kde.okular.generators.pdf Okular (Generator PDF)