Documentation de Zest Writer

Zest Writer est un éditeur hors-ligne de contenus au format zMarkdown. Il est l’outil idéal pour rédiger vos tutoriels, articles et tribunes sur le site Zeste de Savoir.

Présentation

Logo de ZestWriter (menu)

ZestWriter est un éditeur d’articles et de tutoriels fonctionnant hors-ligne. Il supporte la syntaxe zMarkdown, une version de Markdown utilisée sur le site Zeste de Savoir.

Pour connaitre l’historique du projet ou suivre son actualité, vous pouvez vous rendre sur le topic dédié sur le forum de Zeste de Savoir.

Interface

Général

  • différents thèmes proposés (clair, sombre, etc.) ;
_images/zw_dark_menu.png

Capture d’écran de la page d’accueil (thème sombre)

_images/zw_light_redaction.png

Capture d’écran de la zone de rédaction (thème clair)

Zone d’édition

  • boutons d’aide à la rédaction Markdown (gras, italique, blocs spéciaux, tableaux, listes, etc.).
Barre de boutons
  • possibilité de modifier la taille du texte et sa police ;

Zone de rendu

  • prévisualisation instantanée lors de la rédaction ;
  • décrochage de la zone de rendu dans une fenêtre externe afin de pouvoir la placer sur un écran séparé ;
Zone de rendu dans une fenêtre externe

Arbre de navigation des contenus (tutoriels ou articles)

  • navigation à travers les différents conteneurs ;
  • déplacement des conteneurs et des extraits par drag’n drop ;
  • édition des titres des extraits et conteneurs.
Arbre de navigation

Révision

  • proposition de corrections orthographiques, grammaticales et typographiques du contenu ;
Prosition de correction
  • indices de lisibilité des extraits pour améliorer leur lisibilité (Flesch et Gunning) ;
Indice de Flesch
  • compteur de mots et de caractères affichés en temps réel ;
  • graphiques de répartition du contenu dans les différents conteneurs.
Graphique de répartition du contenu

Synchronisation

  • possibilité de récupérer ses contenus depuis le site Zeste de Savoir ;
  • possibilité d’envoyer sur le site les modifications effectuées sur Zeste Writer.
Logo de Zeste de Savoir
  • possibilité de récupérer des contenus depuis un dépôt GitHub ;

Multiplateforme

  • L’application fonctionne sur Windows, Linux et OS X.

Licence

  • Le code du projet est sous licence GPL v3 ;
  • la documentation sous licence CC-BY-NC-SA ;
  • le logo et l’image de la page d’accueil sont sous licence CC-BY-NC-SA.

Installation

Windows

Téléchargez le setup (recommandé) ou l’executable correspondant à votre architecture (32 bits ou 64 bits) et lancez l’installateur. Un fichier setup lancera un installateur qui installera le programme dans le dossier approprié, tandis qu’un fichier exécutable contient l’ensemble du programme et peut être executé n’importe où.

Windows 32 bits Windows 64 bits
exécutable 32 bits exécutable 64 bits
setup 32 bits setup 64 bits

Note

Pour vérifier si votre ordinateur tourne sur une version 32 bits ou 64 bits de Windows, cliquez le bouton Windows, Ordinateur, puis Propriétés et regardez en dessous de Système.

Os X

Téléchargez la dernière version de Zest Writer via ce lien, puis installez le fichier dmg.

Linux

Debian, Ubuntu, etc.

Note

Pour une mise à jour, passez directement à l’étape 3.

  1. importez la clé GPG de bintray :

    sudo apt-key adv –keyserver hkp://keyserver.ubuntu.com:80 –recv-keys 379CE192D401AB61

  2. ajouter une nouvelle source :

    echo “deb https://dl.bintray.com/firm1/deb wheezy main” | sudo tee -a /etc/apt/sources.list.d/zestwriter.list

  3. mettez à jour vos dépôts :

    sudo apt-get update

  4. installez Zest Writer :

    sudo apt-get install zestwriter

Fedora, ArchLinux, CentOs, etc.

  1. Créez le fichier /etc/yum.repos.d/zestwriter.repo et copiez le contenu suivant à l’intérieur :
[zestwriter]
name=zestwriter
baseurl=http://dl.bintray.com/firm1/rpm
gpgcheck=0
enabled=1
  1. Installez Zest Writer en tapant yum install zestwriter.

Jar executable (tous les systèmes)

Les fichiers jar sont plus légers car ils n’embarquent pas la machine virtuelle Java, en revanche il est nécessaire que celle-ci soit au préalable installée sur votre système.

  1. Vérifier votre version de Java
    • ouvrez un terminal (Windows + R puis cmd sous Windows) et tapez java -version ;
    • si vous avez Java 1.7 ou antérieure, téléchargez la dernière version de Java depuis le site officiel ;
  2. téléchargez la dernière version de Zest Writer via ce lien ;

  3. ouvrez un terminal et lancez le jar en tapant java -jar zest-writer-all-x.y.z.jar (x.y.z étant le numéro de version).

Installation depuis les sources

  1. Vérifiez que vous utilisez une version du JDK supérieure ou égale à 1.8 :
    • ouvrez un terminal et tapez echo $JAVA_HOME (sous Linux et Mac) ou echo %JAVA_HOME% (sous Windows)
    • si votre JDK est inférieur à 1.8, téléchargez la dernière version depuis le site officiel ;
  2. installez Gradle :
    • via sudo apt-get install gradle (ou équivalent) ;
    • ou bien depuis le site officiel.
  3. téléchargez les sources :
  4. placez-vous dans le répertoire du projet (cd zest-writer) ;

  5. enfin, tapez dans un terminal :

    gradle build

Selon votre système d’exploitation, vous devriez retrouvez un .exe, un .deb, un .rpm ou un .dmg dans le dossier build/distributions.

Contribuer

Vous souhaitez contribuer au projet Zest Writer ? Vous êtes le bienvenu !

Il y a différents moyens d’apporter un petit coup de main.

Suggestions et rapports de bugs

Si vous trouvez un bug dans le logiciel, ou si vous souhaiter proposer des améliorations, cela nous aidera beaucoup. Il y a 2 moyens de le faire :

Concernant les rapports de bugs, ils doivent être les plus précis possible : - expliquez pas à pas toutes les étapes nécessaires pour permettre de reproduire l’erreur ; - si nécessaire, intégrez des images ; - donnez le stystème d’exploitation et la version de Zest Writer utilisés ; - joignez éventuellement le fichier de log de l’application (qui se trouve à la racine de votre dossier utilisateur).

Développement

Vous pouvez participer au développement, par exemple en proposant des Pull Requests pour des tickets en cours. Voir pour cela le Guide du développeur.

Guide du développeur

Outils utilisés

Code Java

Version de Java Java 8
Interface graphique JavaFX
Parseur Markdown Python-ZMarkdown [1]
Tests unitaires Junit 4.12
[1]Le même parseur qu’utilisé sur Zeste de Savoir (l’application émule un interpreteur Python grace à Jython).

Livraison continue

Intégration continue Linux et Os X Travis CI travisCI
Windows AppVeyor appVeyor
Couverture des tests Coveralls coverAlls
Vérification de dépendances VersionEye versionEye
Analyse du code OpenHub OpenHub
Sonar à venir
Publication de documentation ReadTheDocs ReadTheDocs

Workflow

Principe

Vous devez travailler sur une branche séparée de master, ensuite pousser vos modifications sur GitHub et faire votre Pull Request via l’interface web.

Guide pas à pas

  1. Forkez le projet sur GitHub en cliquant sur l’icône Fork en haut à droite ;
  2. sur la page de votre dépôt, cliquez sur le bouton Clone or download et copiez l’URL ;
  3. clonez votre propre dépôt : git clone url_de_votre_dépôt ;

Avertissement

Si votre projet local provient d’un clone du dépôt principal et non du votre, pensez à modifier la destitation de remote origin :

git remote set-url origin url_de_votre_dépôt

Vous pouvez ensuite vérifier avec git remote -v.

  1. buildez le projet, en suivant la partie Installation depuis les sources (sauf l’étape 3.) ;
  2. placez-vous sur une nouvelle branche : git checkout -b "new_feature" (new_feature étant généralement le nom de votre PR) ;

Note

Si vous avez déjà apporté vos modifications (non commitées) sur master, vous pouvez les remiser : git stash, git checkout -b "new_feature", puis git stash pop.

  1. apportez vos modifications en autant de commits que nécessaire (sans oublier de commenter votre code avec la Javadoc) ;

  2. vérifier que ces modifications passent les tests unitaires :

    gradle check

  3. poussez vos modification sur une branche distante dédiée : git push origin new_feature ;

  4. ensuite, revenez sur la page du dépôt principal et cliquez sur le bouton New pull request, puis décrivez celle-ci ;

  5. vérifiez, au bout de quelques minutes, que l’integration continue s’est bien passée (All checks have passed en commentaire de la PR).

    Le cas échéant, cliquez sur details au niveau de la vérification qui pose problème, analysez les logs, puis apportez vos modification et poussez-les sur votre branche (elle seront directement intégrée sur la PR).

  6. pensez à récupérer régulièrement les derniers changements effectués sur le dépôt principal : git fetch https://github.com/firm1/zest-writer depuis master ;

Astuce

Vous pouvez créer un git remote qui pointe vers le dépôt principal :

git remote add firm1 https://github.com/firm1/zest-writer

... ainsi vous n’aurez pas à taper l’URL du dépôt pour récupérer les derniers changements par exemple (ie, l’étape ci-dessus devient git fetch firm1).

Tests unitaires

À faire

Rédiger une documentation pour les tests unitaires (@firm1).

Documentation

Javadoc

Afin de générer la documentation technique, vous devez documenter dans votre code chaque conteneur (classe, interface, méthode, etc.) au moyen de commentaires Javadoc :

/**
Greet someone.
@param name The name of a person to greet.
@return The greeting.
*/
String greetings(String name) {
  return "Hello " + name;
}

Voici une liste des tags les plus courament utilisés :

@see reference Fournit un lien vers un autre élément de la documentation.
@param name description Décrit le paramètre name d’une méthode.
@return description Décrit la valeur de retour.
@throws exception description Décrit une exception qui peut être levée depuis cette méthode.

Documentation fonctionnelle et utilisateur

Les pages contenant de la documentation fonctionnelle ou utilisateur telle que celle-ci sont à rédiger en reStructuredText (reST).

Pour connaitre la syntaxe, vous pouvez vous référer :

Voici toutefois une cheatsheet minimaliste :

Rendu Syntaxe
italique
*italique*
gras
**gras**
code
``code``
lien externe
`lien externe <https://zestedesavoir.com/>`_
référence vers Javadoc
référence vers :ref:`Javadoc`

Configuration

Le fichier conf.py contient les paramètres pour générer la documentation. Voici ceux qui ont une importance pour la syntaxe :

  • language par défaut pour les blocs de code : shell ;

Extensions Sphinx

Sphinx permet d’ajouter des extensions <http://www.sphinx-doc.org/en/stable/extensions.html>`_ au processus de build : chacune d’elles peuvent modifier à peu près n’importe quel aspect du traitement des documents. Les extensions Sphinx utilisées pour générer cette documentations sont :

Ajouts spécifiques à Zest Writer

Le fichier conf.py a été modifié afin d’apporter quelques ajouts supplémentaires. Ceux listés ci-dessous ont un impact sur la syntaxe.

Fichier readme

Dans le fichier readme.rst à la racine du dépôt (fichier copié dans la documentation, partie Présentation), les balises .. no_rtd et .. rtd permetent respectivement de marquer le début et la fin d’une zone qui ne sera pas publiée dans la documentation.

Réécriture d’URL

Les URLs précédées de // ont le comportement suivant : - lorsque la documentation est générée en local, elles pointent vers la racine du projet ; - lorsque la documentation est sur ReadTheDocs, elles pointent vers le fichier correspondant sur le GitHub (en raw).

Ainsi, `licence <//LICENSE>`_ donne licence.

Générer la documentation

Installez les dépendances requises pour générer la documentation :

pip install sphinx javasphinx sphinx_rtd_theme

Avertissement

Assurez-vous d’avoir suivi la partie Installation depuis les sources avant de tenter de générer la documentation.

À la racine du projet, tapez simplement :

gradle doc

Note

En vous placant sur le dossier doc, vous pouvez également taper make et utiliser les nombreuses options disponibles (le gradle doc ci-dessus lance un make html).

La documentation apparaitra dans doc/build/html. Ouvrez le fichier index.html avec votre navigateur web pour la consulter.

Plugins pour l’application Zest-Writer

Il est possible de créer ses propres plugins pour l’application, grâce à une API que vous pouvez télécharger ici.

À faire

Compléter la documentation des plugins (@WinXaito).

Mise en place l’API

Sur IntelliJ

À faire

Rédiger une documentation pour la mise en place d’une API sur IntelliJ (@WinXaito).

Sur Eclipse

À faire

Rédiger une documentation pour la mise en place d’une API sur Eclipse (@WinXaito).

Création d’un plugin pour Zest Writer

Nous vous conseillons de télécharger les fichiers modèles, disponible pour IntelliJ ainsi que pour Eclipse.

Détail du fichier modèle

package com.winxaito.main;

import com.zestedesavoir.zestwriter.MainApp;
import com.zestedesavoir.zestwriter.contents.plugins.ZwPlugin;
import com.zestedesavoir.zestwriter.contents.plugins.ZwPluginVersion;

import java.util.ArrayList;

public class Main implements ZwPlugin{
    private MainApp mainApp;

    @Override
    public void onEnable(MainApp mainApp){
        System.out.println("[FROM PLUGIN] Enable plugin");
        this.mainApp = mainApp;
    }

    @Override
    public ArrayList<Class> getListener(){
        ArrayList<Class> listener = new ArrayList<>();
        listener.add(Main.class);

        return listener;
   }

    @Override
    public void onDisable(){
        System.out.println("[FROM PLUGIN] Disable plugin");
    }

    @Override
    public ZwPluginVersion getVersion(){
        return new ZwPluginVersion(0, 0, 0);
    }
}

La méthode onEnable

La méthode onEnable est appelée lors du lancement de l’application. Cette méthode prend en paramètre la classe MainApp (classe principale de l’application). C’est grâce à cette classe que nous pouvons modifier notre application.

La méthode getListener

La méthode getListener est également obligatoire, elle va retourner la liste des classes qui doivent être écoutées pour les différents événements de l’application. Pour ajouter une classe à écouter, il suffit d’ajouter la classe dans l’ArrayList, comme ceci :

listener.add(com.winxaito.main.events.WindowEvents.class);

La méthode onDisable

Cette méthode est appelée lors de l’arrêt de l’application.

La méthode getVersion

Cette méthode retourne la version du plugin.

Le système de version fonctionne ainsi :

  • Le premier chiffre correspond à une version majeure ;
  • le second à une modification mineure ;
  • le dernier servant de hotfix, pour corriger des petits bugs.

Note

Ce système de version n’est pas obligatoire, mais il est vivement conseillé de le suivre.

Javadoc

Cette documentation technique est générée à partir des commentaires présents sur le code source (cf. Javadoc).

Main

com.zestedesavoir.zestwriter

MainApp
public class MainApp extends Application
Fields
args
public static String[] args
config
public static Configuration config
defaultHome
public static File defaultHome
Constructors
MainApp
public MainApp()
Methods
exitApplication
public void exitApplication(ActionEvent event)
getConfig
public static Configuration getConfig()
getContents
public ObservableList<Content> getContents()
getContentsConfigPlugins
public static ContentsConfig getContentsConfigPlugins()
getContentsConfigThemes
public static ContentsConfig getContentsConfigThemes()
getExtracts
public ObservableMap<Textual, Tab> getExtracts()
getIndex
public MdTextController getIndex()
getMdUtils
public static Markdown getMdUtils()
getMenuController
public MenuController getMenuController()
getPluginsManager
public PluginsManager getPluginsManager()
getPrimaryStage
public static Stage getPrimaryStage()
getScene
public Scene getScene()
getZdsutils
public static ZdsHttp getZdsutils()
initConnection
public void initConnection()
initPlugins
public void initPlugins()
initRootLayout
public void initRootLayout()
main
public static void main(String[] args)
quitApp
public void quitApp()
showWriter
public void showWriter()
start
public void start(Stage primaryStage)

com.zestedesavoir.zestwriter.contents.internal

ContentsConfig
public class ContentsConfig
Constructors
ContentsConfig
public ContentsConfig(ContentsDialog.ContentType contentType)
Methods
addContents
public void addContents(ConfigType configType, ApiContentResponse contentResponse)
disableContent
public void disableContent()
enableContent
public void enableContent()
generateIndex
public void generateIndex(ConfigType configType)
getConfigFile
public File getConfigFile()
getConfigFileOfficial
public File getConfigFileOfficial()
getConfigJson
public ContentsConfigJson getConfigJson()
getConfigJsonOfficial
public ContentsConfigJson getConfigJsonOfficial()
isCorrupted
public boolean isCorrupted()
ContentsConfig.ConfigType
public enum ConfigType
Enum Constants
OFFICIAL
public static final ContentsConfig.ConfigType OFFICIAL
UNOFFICIAL
public static final ContentsConfig.ConfigType UNOFFICIAL
ContentsConfigDetailJson
public class ContentsConfigDetailJson
Constructors
ContentsConfigDetailJson
public ContentsConfigDetailJson()
Methods
getDescription
public String getDescription()
getDownload_url
public String getDownload_url()
getId
public int getId()
getName
public String getName()
getPlugin_url
public String getPlugin_url()
getUrl_id
public String getUrl_id()
getUser_name
public String getUser_name()
getVersion
public String getVersion()
isEnabled
public boolean isEnabled()
setDescription
public void setDescription(String description)
setDownload_url
public void setDownload_url(String download_url)
setEnabled
public void setEnabled(boolean enabled)
setId
public void setId(int id)
setName
public void setName(String name)
setPlugin_url
public void setPlugin_url(String plugin_url)
setUrl_id
public void setUrl_id(String url_id)
setUser_name
public void setUser_name(String user_name)
setVersion
public void setVersion(String version)
ContentsConfigJson
public class ContentsConfigJson
Constructors
ContentsConfigJson
public ContentsConfigJson()
Methods
addContent
public void addContent(ContentsConfigDetailJson content)
getContents
public ArrayList<ContentsConfigDetailJson> getContents()
setContents
public void setContents(ArrayList<ContentsConfigDetailJson> contents)
InternalMapper
public class InternalMapper
Constructors
InternalMapper
public InternalMapper(String json)
Methods
getContent
public ApiContentResponse getContent()

com.zestedesavoir.zestwriter.contents.plugins

Plugin
public class Plugin
Constructors
Plugin
public Plugin(MainApp mainApp, String name)
Plugin
public Plugin(MainApp mainApp, String name, Class plugin)
Methods
disable
public void disable()
enable
public void enable()
isEnabled
public boolean isEnabled()
method
public Object method(String method)
method
public Object method(String method, Object... value)
method
public Object method(String method, Class[] type, Object... value)
setEnabled
public void setEnabled(boolean enabled)
setName
public void setName(String name)
PluginException
public class PluginException extends Exception
Constructors
PluginException
public PluginException()
PluginException
public PluginException(String s)
PluginsLoader
public class PluginsLoader
Constructors
PluginsLoader
public PluginsLoader(MainApp mainApp)
Methods
getPlugins
public ArrayList<Plugin> getPlugins()
PluginsManager
public class PluginsManager
Constructors
PluginsManager
public PluginsManager(MainApp mainApp)
Methods
disablePlugins
public void disablePlugins()
enablePlugins
public void enablePlugins()
setPluginEditor
public void setPluginEditor(MdConvertController editor)
ZwPlugin
public interface ZwPlugin
Methods
getListener
ArrayList<Class> getListener()
getVersion
ZwPluginVersion getVersion()
onDisable
void onDisable()
onEnable
void onEnable(MainApp mainApp)
ZwPluginVersion
public class ZwPluginVersion
Constructors
ZwPluginVersion
public ZwPluginVersion()
ZwPluginVersion
public ZwPluginVersion(int majorIndice, int minorIndice)
ZwPluginVersion
public ZwPluginVersion(int majorIndice, int minorIndice, int hotFixIndice)
Methods
getHotFixIndice
public int getHotFixIndice()
getMajorIndice
public int getMajorIndice()
getMinorIndice
public int getMinorIndice()
setHotFixIndice
public void setHotFixIndice(int hotFixIndice)
setMajorIndice
public void setMajorIndice(int majorIndice)
setMinorIndice
public void setMinorIndice(int minorIndice)
toString
public String toString()

com.zestedesavoir.zestwriter.contents.plugins.app

AppEditorEvents
public class AppEditorEvents
Constructors
AppEditorEvents
public AppEditorEvents(ArrayList<Plugin> plugins)
Methods
setEditor
public static void setEditor(MdConvertController editor)
AppWindowEvents
public class AppWindowEvents
Constructors
AppWindowEvents
public AppWindowEvents(MainApp mainApp, ArrayList<Plugin> plugins)

com.zestedesavoir.zestwriter.contents.plugins.events

EditorEvents
public interface EditorEvents
Methods
onEditorPositionChange
void onEditorPositionChange(int oldPosition, int newPosition)

When caret position are changed

Paramètres:
  • oldPosition – Old value
  • newPosition – New value
onEditorTextChange
void onEditorTextChange(String oldText, String newText)

When text in textarea are changed

Paramètres:
  • oldText – Old value
  • newText – New Value
WindowEvents
public interface WindowEvents
Methods
onWindowCloseEvent
void onWindowCloseEvent()

Quand le fenêtre principale est fermé (Fermeture du programme)

onWindowFocusChangeEvent
void onWindowFocusChangeEvent(boolean oldValue, boolean newValue)

Quand le focus de la fenêtre change

Paramètres:
  • oldValue – Ancienne valeur
  • newValue – Nouvelle valeur
onWindowHeightResizeEvent
void onWindowHeightResizeEvent(int oldValue, int newValue)

Redimensionnement en hauteur de la fenêtre principale

Paramètres:
  • oldValue – Ancienne valeur
  • newValue – Nouvelle valeur
onWindowMaximizedChangeEvent
void onWindowMaximizedChangeEvent(boolean oldValue, boolean newValue)

Quand la fenêtre change l’état “Maximisé”

Paramètres:
  • oldValue – Ancienne valeur
  • newValue – Nouvelle valeur
onWindowWidthResizeEvent
void onWindowWidthResizeEvent(int oldValue, int newValue)

Redimensionnement en largeur de la fenêtre principale

Paramètres:
  • oldValue – Ancienne valeur
  • newValue – Nouvelle valeur

com.zestedesavoir.zestwriter.contents.plugins.menus

com.zestedesavoir.zestwriter.model

Container
public class Container extends MetaContent implements ContentNode
Constructors
Container
public Container(String object, String slug, String title, String introduction, String conclusion, List<MetaContent> children)
Methods
buildIcon
public MaterialDesignIconView buildIcon()
canTakeContainer
public boolean canTakeContainer(Content c)
canTakeExtract
public boolean canTakeExtract()
doOnTextual
public <R> Map<Textual, R> doOnTextual(Function<Textual, R> f)
equals
public boolean equals(Object obj)
exportContentToMarkdown
public String exportContentToMarkdown(int level, int levelDepth)
getChildren
public List<MetaContent> getChildren()
getConclusion
public Textual getConclusion()
getCountAncestorsContainer
public int getCountAncestorsContainer(Container content)

This function calculates the number of ancestors type content of a node. Attention, the node counts himself as his ancestor. For example if you calculate the ancestors of content from itself, the result is 1.

Paramètres:
  • content – root content
Retourne:

number of container-type ancestors

getCountChildrenExtract
public int getCountChildrenExtract()
getCountDescendantContainer
public int getCountDescendantContainer()

This function calculates the number of container-type descendants of the node.

Retourne:number of container-type descendants
getFilePath
public String getFilePath()
getIntroduction
public Textual getIntroduction()
getJsonConclusion
public String getJsonConclusion()
getJsonIntroduction
public String getJsonIntroduction()
isMoveableIn
public boolean isMoveableIn(ContentNode receiver, Content root)
setChildren
public void setChildren(List<MetaContent> children)
setConclusion
public void setConclusion(Textual conclusion)
setIntroduction
public void setIntroduction(Textual introduction)
toString
public String toString()
Content
public class Content extends Container implements ContentNode
Constructors
Content
public Content(String object, String slug, String title, String introduction, String conclusion, List<MetaContent> children, int version, String licence, String description, String type)
Methods
exportContentToMarkdown
public String exportContentToMarkdown(int level, int levelDepth)
getDepth
public int getDepth()
getDescription
public String getDescription()
getFilePath
public String getFilePath()
getLicence
public String getLicence()
getType
public String getType()
getVersion
public int getVersion()
isEditable
public boolean isEditable()
renameTitle
public void renameTitle(String newTitle)
saveToMarkdown
public void saveToMarkdown(File file)
setDescription
public void setDescription(String description)
setLicence
public void setLicence(String licence)
setType
public void setType(String type)
setVersion
public void setVersion(int version)
ContentNode
public interface ContentNode
Methods
buildIcon
MaterialDesignIconView buildIcon()
canDelete
boolean canDelete()
canTakeContainer
boolean canTakeContainer(Content c)
canTakeExtract
boolean canTakeExtract()
delete
void delete()
getFilePath
String getFilePath()
getTitle
String getTitle()
isEditable
boolean isEditable()
isMoveableIn
boolean isMoveableIn(ContentNode receiver, Content root)
renameTitle
void renameTitle(String title)
setTitle
void setTitle(String title)
Extract
public class Extract extends MetaContent implements Textual, ContentNode
Constructors
Extract
public Extract(String object, String slug, String title, String text)
Methods
buildIcon
public MaterialDesignIconView buildIcon()
doOnTextual
public <R> Map<Textual, R> doOnTextual(Function<Textual, R> f)
equals
public boolean equals(Object obj)
exportContentToMarkdown
public String exportContentToMarkdown(int level, int levelDepth)
getFilePath
public String getFilePath()
getMarkdown
public String getMarkdown()
getText
public String getText()
isMoveableIn
public boolean isMoveableIn(ContentNode receiver, Content root)
setMarkdown
public void setMarkdown(String markdown)
setText
public void setText(String text)
toString
public String toString()
License
public class License
Constructors
License
public License(String code, String label)
Methods
equals
public boolean equals(Object obj)
getCode
public String getCode()
getLabel
public String getLabel()
setCode
public void setCode(String code)
setLabel
public void setLabel(String label)
toString
public String toString()
MetaAttribute
public class MetaAttribute implements Textual, ContentNode
Constructors
MetaAttribute
public MetaAttribute(String _slug, String title)
Methods
buildIcon
public MaterialDesignIconView buildIcon()
equals
public boolean equals(Object obj)
getBasePath
public String getBasePath()
getFilePath
public String getFilePath()
getMarkdown
public String getMarkdown()
getParent
public Container getParent()
getRootContent
public Content getRootContent()
getSlug
public String getSlug()
getTitle
public String getTitle()
setBasePath
public void setBasePath(String basePath)
setMarkdown
public void setMarkdown(String markdown)
setRootContent
public void setRootContent(Content rootContent, String basePath)
setSlug
public void setSlug(String slug)
setTitle
public void setTitle(String title)
toString
public String toString()
MetaContent
public abstract class MetaContent
Constructors
MetaContent
public MetaContent(String object, String slug, String title)
Methods
canDelete
public boolean canDelete()
delete
public void delete()
doOnTextual
public abstract <R> Map<Textual, R> doOnTextual(Function<Textual, R> f)
exportContentToMarkdown
public abstract String exportContentToMarkdown(int level, int levelDepth)
getBasePath
public String getBasePath()
getFilePath
public abstract String getFilePath()
getObject
public String getObject()
getRootContent
public Content getRootContent()
getSlug
public String getSlug()
getTitle
public String getTitle()
setBasePath
public void setBasePath(String basePath)
setObject
public void setObject(String object)
setRootContent
public void setRootContent(Content rootContent, String basePath)
setSlug
public void setSlug(String slug)
setTitle
public void setTitle(String title)
MetadataContent
public class MetadataContent
Fields
id
String id
slug
String slug
type
String type
Constructors
MetadataContent
public MetadataContent(String id, String slug, String type)
Methods
equals
public boolean equals(Object obj)
getId
public String getId()
getSlug
public String getSlug()
getType
public String getType()
toString
public String toString()
Textual
public interface Textual
Methods
getFilePath
String getFilePath()
getMarkdown
String getMarkdown()
getRootContent
Content getRootContent()
getTitle
String getTitle()
loadMarkdown
void loadMarkdown()
readMarkdown
String readMarkdown()
save
void save()
setBasePath
void setBasePath(String basePath)
setMarkdown
void setMarkdown(String markdown)
setRootContent
void setRootContent(Content rootContent, String basePath)
TypeContent
public class TypeContent
Constructors
TypeContent
public TypeContent(String code, String label)
Methods
equals
public boolean equals(Object obj)
getCode
public String getCode()
getLabel
public String getLabel()
setCode
public void setCode(String code)
setLabel
public void setLabel(String label)
toString
public String toString()

com.zestedesavoir.zestwriter.utils

Configuration
public class Configuration
Fields
actions
public Properties actions
bundle
public static ResourceBundle bundle
conf
public Properties conf
Constructors
Configuration
public Configuration(String homeDir)
Methods
addActionProject
public void addActionProject(String projectFileName)
delActionProject
public void delActionProject(String projectFileName)
getActions
public List<String> getActions()
getAdvancedApiServerHost
public String getAdvancedApiServerHost()
getAdvancedApiServerPort
public String getAdvancedApiServerPort()
getAdvancedApiServerProtocol
public String getAdvancedApiServerProtocol()
getAdvancedServerHost
public String getAdvancedServerHost()
getAdvancedServerPort
public String getAdvancedServerPort()
getAdvancedServerProtocol
public String getAdvancedServerProtocol()
getAuthentificationPassword
public String getAuthentificationPassword()
getAuthentificationUsername
public String getAuthentificationUsername()
getContentsPath
public String getContentsPath()
getDefaultWorkspace
public static String getDefaultWorkspace()
getDisplayLang
public String getDisplayLang()
getDisplayTheme
public String getDisplayTheme()
getDisplayWindowHeight
public double getDisplayWindowHeight()
getDisplayWindowPositionX
public double getDisplayWindowPositionX()
getDisplayWindowPositionY
public double getDisplayWindowPositionY()
getDisplayWindowWidth
public double getDisplayWindowWidth()
getEditorFont
public String getEditorFont()
getEditorFontsize
public int getEditorFontsize()
getLastRelease
public static String getLastRelease()
getOfflineSaver
public StorageSaver getOfflineSaver()
getOnlineSaver
public StorageSaver getOnlineSaver()
getPandocProvider
public String getPandocProvider()
getProps
public Properties getProps()
getWorkspaceFactory
public LocalDirectoryFactory getWorkspaceFactory()
getWorkspacePath
public String getWorkspacePath()
isDisplayWindowMaximize
public boolean isDisplayWindowMaximize()
isDisplayWindowPersonnalDimension
public boolean isDisplayWindowPersonnalDimension()
isDisplayWindowPersonnalPosition
public boolean isDisplayWindowPersonnalPosition()
isEditorLinenoView
public boolean isEditorLinenoView()
isEditorRenderView
public boolean isEditorRenderView()
isEditorSmart
public boolean isEditorSmart()
isEditorToolbarView
public boolean isEditorToolbarView()
loadWorkspace
public void loadWorkspace()
resetAllOptions
public void resetAllOptions()
resetAuthentification
public void resetAuthentification()
saveActionFile
public void saveActionFile()
saveConfFile
public void saveConfFile()
setAdvancedApiServerHost
public void setAdvancedApiServerHost(String host)
setAdvancedApiServerPort
public void setAdvancedApiServerPort(String port)
setAdvancedApiServerProtocol
public void setAdvancedApiServerProtocol(String protocol)
setAdvancedServerHost
public void setAdvancedServerHost(String host)
setAdvancedServerPort
public void setAdvancedServerPort(String port)
setAdvancedServerProtocol
public void setAdvancedServerProtocol(String protocol)
setAuthentificationPassword
public void setAuthentificationPassword(String password)
setAuthentificationUsername
public void setAuthentificationUsername(String username)
setContentsPath
public void setContentsPath(String path)
setDisplayLang
public void setDisplayLang(String displayLang)
setDisplayTheme
public void setDisplayTheme(String displayTheme)
setDisplayWindowHeight
public void setDisplayWindowHeight(String windowWidth)
setDisplayWindowMaximize
public void setDisplayWindowMaximize(String maximize)
setDisplayWindowPersonnalPosition
public void setDisplayWindowPersonnalPosition(String standardPosition)
setDisplayWindowPositionX
public void setDisplayWindowPositionX(String windowWidth)
setDisplayWindowPositionY
public void setDisplayWindowPositionY(String windowWidth)
setDisplayWindowStandardDimension
public void setDisplayWindowStandardDimension(String standardDimension)
setDisplayWindowWidth
public void setDisplayWindowWidth(String windowWidth)
setEditorFont
public void setEditorFont(String font)
setEditorFontSize
public void setEditorFontSize(String fontSize)
setEditorLinenoView
public void setEditorLinenoView(boolean view)
setEditorRenderView
public void setEditorRenderView(boolean view)
setEditorSmart
public void setEditorSmart(String smart)
setEditorToolbarView
public void setEditorToolbarView(boolean view)
setWorkspacePath
public void setWorkspacePath(String path)
Configuration.ActionData
public enum ActionData
Enum Constants
LastProjects
public static final Configuration.ActionData LastProjects
Configuration.ConfigData
public enum ConfigData
Enum Constants
AdvancedApiServerHost
public static final Configuration.ConfigData AdvancedApiServerHost
AdvancedApiServerPort
public static final Configuration.ConfigData AdvancedApiServerPort
AdvancedApiServerProtocol
public static final Configuration.ConfigData AdvancedApiServerProtocol
AdvancedApiServerUri
public static final Configuration.ConfigData AdvancedApiServerUri
AdvancedServerHost
public static final Configuration.ConfigData AdvancedServerHost
AdvancedServerPort
public static final Configuration.ConfigData AdvancedServerPort
AdvancedServerProtocol
public static final Configuration.ConfigData AdvancedServerProtocol
AuthentificationPassword
public static final Configuration.ConfigData AuthentificationPassword
AuthentificationUsername
public static final Configuration.ConfigData AuthentificationUsername
ContentsPath
public static final Configuration.ConfigData ContentsPath
DisplayLang
public static final Configuration.ConfigData DisplayLang
DisplayTheme
public static final Configuration.ConfigData DisplayTheme
DisplayWindowHeight
public static final Configuration.ConfigData DisplayWindowHeight
DisplayWindowMaximize
public static final Configuration.ConfigData DisplayWindowMaximize
DisplayWindowPersonnalDimension
public static final Configuration.ConfigData DisplayWindowPersonnalDimension
DisplayWindowPersonnalPosition
public static final Configuration.ConfigData DisplayWindowPersonnalPosition
DisplayWindowPositionX
public static final Configuration.ConfigData DisplayWindowPositionX
DisplayWindowPositionY
public static final Configuration.ConfigData DisplayWindowPositionY
DisplayWindowWidth
public static final Configuration.ConfigData DisplayWindowWidth
EditorFont
public static final Configuration.ConfigData EditorFont
EditorFontSize
public static final Configuration.ConfigData EditorFontSize
EditorLinenoView
public static final Configuration.ConfigData EditorLinenoView
EditorRenderView
public static final Configuration.ConfigData EditorRenderView
EditorSmart
public static final Configuration.ConfigData EditorSmart
EditorToolbarView
public static final Configuration.ConfigData EditorToolbarView
WorkspacePath
public static final Configuration.ConfigData WorkspacePath
Corrector
public class Corrector
Constructors
Corrector
public Corrector()
Methods
HtmlToTextWithoutCode
public static String HtmlToTextWithoutCode(String htmlText)
checkHtmlContent
public String checkHtmlContent(String htmlContent)
checkHtmlContentToText
public String checkHtmlContentToText(String htmlContent, String source)
FlipTable
public final class FlipTable
Methods
of
public static String of(String[] headers, String[][] data)

Create a new table with the specified headers and row data.

toString
public String toString()
GithubHttp
public class GithubHttp
Fields
logger
static Logger logger
Methods
getGithubZipball
public static String getGithubZipball(String owner, String repo, String destFolder)
loadManifest
public static Content loadManifest(String folder, String owner, String repo)
unzipOnlineContent
public static File unzipOnlineContent(String zipFilePath, String destFolder)
Lang
public class Lang
Fields
langAvailable
public static List<Lang> langAvailable
Constructors
Lang
public Lang(Locale locale)
Methods
getLangFromCode
public static Lang getLangFromCode(String code)
getLocale
public Locale getLocale()
toString
public String toString()
LocalDirectoryFactory
public class LocalDirectoryFactory
Author:fdambrine
Constructors
LocalDirectoryFactory
public LocalDirectoryFactory(String baseDirectory)
Methods
getOfflineSaver
public LocalDirectorySaver getOfflineSaver()
getOnlineSaver
public LocalDirectorySaver getOnlineSaver()
getWorkspaceDir
public String getWorkspaceDir()
LocalDirectorySaver
public class LocalDirectorySaver implements StorageSaver
Author:fdambrine
Constructors
LocalDirectorySaver
public LocalDirectorySaver(String baseDirectory)
Methods
getBaseDirectory
public String getBaseDirectory()
Markdown
public class Markdown
Constructors
Markdown
public Markdown()
Methods
addHeaderAndFooter
public String addHeaderAndFooter(String content)
StorageSaver
public interface StorageSaver
Author:fdambrine
Methods
deleteFile
public static void deleteFile(File file)
getBaseDirectory
String getBaseDirectory()
Theme
public class Theme
Fields
themeAvailable
public static List<Theme> themeAvailable
Constructors
Theme
public Theme(String filename, String label)
Methods
getFilename
public String getFilename()
getLabel
public String getLabel()
getThemeFromFileName
public static Theme getThemeFromFileName(String filename)
toString
public String toString()
ZdsHttp
public class ZdsHttp
Constructors
ZdsHttp
public ZdsHttp(Configuration config)
Methods
authToGoogle
public void authToGoogle(List<HttpCookie> cookies, String login, String id)
downloaDraft
public void downloaDraft(String targetId, String type)
getContentListOnline
public List<MetadataContent> getContentListOnline()
getGalleryId
public String getGalleryId()
getId
public String getId(String homeConnectedContent)
getLocalSlug
public String getLocalSlug()
getLogin
public String getLogin()
getOfflineContentPathDir
public String getOfflineContentPathDir()
getOnlineContentPathDir
public String getOnlineContentPathDir()
importContent
public boolean importContent(String filePath, String targetId, String targetSlug, String msg)
importImage
public String importImage(File file)
importNewContent
public boolean importNewContent(String filePath, String msg)
initGalleryId
public void initGalleryId(String idContent, String slugContent)
initInfoOnlineContent
public void initInfoOnlineContent(String type)
isAuthenticated
public boolean isAuthenticated()
login
public boolean login(String login, String password)
logout
public void logout()
setGalleryId
public void setGalleryId(String galleryId)
setLocalSlug
public void setLocalSlug(String localSlug)
toSlug
public static String toSlug(String input)
unzipOnlineContent
public void unzipOnlineContent(String zipFilePath)

com.zestedesavoir.zestwriter.utils.api

ApiContentResponse
public class ApiContentResponse

Based on ZestWriter API [0.0.0] Schema: { “id”: 1, “name”: “Name”, “user”: { >>ApiUserResponse<< }, “official”: true, “validate”: true, “description”: “Description”, “version”: “0.0.0”, “downloads”: 0, “url_id”: “url_id”, “plugin_url”: “plugin_url”, “download_url”: “download_url” },

Constructors
ApiContentResponse
public ApiContentResponse()
Methods
getDescription
public String getDescription()
getDownload_url
public String getDownload_url()
getDownloads
public int getDownloads()
getId
public int getId()
getName
public String getName()
getPlugin_url
public String getPlugin_url()
getUrl_id
public String getUrl_id()
getUser
public ApiUserResponse getUser()
getVersion
public String getVersion()
isOfficial
public boolean isOfficial()
isValidate
public boolean isValidate()
setDescription
public void setDescription(String description)
setDownload_url
public void setDownload_url(String download_url)
setDownloads
public void setDownloads(int downloads)
setId
public void setId(int id)
setName
public void setName(String name)
setOfficial
public void setOfficial(boolean official)
setPlugin_url
public void setPlugin_url(String plugin_url)
setUrl_id
public void setUrl_id(String url_id)
setUser
public void setUser(ApiUserResponse user)
setValidate
public void setValidate(boolean validate)
setVersion
public void setVersion(String version)
toString
public String toString()
ApiContentsResponse
public class ApiContentsResponse

Based on ZestWriter API [0.0.0] Schema: “plugins”: [ { >>ApiContentResponse<< }, ]

Methods
getContents
public List<ApiContentResponse> getContents()
setContents
public void setContents(List<ApiContentResponse> contents)
ApiDownloader
public class ApiDownloader implements Runnable
Constructors
ApiDownloader
public ApiDownloader(ContentsDialog.ContentType contentType, String outputDirPath, URL urlContent, URL urlData)
ApiDownloader
public ApiDownloader(ContentsDialog.ContentType contentType, String outputDirPath, String urlStringContent, String urlStringData)
Methods
addListener
public void addListener(ApiDownloaderListener listener)
getContent
public ApiContentResponse getContent()
getContentType
public ContentsDialog.ContentType getContentType()
getDownloadedContent
public int getDownloadedContent()
getOutputContentFile
public File getOutputContentFile()
getOutputDataFile
public File getOutputDataFile()
getProgress
public float getProgress()
getSizeContent
public int getSizeContent()
getStatus
public Status getStatus()
getUrlContent
public URL getUrlContent()
getUrlData
public URL getUrlData()
initOwner
public void initOwner(Stage owner)
pause
public void pause()
resume
public void resume()
run
public void run()
setContent
public void setContent(ApiContentResponse content)
stop
public void stop()
ApiDownloader.Status
public enum Status
Enum Constants
CANCELLED
public static final ApiDownloader.Status CANCELLED
COMPLETE
public static final ApiDownloader.Status COMPLETE
DOWNLOAD
public static final ApiDownloader.Status DOWNLOAD
ERROR
public static final ApiDownloader.Status ERROR
PAUSE
public static final ApiDownloader.Status PAUSE
WAIT
public static final ApiDownloader.Status WAIT
ApiDownloaderListener
public interface ApiDownloaderListener
Methods
onDownloadCancelled
void onDownloadCancelled()
onDownloadError
void onDownloadError()
onDownloadPaused
void onDownloadPaused()
onDownloadResumed
void onDownloadResumed()
onDownloadSuccess
void onDownloadSuccess()
ApiInstaller
public class ApiInstaller implements Runnable
Constructors
ApiInstaller
public ApiInstaller(ContentsDialog.ContentType contentType, ApiContentResponse content, File fileContent, File fileData)
ApiInstaller
public ApiInstaller(ContentsDialog.ContentType contentType, ApiContentResponse content, String fileContentLocation, String fileDataLocation)
Methods
addListener
public void addListener(ApiInstallerListener listener)
run
public void run()
uninstall
public static boolean uninstall(ContentsDialog.ContentType contentType, File fileContent, File fileData)
ApiInstaller.Status
public enum Status
Enum Constants
ERROR
public static final ApiInstaller.Status ERROR
SUCCESS
public static final ApiInstaller.Status SUCCESS
ApiInstallerListener
public interface ApiInstallerListener
Methods
onInstallEnding
void onInstallEnding()
onInstallError
void onInstallError()
onInstallStarting
void onInstallStarting()
onInstallSuccess
void onInstallSuccess()
ApiMapper
public class ApiMapper
Constructors
ApiMapper
public ApiMapper(String json)
Methods
getContents
public ApiContentsResponse getContents()
ApiRequester
public class ApiRequester
Constructors
ApiRequester
public ApiRequester()
Methods
isApiOk
public boolean isApiOk()
request
public StringBuilder request(URL url, RequestMethod method)
setApiOk
public void setApiOk(boolean apiOk)
ApiRequester.RequestMethod
public enum RequestMethod
Enum Constants
DELETE
public static final ApiRequester.RequestMethod DELETE
GET
public static final ApiRequester.RequestMethod GET
POST
public static final ApiRequester.RequestMethod POST
PUT
public static final ApiRequester.RequestMethod PUT
ApiUserResponse
public class ApiUserResponse

Based on ZestWriter API [0.0.0] Schema: “user”: { id: 1, name: “Unknown }

Methods
getId
public int getId()
getName
public String getName()
setId
public void setId(int id)
setName
public void setName(String name)

com.zestedesavoir.zestwriter.utils.readability

Readability
public class Readability

Implements various readability indexes http://code.google.com/p/panos-ipeirotis/source/browse/trunk/src/com/ipeirotis/readability/?r=2

Author:Panos Ipeirotis
Fields
characters
Integer characters
complex
Integer complex
sentences
Integer sentences
syllables
Integer syllables
words
Integer words
Constructors
Readability
public Readability(String text)
Methods
getARI
public Double getARI()

http://en.wikipedia.org/wiki/Automated_Readability_Index

Retourne:the Automated Readability Index for text
getCharacters
public Integer getCharacters()
getColemanLiau
public Double getColemanLiau()

http://en.wikipedia.org/wiki/Coleman-Liau_Index

Retourne:The Coleman-Liau_Index value for the text
getFleschKincaidGradeLevel
public Double getFleschKincaidGradeLevel()

http://en.wikipedia.org/wiki/Flesch-Kincaid_Readability_Test

Retourne:Returns the Flesch-Kincaid_Readability_Test value for the text
getFleschReadingEase
public Double getFleschReadingEase()

http://en.wikipedia.org/wiki/Flesch-Kincaid_Readability_Test

Retourne:Returns the Flesch_Reading Ease value for the text
getGunningFog
public double getGunningFog()

http://en.wikipedia.org/wiki/Gunning-Fog_Index

Retourne:the Gunning-Fog Index for text
getSMOG
public Double getSMOG()

http://en.wikipedia.org/wiki/SMOG

Retourne:Retugns the SMOG value for the text
getSMOGIndex
public Double getSMOGIndex()

http://en.wikipedia.org/wiki/SMOG_Index

Retourne:The SMOG index of the text
getSentences
public Integer getSentences()
getSyllables
public Integer getSyllables()
getWords
public Integer getWords()
SentenceExtractor
public class SentenceExtractor

Use SentenceModel to find sentence boundaries in text

Fields
SENTENCE_MODEL
final SentenceModel SENTENCE_MODEL
TOKENIZER_FACTORY
final TokenizerFactory TOKENIZER_FACTORY
Methods
getSentences
public String[] getSentences(String text)
Syllabify
public class Syllabify
Author:Panos Ipeirotis Java Code to estimate the number of syllables in a word. Translation of the Perl code by Greg Fast, found at: http://search.cpan.org/author/GREGFAST/Lingua-EN-Syllable-0.251/ For documentation and comments http://search.cpan.org/src/GREGFAST/Lingua-EN-Syllable-0.251/Syllable.pm
Fields
AddSyl
static String[] AddSyl
SubSyl
static String[] SubSyl
Methods
syllable
public static int syllable(String word)
Utilities
public class Utilities
Methods
cleanLine
public static String cleanLine(String line)
round
public static Double round(double d, int decimalPlace)

com.zestedesavoir.zestwriter.view

MdConvertController
public class MdConvertController
Fields
recognizeBullet
public static final Pattern recognizeBullet
recognizeNumber
public static final Pattern recognizeNumber
Constructors
MdConvertController
public MdConvertController()
Methods
HandleGoToLineAction
public void HandleGoToLineAction()
HandleSaveButtonAction
public void HandleSaveButtonAction(ActionEvent event)
getHScrollValue
public int getHScrollValue(WebView view)

Returns the horizontal scroll value, i.e. thumb position. This is equivalent to javafx.scene.control.ScrollBar.getValue().

Paramètres:
  • view
Retourne:

horizontal scroll value

getMdBox
public MdTextController getMdBox()
getSourceText
public StyleClassedTextArea getSourceText()
getVScrollValue
public int getVScrollValue(WebView view)

Returns the vertical scroll value, i.e. thumb position. This is equivalent to javafx.scene.control.ScrollBar.getValue().

Paramètres:
  • view – web view that shall be scrolled
Retourne:

vertical scroll value

initStats
public void initStats()
isSaved
public boolean isSaved()
markdownToHtml
public String markdownToHtml(String chaine)
performStats
public void performStats()
scrollTo
public void scrollTo(WebView view, int x, int y)

Scrolls to the specified position.

Paramètres:
  • view – web view that shall be scrolled
  • x – horizontal scroll value
  • y – vertical scroll value
setMdBox
public void setMdBox(MdTextController mdBox, Textual extract, Tab tab)
setSaved
public void setSaved(boolean isSaved)
updateRender
public void updateRender()
MdTextController
public class MdTextController
Fields
pythonStarted
public static boolean pythonStarted
treePane
public AnchorPane treePane
Constructors
MdTextController
public MdTextController()
Methods
closeCurrentTab
public void closeCurrentTab()
createTabExtract
public void createTabExtract(Textual extract)
getEditorList
public TabPane getEditorList()
getMainApp
public MainApp getMainApp()
getPyconsole
public PythonInterpreter getPyconsole()
getSplitPane
public SplitPane getSplitPane()
getSummary
public TreeView<ContentNode> getSummary()
getThis
public MdTextController getThis()
loadConsolePython
public void loadConsolePython()
loadFonts
public void loadFonts()
openContent
public void openContent(Content content)
refreshRecentProject
public void refreshRecentProject()
setMainApp
public void setMainApp(MainApp mainApp)
setPyconsole
public void setPyconsole(PythonInterpreter pyconsole)
switchTabTo
public void switchTabTo(boolean right)
TableController
public class TableController
Methods
setEditor
public void setEditor(MdConvertController editorController)
toString
public String toString()
ZRow
class ZRow
Constructors
ZRow
public ZRow()
ZRow
public ZRow(int n)
ZRow
public ZRow(ObservableList<String> row)
Methods
getRow
public List<String> getRow()
setRow
public void setRow(ObservableList<String> row)

com.zestedesavoir.zestwriter.view.com

CustomAlert
public class CustomAlert extends Alert
Constructors
CustomAlert
public CustomAlert(AlertType alertType)
CustomAlert
public CustomAlert(AlertType alertType, String contentText, ButtonType... buttons)
CustomDialog
public class CustomDialog<T> extends Dialog<T>
Constructors
CustomDialog
public CustomDialog()
CustomFXMLLoader
public class CustomFXMLLoader extends FXMLLoader
Constructors
CustomFXMLLoader
public CustomFXMLLoader(URL location)
Methods
load
public <T> T load()
CustomStage
public class CustomStage extends Stage
Constructors
CustomStage
public CustomStage(FXMLLoader loader, String title)
CustomStage
public CustomStage(String title)
CustomStyledClassedTextArea
public class CustomStyledClassedTextArea extends StyleClassedTextArea
Constructors
CustomStyledClassedTextArea
public CustomStyledClassedTextArea()
Methods
nextWord
public void nextWord(org.fxmisc.richtext.NavigationActions.SelectionPolicy selectionPolicy)
previousWord
public void previousWord(org.fxmisc.richtext.NavigationActions.SelectionPolicy selectionPolicy)
FunctionTreeFactory
public class FunctionTreeFactory
Methods
OpenFindReplaceDialog
public static void OpenFindReplaceDialog(MainApp mainApp, StyleClassedTextArea sourceText)
addTheming
public static void addTheming(Pane pane)
buildChild
public static TreeItem<ContentNode> buildChild(TreeItem<ContentNode> node)
changeLocationImages
public static String changeLocationImages(String text)
clearContent
public static void clearContent(ObservableMap<Textual, Tab> extracts, TabPane editorList, Supplier<Void> doAfter)
getContainerOfMetaAttribute
public static Container getContainerOfMetaAttribute(Container c, MetaAttribute meta)
getUniqueDirPath
public static String getUniqueDirPath(String path)
getUniqueFilePath
public static String getUniqueFilePath(String path, String ext)
initContentDialog
public static Map<String, Object> initContentDialog(Content defaultContent)
isMacOs
public static boolean isMacOs()
moveToContainer
public static void moveToContainer(TreeItem<ContentNode> dest, TreeItem<ContentNode> src)
offsetHeaderMarkdown
public static String offsetHeaderMarkdown(String text, int level)
padding
public static String padding(int number)
switchContent
public static void switchContent(Content content, ObservableList<Content> contents)
IconFactory
public class IconFactory
Methods
createAddFolderIcon
public static MaterialDesignIconView createAddFolderIcon()
createArrowDownIcon
public static MaterialDesignIconView createArrowDownIcon()
createCodeIcon
public static MaterialDesignIconView createCodeIcon()
createContentIcon
public static MaterialDesignIconView createContentIcon(String type)
createDeleteIcon
public static MaterialDesignIconView createDeleteIcon()
createEditIcon
public static MaterialDesignIconView createEditIcon()
createFileBlankIcon
public static MaterialDesignIconView createFileBlankIcon()
createFileIcon
public static MaterialDesignIconView createFileIcon()
createFolderIcon
public static MaterialDesignIconView createFolderIcon()
createGoogleIcon
public static MaterialDesignIconView createGoogleIcon()
createLinkIcon
public static MaterialDesignIconView createLinkIcon()
createLoginIcon
public static MaterialDesignIconView createLoginIcon()
createRemoveIcon
public static MaterialDesignIconView createRemoveIcon()
createStatsHistoIcon
public static MaterialDesignIconView createStatsHistoIcon()
createStatsIcon
public static MaterialDesignIconView createStatsIcon()
createStatsPieIcon
public static MaterialDesignIconView createStatsPieIcon()
makeIcon
public static MaterialDesignIconView makeIcon(MaterialDesignIcon type, String cssClass)
MdTreeCell
public class MdTreeCell extends TreeCell<ContentNode>
Constructors
MdTreeCell
public MdTreeCell(MdTextController index)
Methods
initContextMenu
public void initContextMenu(ContentNode item)
saveManifestJson
public void saveManifestJson()
updateItem
protected void updateItem(ContentNode item, boolean empty)

com.zestedesavoir.zestwriter.view.dialogs

AboutDialog
public class AboutDialog
Methods
setMainApp
public void setMainApp(MainApp mainApp)
BaseDialog
public class BaseDialog<T> extends CustomDialog<T>
Constructors
BaseDialog
public BaseDialog(String title)
BaseDialog
public BaseDialog(String title, String header)
Methods
getGridPane
public GridPane getGridPane()
setGridPane
public void setGridPane(GridPane gridPane)
ContentsDialog
public class ContentsDialog implements ApiDownloaderListener, ApiInstallerListener
Methods
onDownloadError
public void onDownloadError()
onDownloadSuccess
public void onDownloadSuccess()
onInstallError
public void onInstallError()
onInstallSuccess
public void onInstallSuccess()
setWindow
public void setWindow(Stage window)
ContentsDialog.ContentType
public enum ContentType
Enum Constants
PLUGIN
public static final ContentsDialog.ContentType PLUGIN
THEME
public static final ContentsDialog.ContentType THEME
EditContentDialog
public class EditContentDialog extends BaseDialog<Pair<String, Map<String, Object>>>
Fields
licOptions
public static ObservableList<License> licOptions
typeOptions
public static ObservableList<TypeContent> typeOptions
Constructors
EditContentDialog
public EditContentDialog(Content defaultContent)
FindReplaceDialog
public class FindReplaceDialog
Methods
setMainApp
public void setMainApp(MainApp mainApp)
setSourceText
public void setSourceText(StyleClassedTextArea sourceText)
setWindow
public void setWindow(Stage window)
GoogleLoginDialog
public class GoogleLoginDialog extends CustomDialog<Pair<String, String>>
Constructors
GoogleLoginDialog
public GoogleLoginDialog(LoginDialog parent)
Methods
getThis
public GoogleLoginDialog getThis()
ImageInputDialog
public class ImageInputDialog
Methods
setSourceText
setStage
public void setStage(Stage stage)
LoginDialog
public class LoginDialog extends BaseDialog<Pair<String, String>>
Constructors
LoginDialog
public LoginDialog(Button googleButton)
MdCheatSheetDialog
public class MdCheatSheetDialog
Constructors
MdCheatSheetDialog
public MdCheatSheetDialog()
OptionsDialog
public class OptionsDialog
Methods
setMainApp
public void setMainApp(MainApp mainApp)
setWindow
public void setWindow(Stage window)

com.zestedesavoir.zestwriter.view.task

CorrectionService
public class CorrectionService extends Service<String>
Constructors
CorrectionService
public CorrectionService(MdTextController mdText)
Methods
createTask
protected Task<String> createTask()
DownloadContentService
public class DownloadContentService extends Service<Void>
Methods
createTask
protected Task<Void> createTask()
DownloadGithubService
public class DownloadGithubService extends Service<Content>
Fields
logger
Logger logger
offlineFolder
String offlineFolder
onlineFolder
String onlineFolder
url
String url
Constructors
DownloadGithubService
public DownloadGithubService(String url, String offlineFolder, String onlineFolder)
Methods
createTask
protected Task<Content> createTask()
ExportPdfService
public class ExportPdfService extends Service<Void>
Fields
post
HttpPost post
Constructors
ExportPdfService
public ExportPdfService(String urlProvider, Content content, File fileDest)
Methods
createTask
protected Task<Void> createTask()
getMarkdownFile
public File getMarkdownFile()
getThis
public Service<Void> getThis()
LoginService
public class LoginService extends Service<Void>
Constructors
LoginService
public LoginService(String username, String password)
LoginService
public LoginService()
Methods
createTask
protected Task<Void> createTask()
getPassword
public String getPassword()
getUsername
public String getUsername()
setPassword
public void setPassword(String password)
setUsername
public void setUsername(String username)
UploadContentService
public class UploadContentService extends Service<Void>
Constructors
UploadContentService
public UploadContentService(Optional<Pair<String, MetadataContent>> result, Content content)
Methods
createTask
protected Task<Void> createTask()
UploadImageService
public class UploadImageService extends Service<String>
Constructors
UploadImageService
public UploadImageService(Content content, File imageFile)
Methods
createTask
protected Task<String> createTask()
getContentFromSlug
public MetadataContent getContentFromSlug()

Test

default_package

TestApiZds
public class TestApiZds
Methods
setUp
public void setUp()
tearDown
public void tearDown()
testLogin
public void testLogin()
TestConfig
public class TestConfig
Fields
TEST_DIR
public static final File TEST_DIR
config
Configuration config
Methods
setUp
public void setUp()
tearDown
public void tearDown()
testActions
public void testActions()
testConfiguration
public void testConfiguration()
testRelease
public void testRelease()
TestCorrect
public class TestCorrect
Fields
corrector
Corrector corrector
Methods
setUp
public void setUp()
testEscapeCodeAcceptIfInMarkup
public void testEscapeCodeAcceptIfInMarkup()
testEscapeCodeAcceptNotInMarkupButRejectWhenOut
public void testEscapeCodeAcceptNotInMarkupButRejectWhenOut()
testEscapeCodeRejectIfNotInMarkup
public void testEscapeCodeRejectIfNotInMarkup()
testEscapeItalic
public void testEscapeItalic()
testOrtho
public void testOrtho()
TestLang
public class TestLang
Methods
testKeyLang
public void testKeyLang()
TestModel
public class TestModel
Fields
chapter11
Container chapter11
chapter12
Container chapter12
chapter13
Container chapter13
chapter14
Container chapter14
chapter15
Container chapter15
chapter16
Container chapter16
chapter17
Container chapter17
chapter21
Container chapter21
chapter31
Container chapter31
content
Content content
extract111
Extract extract111
extract112
Extract extract112
extract113
Extract extract113
extract211
Extract extract211
extract212
Extract extract212
part1
Container part1
part2
Container part2
part3
Container part3
Methods
setUp
public void setUp()
testCountContainerAndExtract
public void testCountContainerAndExtract()
testCreateBigTuto
public void testCreateBigTuto()
testDeletable
public void testDeletable()
testEditable
public void testEditable()
testExport
public void testExport()
testGenericTextual
public void testGenericTextual()
testImport
public void testImport()
testLicense
public void testLicense()
testMetaDataContent
public void testMetaDataContent()
testMoves
public void testMoves()
testRecept
public void testRecept()
testTypeContent
public void testTypeContent()
TestStatsText
public class TestStatsText
Fields
text
String text
Methods
checkIndex
public void checkIndex()
setUp
public void setUp()
testBasicStatistics
public void testBasicStatistics()
TestUtils
public class TestUtils
Methods
setUp
public void setUp()
testCorrectorTextToHtml
public void testCorrectorTextToHtml()
testFlipTable
public void testFlipTable()
testGetCorrectableText
public void testGetCorrectableText()
testHTMLHeaderAndFooter
public void testHTMLHeaderAndFooter()

À faire

À faire

Rédiger une documentation pour les tests unitaires (@firm1).

(L’entrée originale se trouve dans /home/docs/checkouts/readthedocs.org/user_builds/roipoussiere-zest-writer/checkouts/latest/doc/build/rst/dev_guide.rst, à la ligne 109.)

À faire

Compléter la documentation des plugins (@WinXaito).

(L’entrée originale se trouve dans /home/docs/checkouts/readthedocs.org/user_builds/roipoussiere-zest-writer/checkouts/latest/doc/build/rst/plugins.rst, à la ligne 7.)

À faire

Rédiger une documentation pour la mise en place d’une API sur IntelliJ (@WinXaito).

(L’entrée originale se trouve dans /home/docs/checkouts/readthedocs.org/user_builds/roipoussiere-zest-writer/checkouts/latest/doc/build/rst/plugins.rst, à la ligne 16.)

À faire

Rédiger une documentation pour la mise en place d’une API sur Eclipse (@WinXaito).

(L’entrée originale se trouve dans /home/docs/checkouts/readthedocs.org/user_builds/roipoussiere-zest-writer/checkouts/latest/doc/build/rst/plugins.rst, à la ligne 22.)