QOwnNotesQOwnNotes
شروع
نصب
  • Ask question
  • Ask for feature
  • Report bug
  • Telegram Channel
  • Matrix/Element.io Room
  • Gitter Chat
  • IRC Channel
  • Mastodon
  • Twitter
  • Facebook
حمایت مالی
  • English
  • Deutsch
  • Italiano
  • Français
  • Español
  • فارسی
  • Nederlands
  • Magyar
  • العربية
  • Polski
  • 한국어
GitHub
شروع
نصب
  • Ask question
  • Ask for feature
  • Report bug
  • Telegram Channel
  • Matrix/Element.io Room
  • Gitter Chat
  • IRC Channel
  • Mastodon
  • Twitter
  • Facebook
حمایت مالی
  • English
  • Deutsch
  • Italiano
  • Français
  • Español
  • فارسی
  • Nederlands
  • Magyar
  • العربية
  • Polski
  • 한국어
GitHub
  • شروع

    • مرور کلی
    • مفاهیم
    • حالت نمایشی QOwnNotes
    • مارک داون
    • وارد کردن یادداشت ها
    • پارامترهای رابط خط فرمان
    • افزونه مرورگر همراه وب QOwnNotes
    • مدیر تکه کد خط فرمان
    • برنامه تحت وب QOwnNotes
    • برنامه نکست کلود QOwnNotesAPI
    • Note relations panel
    • جستجوی یادداشت ها
    • میانبرها
    • Git versioning
  • نصب

    • نصب
    • نصب در لینوکس اوبونتو، المنتری او اس و لینوکس مینت
    • نصب سیستم عامل ویندوز مایکروسافت
    • نصب در سیستم عامل مکینتاش
    • نصب در لینوکس دبیان
    • نصب در لینوکس اوپن سوزه
    • نصب در لینوکس فدورا
    • Install as Snap
    • نصب به صورت فلت پک
    • نصب به صورت AppImage
    • Install via Nix
    • نصب در آرچ لینوکس
    • نصب در سولوس
    • نصب در لینوکس KaOS
    • نصب در سنت او اس لینوکس
    • نصب در سیستم عامل رزبری پای
    • نصب در جنتو لینوکس
    • نصب در فانتو لینوکس
    • نصب در ووید لینوکس
    • نصب در لینوکس اسلکویر
    • نصب در FreeBSD
    • ساخت QOwnNotes
  • ویرایشگر

    • غلط یابی
    • AI support
    • قالب های زمانی:
  • اسکریپت نویسی

    • اسکریپت نویسی در QOwnNotes
    • روش ها و اهدافی که QOwnNotes فراهم می کند
    • هوک ها
    • کلاس های آشکار
  • مشارکت

    • در حال مشارکت
    • کد اجرا
    • نگهدارنده ها
    • ترجمه
    • کمک مالی
    • حامیان مالی
  • سوالات متداول

    • چطور می توانم پنل پیش نمایش را دقیقاً بدون پنل ویرایش یادداشت نشان دهم؟
    • آنچه که دیگران در مورد QOwnNotes گفته اند را کجا می توانم پیدا کنم؟
    • چرا سنجه ها؟
  • وبلاگ (به انگلیسی)

    • /fa/blog/
    • /fa/blog/2025-07-22-Universal-binary-for-macOS.html
    • /fa/blog/2025-03-14-Note-relations-panel.html
    • /fa/blog/2024-05-17-AI-support-was-added-to-QOwnNotes.html
    • /fa/blog/2023-07-12-Source-Archive-switched-from-TuxFamily-to-GitHub-Releases.html
    • /fa/blog/2023-06-17-Nextcloud-Deck-integration-in-QOwnNotes.html
    • /fa/blog/2023-06-17-QOwnNotes-UI-End2End-Tests-with-the-help-of-NixOS.html
    • /fa/blog/2023-02-03-Test-Qt6-version-of-QOwnNotes-from-a-new-PPA-for-Ubuntu-Linux.html
    • /fa/blog/2023-01-29-Evernote-import-for-huge-files.html
    • /fa/blog/2022-12-06-Happy-1000th-release-of-QOwnNotes.html
    • /fa/blog/2022-10-15-Polish-website-translation.html
    • /fa/blog/2022-07-28-Working-with-multiple-notes.html
    • /fa/blog/2021-11-23-QOwnNotes-command-line-snippet-manager.html
    • /fa/blog/2021-11-15-Nextcloud-note-versions.html
    • /fa/blog/2021-11-11-Manage-orphaned-image-files-and-attachments.html
    • /fa/blog/2021-10-25-Linking-of-note-headings.html
    • /fa/blog/2021-08-31-Tor-Hidden-Service-Webpage.html
    • /fa/blog/2021-08-25-Use-workspaces-to-manage-different-kayouts-of-the-user-interface.html
    • /fa/blog/2021-08-25-Auto-complete-in-note-editor.html
    • /fa/blog/2021-08-22-Open-links-in-the-note-editor.html
    • /fa/blog/2021-08-21-Solve-simple-equations-in-the-note-editor.html
    • /fa/blog/2021-08-21-Auto-format-markdown-tables.html
    • /fa/blog/2021-08-20-QOwnNotes-Mastodon-page.html
    • /fa/blog/2021-08-20-Repository-for-Debian-11.html
    • /fa/blog/2021-07-18-Joplin-import.html
    • /fa/blog/2021-05-02-Send-photos-from-your-mobile-phone-to-QOwnNotes-on-the-desktop.html
    • /fa/blog/2021-01-28-Four-new-languages-added-to-the-website.html
    • /fa/blog/2021-01-16-QOwnNotes-Demo.html
    • /fa/blog/2020-11-10-Markdown-explanation.html
    • /fa/blog/2020-11-10-Webpage-translation.html
    • /fa/blog/2020-11-08-QOwnNotes-for-Ubuntu-21.04-Hirsute-Hippo.html
    • /fa/blog/2020-10-27-QOwnNotes-for-Fedora-33.html
    • /fa/blog/2020-10-26-Release-and-blog-posting-automation.html
    • /fa/blog/2020-10-26-Legacy-update-service-up-again.html
    • /fa/blog/2020-10-23-RSS-Feeds-are-back-in-place.html
    • /fa/blog/2019-08-12-Time-Flies-Podcast-episode-with-interview-about-QOwnNotes.html
    • /fa/blog/2019-01-16-Bookmark-management-with-QOwnNotes-and-Web-Companion-browser-extension.html
    • /fa/blog/2019-01-09-Firefox-extension-on-Firefox-Add-ons-page.html
    • /fa/blog/2018-12-31-Chrome-extension-in-Chrome-Web-Store.html
    • /fa/blog/2018-12-27-QOwnNotes-Web-Companion-Chrome-extension.html
    • /fa/blog/2018-12-23-500th-release-of-QOwnNotes.html
    • /fa/blog/2018-10-05-QOwnNotes-Telegram-Group.html
    • /fa/blog/2018-08-07-Vim-mode.html
    • /fa/blog/2018-03-29-QOwnNotes-for-openSUSE-Leap-15-SUSE-Linux-Enterprise-15-and-SUSE-Linux-Enterprise-12-SP3.html
    • /fa/blog/2018-01-11-QOwnNotes-featured-on-LINUX-Unplugged-podcast-and-by-Ubuntu.html
    • /fa/blog/2017-12-12-Interview-for-ownCloud.html
    • /fa/blog/2017-11-24-QOwnNotes-for-Fedora-27.html
    • /fa/blog/2017-10-01-QOwnNotes-reviewed-in-German-magazine-c't.html
    • /fa/blog/2017-07-05-QOwnNotesAPI-in-the-ownCloud-Marketplace.html
    • /fa/blog/2017-07-03-QOwnNotes-as-AppImage.html
    • /fa/blog/2017-06-26-QOwnNotes-for-Debian-9.0-Fedora-26-and-openSUSE-Leap-42.3.html
    • /fa/blog/2017-05-19-Script-repository-and-script-settings-variables.html
    • /fa/blog/2016-12-20-Fedora-25-release-and-new-documentation-page.html
    • /fa/blog/2016-11-23-Solus-package-for-QOwnNotes.html
    • /fa/blog/2016-11-05-Automatic-updates-in-Windows-and-macOS.html
    • /fa/blog/2016-10-02-Note-encryption-with-keybase.io-or-directly-with-PGP.html
    • /fa/blog/2016-09-24-Evernote-import.html
    • /fa/blog/2016-09-18-Portable-mode.html
    • /fa/blog/2016-09-05-QOwnNotes-on-webupd8.org.html
    • /fa/blog/2016-07-12-QOwnNotes-featured-on-the-Linux-Voice-Podcast.html
    • /fa/blog/2016-07-12-QOwnNotes-snap.html
    • /fa/blog/2016-07-11-QOwnNotes-review-in-British-magazine-Linux-Format.html
    • /fa/blog/2016-06-27-QOwnNotes-Slackware-Linux-Repository.html
    • /fa/blog/2016-06-22-QOwnNotes-review.html
    • /fa/blog/2016-05-25-QOwnNotes-IRC.html
    • /fa/blog/2016-05-13-QOwnNotes-now-has-scripting-support.html
    • /fa/blog/2016-03-28-QOwnNotes-is-the-Desktop-App-Pick-on-the-Linux-Action-Show.html
    • /fa/blog/2016-03-25-QOwnNotes-got-featured-in-Linux-Voice-25.html
    • /fa/blog/2016-03-01-QOwnNotes-Gentoo-Linux-Overlay.html
    • /fa/blog/2016-02-26-Translate-QOwnNotes-on-Crowdin.html
    • /fa/blog/2016-02-14-QOwnNotes-1.0-out-now-in-6-languages-and-with-Freedesktop-theme-icons-support.html
    • /fa/blog/2016-01-31-QOwnNotes-software-repository-for-Debian-Linux.html
    • /fa/blog/2016-01-30-QOwnNotes-package-on-the-Arch-User-Repository.html
    • /fa/blog/2016-01-27-QOwnNotes-software-repository-for-Arch-Linux.html
    • /fa/blog/2016-01-26-Webpage-redesign.html
    • /fa/blog/2016-01-13-Qt-widget-QMarkdownTextEdit-now-a-separate-project-for-developer's-pleasure.html
    • /fa/blog/2016-01-09-New-release-version-RSS-feed.html
    • /fa/blog/2016-01-07-New-Linux-software-repositories-and-todo-list-support.html
    • /fa/blog/2015-11-04-QOwnNotes-on-Linux-Unplugged.html
    • /fa/blog/2015-07-27-Build-and-release-systems-for-QOwnNotes-for-Linux-Mac-OS-X-and-Windows.html
    • /fa/blog/2015-03-23-Links-to-other-notes-or-files-are-now-possible-in-QOwnNotes.html
  • تغییرات (به انگلیسی)

    • QOwnNotes Changelog

کلاس های آشکار

یادداشت

ویژگی ها و شگردها

class NoteApi {
    Q_PROPERTY(int id)
    Q_PROPERTY(QString name)
    Q_PROPERTY(QString fileName)
    Q_PROPERTY(QString fullNoteFilePath)
    Q_PROPERTY(QString fullNoteFileDirPath)
    Q_PROPERTY(QString relativeNoteFileDirPath)
    Q_PROPERTY(int noteSubFolderId)
    Q_PROPERTY(QString noteText)
    Q_PROPERTY(QString decryptedNoteText)
    Q_PROPERTY(bool hasDirtyData)
    Q_PROPERTY(QQmlListProperty<TagApi> tags)
    Q_PROPERTY(QDateTime fileCreated)
    Q_PROPERTY(QDateTime fileLastModified)
    Q_INVOKABLE QStringList tagNames()
    Q_INVOKABLE bool addTag(QString tagName)
    Q_INVOKABLE bool removeTag(QString tagName)
    Q_INVOKABLE bool renameNoteFile(QString newName)
    Q_INVOKABLE QString toMarkdownHtml(bool forExport = true)
    Q_INVOKABLE QString getFileURLFromFileName(QString localFileName)
    Q_INVOKABLE bool allowDifferentFileName()
    // Returns the Markdown note url for linking to the note with noteId
    Q_INVOKABLE QString getNoteUrlForLinkingToNoteId(int noteId)
};

شما می توانید این روش ها را از Date بکار گیرید تا قادر به کار با fileCreated یا fileLastModified باشید.

مثال

script.log(note.fileCreated.toISOString());
script.log(note.fileLastModified.getFullYear());

// renames a note to "new name.md"
note.renameNoteFile("new name");

// check if it is allowed to have a different note file name than the headline
script.log(note.allowDifferentFileName());

زیرپوشه یادداشت

ویژگی ها و شگردها

class NoteSubFolderApi {
    Q_PROPERTY(int id)
    Q_PROPERTY(QString name)
    Q_PROPERTY(QQmlListProperty<NoteApi> notes)
    Q_INVOKABLE static NoteSubFolderApi *fetchNoteSubFolderById(int id);
    Q_INVOKABLE static NoteSubFolderApi *activeNoteSubFolder();
    Q_INVOKABLE static QList<QObject*> fetchNoteSubFoldersByParentId(int parentId);
    Q_INVOKABLE QString relativePath();
    Q_INVOKABLE QString fullPath();
};

مثال

var noteSubFolderQmlObj = Qt.createQmlObject(
  "import QOwnNotesTypes 1.0; NoteSubFolder{}",
  mainWindow,
  "noteSubFolder",
);

// print all subfolder names
noteSubFolderQmlObj
  .fetchNoteSubFoldersByParentId(parentId)
  .forEach(function (nsf) {
    script.log(nsf.name);
  });

// get the active note subfolder
var noteSubFolder = noteSubFolderQmlObj.activeNoteSubFolder();

// print the full and relative path of the active note subfolder
script.log(noteSubFolder.fullPath());
script.log(noteSubFolder.relativePath());

script.log(noteSubFolder.id);
script.log(noteSubFolder.name);

// iterate through notes in note subfolder
for (var idx in noteSubFolder.notes) {
  var note = noteSubFolder.notes[idx];
}

برچسب

ویژگی ها و شگردها

class TagApi {
    Q_PROPERTY(int id)
    Q_PROPERTY(QString name)
    Q_PROPERTY(int parentId)
    Q_PROPERTY(QQmlListProperty<NoteApi> notes)
    Q_INVOKABLE TagApi fetchByName(const QString &name, int parentId = 0)
    Q_INVOKABLE QStringList getParentTagNames()
};

مثال

// Don't forget to use "import QOwnNotesTypes 1.0" at the top of your script!

// Fetch tag "home"
var tag = script.getTagByNameBreadcrumbList(["home"]);
// Fetch all notes tagged with the tag
var notes = tag.notes;

// Iterate through notes of the tag
for (var idx in notes) {
  var note = notes[idx];
  script.log(note.name);
}

You'll find more examples where TagApi is used in note-tagging-by-object.qml.

پنجره اصلی

ویژگی ها و شگردها

class MainWindow {
    Q_INVOKABLE void reloadTagTree();
    Q_INVOKABLE void reloadNoteSubFolderTree();
    Q_INVOKABLE void buildNotesIndexAndLoadNoteDirectoryList(
            bool forceBuild = false, bool forceLoad = false);
    Q_INVOKABLE void focusNoteTextEdit();
    // Creates a new note subfolder in the current subfolder
    Q_INVOKABLE bool createNewNoteSubFolder(QString folderName = "");
    // Inserts html in the current note as markdown
    // This method also downloads remote images and transforms "data:image"
    // urls to local images stored in the media directory
    Q_INVOKABLE void insertHtmlAsMarkdownIntoCurrentNote(QString html);
    // Reloads the current note by id
    // This is useful when the path or filename of the current note changed
    Q_INVOKABLE void reloadCurrentNoteByNoteId();
    // Returns the list of workspace UUIDs
    Q_INVOKABLE QStringList getWorkspaceUuidList();
    // Returns the UUID of a workspace, passing in the workspace name
    Q_INVOKABLE QString getWorkspaceUuid(const QString &workspaceName);
    // Sets the current workspace by UUID
    Q_INVOKABLE void setCurrentWorkspace(const QString &uuid);
    // Closes a note tab on a specific index (returns true if successful)
    Q_INVOKABLE bool removeNoteTab(int index);
    // Returns a list of note ids that are opened in tabs
    Q_INVOKABLE QList<int> getNoteTabNoteIdList();
    // Jumps to a tag in the tag tree
    Q_INVOKABLE bool jumpToTag(int tagId);
};

مثال

// Force a reload of the note list
mainWindow.buildNotesIndexAndLoadNoteDirectoryList(true, true);

// Creates a new note subfolder "My fancy folder" in the current subfolder
mainWindow.createNewNoteSubFolder("My fancy folder");

// Inserts html in the current note as markdown
mainWindow.insertHtmlAsMarkdownIntoCurrentNote("<h2>my headline
some text");

// Set 'Edit' workspace as current workspace
mainWindow.setCurrentWorkspace(mainWindow.getWorkspaceUuid("Edit"));

// Jump to the tag "test" in the tag tree
// There is an example in https://github.com/pbek/QOwnNotes/blob/main/docs/scripting/examples/custom-actions.qml
var tag = script.getTagByNameBreadcrumbList(["test"]);
mainWindow.jumpToTag(tag.id);

// Get all notes that are opened in tabs
var noteIds = mainWindow.getNoteTabNoteIdList();
noteIds.forEach(function (noteId) {
  var note = script.fetchNoteById(noteId);

  // do something with the note
});
Help us improve this page!
Prev
هوک ها