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
  • 시작하기

    • Overview
    • 개념
    • Markdown Cheatsheet
    • 노트 가져오기
    • 명령줄 인터페이스 매개 변수
    • QOnNotes 웹 지원 브라우저 확장
    • 홈페이지 제안 API
    • 명령줄 스니펫 관리자
    • QOwnNotes TUI
    • QOwnNotes Android
    • QOwnNotes 웹 앱
    • QOwnNotes Nextcloud App
    • 노트 관계 패널
    • 노트 검색
    • 단축키
    • Git 버전 관리
    • /ko/getting-started/kde-integration.html
  • 설치

    • 설치
    • Ubuntu Linux, elementary OS 및 Linux Mint에 설치
    • Microsoft Windows™에 설치
    • macOS™에 설치
    • Debian Linux에 설치
    • OpenSUSE Linux에 설치
    • Fedora Linux에 설치
    • 스냅으로 설치
    • Flatpak으로 설치
    • AppImage로 설치
    • Nix를 통해 설치
    • Arch Linux에 설치
    • Solus에 설치
    • KaOS Linux에 설치
    • CentOS Linux에 설치
    • Raspberry Pi OS에 설치
    • Gentoo Linux에 설치
    • Funtoo Linux에 설치
    • Void Linux에 설치
    • Slackware Linux에 설치
    • FreeBSD에 설치
    • QOwnNotes 빌드
  • 편집기

    • 맞춤법 검사
    • 언어 도구
    • Harper
    • Markdown LSP
    • AI support
    • 시간 형식
  • 스크립팅

    • QOwnNotes 스크립팅
    • QOwnNotes에서 제공하는 메서드 및 개체
    • Hooks
    • 해설 클래스
  • 기여하기

    • 참여하기
    • 코드 기여
    • 행동 강령
    • 유지 관리자
    • 번역
    • 기부
    • 후원
  • 자주 묻는 질문

    • 노트 편집 패널 없이 미리 보기 패널만 표시하려면 어떻게 해야 합니까?
    • QOwnNotes에 대해 다른 사용자가 말한 내용은 어디에서 찾을 수 있습니까?
    • 왜 메트릭스인가요?
  • 블로그 (영어)

    • Overview
    • QOwnNotes for Android is now on F-Droid
    • QOwnNotes for Nextcloud - Your notes in the Nextcloud web interface
    • QOwnNotes for Android - Markdown notes on your phone
    • QOwnNotes TUI - Your notes in the terminal
    • Layouts and layout presets
    • QOwnNotes Webpage Relaunch with VuePress 2, Vue.js 3, and Vuetify 3
    • Universal binary for macOS
    • Note relations panel
    • AI support was added to QOwnNotes
    • Source Archive switched from TuxFamily to GitHub Releases
    • Nextcloud Deck integration in QOwnNotes
    • QOwnNotes UI End2End Tests with the help of NixOS
    • Please test Qt6 version of QOwnNotes from a new PPA for Ubuntu Linux
    • Evernote import for huge files
    • Happy 1000th release of QOwnNotes
    • Polish website translation
    • Working with multiple notes
    • QOwnNotes command-line snippet manager
    • Nextcloud note versions
    • Manage orphaned image files and attachments
    • Linking of note headings
    • Tor Hidden Service Webpage
    • Use workspaces to manage different layouts of the user interface
    • Auto-complete text in note editor
    • Open links in the note editor
    • Solve simple equations in the note editor
    • Auto-format Markdown tables
    • QOwnNotes Mastodon page
    • Repository for Debian 11
    • Joplin import
    • Send photos from your mobile phone to QOwnNotes on the desktop
    • Four new languages added to the website
    • QOwnNotes Demo
    • Markdown explanation
    • Webpage translation
    • QOwnNotes for Ubuntu 21.04 Hirsute Hippo
    • QOwnNotes for Fedora 33
    • Release and blog posting automation
    • Legacy update service up again
    • RSS Feeds are back in place
    • Time Flies Podcast episode with interview about QOwnNotes
    • Bookmark management with QOwnNotes and Web Companion browser extension
    • Firefox extension on Firefox Add-ons page
    • Chrome extension in Chrome Web Store
    • QOwnNotes Web Companion Chrome extension
    • 500th release of QOwnNotes
    • QOwnNotes Telegram Group
    • Vim mode
    • QOwnNotes for openSUSE Leap 15, SUSE Linux Enterprise 15 and SUSE Linux Enterprise 12 SP3
    • QOwnNotes featured on LINUX Unplugged podcast and by Ubuntu
    • Interview for ownCloud
    • QOwnNotes for Fedora 27
    • QOwnNotes reviewed in German magazine c't
    • QOwnNotesAPI in the ownCloud Marketplace
    • QOwnNotes as AppImage
    • QOwnNotes for Debian 9.0, Fedora 26 and openSUSE Leap 42.3
    • Script repository and script settings variables
    • Fedora 25 release and new documentation page
    • Solus package for QOwnNotes
    • Automatic updates in Windows and macOS
    • Note encryption with keybase.io or directly with PGP
    • Evernote import
    • Portable mode
    • QOwnNotes on webupd8.org
    • QOwnNotes featured on the Linux Voice Podcast
    • QOwnNotes snap
    • QOwnNotes review in British magazine Linux Format
    • QOwnNotes Slackware Linux Repository
    • QOwnNotes review
    • QOwnNotes IRC
    • QOwnNotes now has scripting support
    • QOwnNotes is the Desktop App Pick on the Linux Action Show
    • QOwnNotes got featured in Linux Voice 25
    • QOwnNotes Gentoo Linux Overlay
    • Translate QOwnNotes on Crowdin
    • QOwnNotes 1.0 out now in 6 languages and with Freedesktop theme icons support
    • QOwnNotes software repository for Debian Linux
    • QOwnNotes package on the Arch User Repository
    • QOwnNotes software repository for Arch Linux
    • Webpage redesign
    • Qt widget QMarkdownTextEdit now a separate project for developer's pleasure
    • New release version RSS feed
    • New Linux software repositories and todo list support
    • QOwnNotes on Linux Unplugged
    • Build and release systems for QOwnNotes for Linux, macOS and Windows!
    • Links to other notes or files are now possible in QOwnNotes
  • 변경 로그 (영어)

    • QOwnNotes Changelog

해설 클래스

노트

속성 및 방식

클래스 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)

You can use the methods from Date to work with fileCreated or fileLastModified. To format them you can use Qt.formatDateTime, see Formatting dates and times.

예제

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

// 노트 이름을 "new name.md"로 변경
note.renameNoteFile("new name");

// 헤드라인과 다른 노트 파일 이름을 가질 수 있는지 확인
script.log(note.allowDifferentFileName());

노트 하위 폴더

속성 및 방식

클래스 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",
);

// 모든 하위 폴더 이름 인쇄
noteSubFolderQmlObj
  .fetchNoteSubFoldersByParentId(parentId)
  .forEach(function (nsf) {
    script.log(nsf.name);
  });

// 활성 노트 하위 폴더 가져오기
var noteSubFolder = noteSubFolderQmlObj.activeNoteSubFolder();

// 활성 노트 하위 폴더의 전체 및 상대 경로 인쇄
script.log(noteSubFolder.fullPath());
script.log(noteSubFolder.relativePath());

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

// 노트 하위 폴더의 노트를 반복
for (var idx in noteSubFolder.notes) {
  var note = noteSubFolder.notes[idx];
}

태그

속성 및 방식

클래스 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()

예제

// "QownNotes 가져오기"를 사용하는 것을 잊지 마십시오. 스크립트 상단에 1.0"을 입력합니다!

// “home” 태그 가져오기
var tag = script.getTagByNameBreadcrumbList(["home"]);
// 해당 태그가 지정된 모든 메모 가져오기
var notes = tag.notes;

// 해당 태그가 지정된 노트를 순차적으로 확인
for (var idx in notes) {
  var note = notes[idx];
  script.log(note.name);
}

TagApi가 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();
    // 현재 하위 폴더에 새 노트 하위 폴더를 만듭니다
    Q_INVOKABLE bool createNewNoteSubFolder(QString folderName = "");
    // 현재 노트에 HTML을 마크다운으로 삽입합니다
    // 이 방법은 또한 원격 이미지를 다운로드하고 "data:image" URL을
    // 미디어 디렉터리에 저장된 로컬 이미지로 변환합니다
    Q_INVOKABLE void insertHtmlAsMarkdownIntoCurrentNote(QString html);
    // 현재 노트를 ID별로 다시 로드합니다
    // 현재 노트의 경로 또는 파일 이름이 변경될 때 유용합니다
    Q_INVOKABLE void reloadCurrentNoteByNoteId();
    // 레이아웃 UUID 목록을 반환합니다
    Q_INVOKABLE QStringList getLayoutUuidList();
    // 레이아웃 이름을 전달하여 레이아웃의 UUID를 반환합니다
    Q_INVOKABLE QString getLayoutUuid(const QString &layoutName);
    // 현재 레이아웃을 UUID로 설정합니다
    Q_INVOKABLE void setCurrentLayout(const QString &uuid);
    // 특정 인덱스에서 노트 탭을 닫습니다 (성공하면 true로 반환됨)
    Q_INVOKABLE bool removeNoteTab(int index);
    // 탭에 열려 있는 노트 ID 목록을 반환합니다
    Q_INVOKABLE QList<int> getNoteTabNoteIdList();
    // 태그 트리에서 태그로 이동합니다
    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' layout as current layout
mainWindow.setCurrentLayout(mainWindow.getLayoutUuid("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
});
Prev
Hooks