日本語のREADMEは、英語のREADMEの後に記載されています。
Papernote is an AI-native paper management and note-taking web application. Upload an academic PDF and it is automatically processed by an AI pipeline that extracts metadata, writes a chapter-by-chapter summary, generates a 4-perspective peer-review evaluation, and (optionally) produces a full Japanese translation. Each paper gets a public, shareable workspace where you can read the AI outputs, keep your own Markdown/Mermaid notes, view the PDF, and ask the AI questions about the paper.
It also retains the original Papernote strengths: free-form Markdown/Mermaid notes, file search, user authentication, rate limiting, CSRF protection, real-time Markdown preview, an AI editing assistant, automatic backups with diff viewing, and extensive keyboard shortcuts — fully optimized for both PC and smartphone.
- Unified AI Engine (2-tier): choose an execution mode (
direct= single API call, oragent= OpenHands agent loop) × a backend (OpenAI / Anthropic / Codex subscription) per task, all configurable from a settings screen. - Automatic pipeline on upload: metadata extraction → chapter summary → 4-perspective peer review (novelty / difference from related work / effectiveness / reliability) → full translation.
- Paper Library (
/papers): responsive card grid with thumbnails, client-side search and status filters; logged-in users also get an interactive knowledge-graph view. - Paper Workspace (
/paper/<hash>): single-column collapsible sections (Notes / Summary / Evaluation / Translation / PDF / Ask-AI), public read-only with OGP/SNS sharing; editing, regeneration, deletion and AI Q&A require login. Notes and the PDF are visible to logged-in users only. - Per-paper AI Q&A: ask questions grounded in the paper's full text.
- Knowledge Graph (login-only,
/papers→ Graph tab): an interactive tag→paper graph (Cytoscape) with directed edges from each tag to the papers that carry it. Toggle tags on/off to focus on a subset (your selection is remembered across visits, so the view stays light), search by title/tag, right-click a paper for quick actions, open papers in a new tab/window, and the layout is saved automatically. Handy for gathering references while writing. On mobile the tag filter collapses into a single toggle to keep the canvas large. - AI Settings (
/ai_settings): assign mode/backend/model per task, edit prompts, and run backend connectivity tests.
- Ensure
poppler-utilsis installed on your system (required bypdf2imagefor PDF thumbnails).sudo apt-get install poppler-utils # Debian/Ubuntu # or: sudo dnf install poppler-utils # Fedora/Amazon Linux
- Clone the repository:
git clone https://github.com/daishir0/Papernote
- Change to the project directory:
cd Papernote - Install the required packages:
pip install -r requirements.txt
- Copy
config.yaml.sample.orgtoconfig.yamland edit it. Key fields:allowed_extensions: Allowed upload file extensions (jpg,png,svg,pdf,docx,xlsx,pptx,zip, etc.).exclude_string: A string that, if found in a memo line, excludes that line from being shown.twitter:site/creatorhandles for OGP/Twitter cards.server.port: Server port (default5555).openai_api_key/anthropic_api_key: API keys for the direct backends (environment variablesOPENAI_API_KEY/ANTHROPIC_API_KEYtake precedence).codex_oauth_client_id: OAuth client ID for the Codex (ChatGPT) subscription backend (envCODEX_OAUTH_CLIENT_IDtakes precedence; optional).gmail:sender_email/recipient_email/app_passwordfor email notifications.secret_key: Secret key for session management and CSRF protection.users: Login usernames and passwords.api_keys: API keys for the external upload/processing API.
- (Optional, for the AI pipeline) Copy the
ai:block fromconfig.yaml.sample.orgintoai_config.yamlto customize per-task mode/backend/model and prompts. Theagentmode andcodexbackend require a running OpenHands Agent Server (defaulthttp://127.0.0.1:3025); if you only usedirectmode with OpenAI/Anthropic, OpenHands is not needed.
- Start the application:
python main.py
- Access the web interface at
http://localhost:5555. - Open
/papersfor the paper library, or upload a PDF to trigger the automatic AI pipeline. Each paper's workspace is at/paper/<hash>.
- Automatic AI pipeline: on upload, metadata, chapter summary, 4-perspective peer-review evaluation, and translation are generated in the background with per-step progress and quality checks (
jobs/<id>.json). - Regeneration: regenerate any step (metadata / summary / review / translation) from the workspace, optionally overriding the backend/mode.
- Public sharing: paper workspaces are publicly readable with OGP/Twitter-card metadata; editing and AI actions are gated behind login (notes and the PDF stay private to logged-in users).
- Tagging & knowledge graph: tag papers from the memo's second line (wrap multi-word tags in double quotes, e.g.
a11y "knowledge graph"); a login-only graph view on/papersvisualizes tag→paper relationships with toggleable tags (selection persisted), search, and a saved layout. - Multi-backend: OpenAI, Anthropic, and Codex (subscription) backends with automatic fallback when an agent run fails.
- User Authentication: Secure login/logout using Flask-Login.
- Rate Limiting: Protect routes from abuse with Flask-Limiter.
- CSRF Protection: Secure forms with Flask-WTF CSRF protection.
- PDF Management: Upload, search, and manage PDF files (SHA256-based naming, deduplication).
- Text Extraction: Extract and clean text from PDF files.
- File Attachments: Upload and manage attachments with drag-and-drop support.
- Real-time Markdown Preview: Live preview with synchronized scrolling (PC).
- AI Assistant: Integrated AI editing assistant with customizable templates and system prompts (ALT+A).
- Keyboard Shortcuts:
ALT+1: Heading (#) /ALT+2: Unordered list (-) /ALT+3: Ordered list (1.)ALT+4: Blockquote (>) /ALT+5: Bold /ALT+6: 4-space indent toggleCtrl+K: Quick page navigation /Ctrl+S: Save
- Multi-line Markdown Formatting, Quick Insert Menu, Comment Addition.
- Markdown & Mermaid rendering with XSS sanitization (DOMPurify), plus an image slideshow viewer.
- Multiple File Upload: Drag-and-drop multiple files with visual progress.
- HEIC Image Support: Automatic HEIC→JPEG conversion.
- Image Slideshow: Built-in viewer with preloading.
- Backup Management: Timestamp-based automatic backups, history view, color-coded diff viewer, quick restore, mobile-optimized.
- Quick Page Switcher (Ctrl+K), Open in New Tab, File List Caching, Dynamic Browser Titles, Persistent Preview State.
- Responsive Design for smartphone and tablet, full-page scrolling, touch-friendly buttons, responsive tables and images.
- Open Redirect Protection, CSRF protection, Secure file uploads, secrets resolved from environment variables first (live config and AI config are gitignored).
The unified AI engine lives in ai_engine.py, and the paper pipeline in paper_ai.py.
- Tasks (
ai_assist,paper_metadata,paper_summary,paper_review,paper_translate) are configured inai_config.yamlunderai.tasks, each with amode(direct/agent),backend(openai/anthropic/codex), optionalmodel, and aprompt_id. - Prompts are defined under
ai.promptsand editable from the/ai_settingsscreen. - Secrets are resolved from environment variables first, then
config.yaml. - Agent mode / Codex require an OpenHands Agent Server;
directmode with OpenAI/Anthropic works standalone.
- Ensure
config.yamlis properly configured. Liveconfig.yaml/ai_config.yamlare gitignored — useconfig.yaml.sample.orgas the template. - The application requires Flask and the dependencies in
requirements.txt.
This project is licensed under the MIT License - see the LICENSE file for details.
Papernoteは AIネイティブな論文管理・ノートアプリ です。学術論文のPDFをアップロードすると、AIパイプラインが自動で「メタデータ抽出 → 章ごとの要約 → 4観点の査読評価 → (任意で)全文和訳」を生成します。各論文には公開・共有可能なワークスペースが用意され、AIの生成結果を読み、自分のMarkdown/Mermaidノートを残し、PDFを閲覧し、論文についてAIに質問できます。
従来からのPapernoteの強み(自由なMarkdown/Mermaidノート、ファイル検索、ユーザー認証、レート制限、CSRF保護、リアルタイムMarkdownプレビュー、AI編集アシスタント、差分表示付き自動バックアップ、豊富なキーボードショートカット)もそのまま備え、PC・スマホ両対応です。
- 統一AI基盤(2層構成): タスクごとに実行モード(
direct=単発API /agent=OpenHandsエージェント)×バックエンド(OpenAI / Anthropic / Codexサブスク)を選択でき、設定画面から構成可能。 - アップロード時の全自動パイプライン: メタ抽出 → 章ごと要約 → 4観点査読評価(新規性 / 関連研究との相違 / 有効性 / 信頼性)→ 全文和訳。
- 論文ライブラリ(
/papers): サムネ付きレスポンシブカードグリッド、検索・ステータスフィルタ。ログイン時はインタラクティブな知識グラフビューも利用可能。 - 論文ワークスペース(
/paper/<hash>): 1カラムの折りたたみセクション(ノート / 要約 / 評価 / 和訳 / PDF / AI質問)。公開・読取専用+OGP/SNSシェア対応。編集・再生成・削除・AI質問はログイン時のみ。ノートとPDFはログインユーザーにのみ表示。 - 論文ごとのAI質問: 論文の全文を根拠に質問できる。
- 知識グラフ(ログイン限定・
/papersの「グラフ」タブ): タグ→論文の有向グラフ(Cytoscape)。各タグからそのタグを持つ論文へ矢印が伸びる。タグのON/OFFで対象を絞り込め(選択状態は次回も記憶されるので表示が重くならない)、タイトル/タグ検索、論文の右クリックメニュー、新しいタブ/ウインドウで開く、レイアウト自動保存に対応。論文執筆時の参考文献収集に便利。スマホではタグ絞り込みが1つのトグルに折りたたまれ、キャンバスを広く使える。 - AI設定(
/ai_settings): タスク別のモード/バックエンド/モデル割当、プロンプト編集、接続テスト。
poppler-utilsをインストールします(pdf2imageのPDFサムネ生成に必要)。sudo apt-get install poppler-utils # Debian/Ubuntu # または: sudo dnf install poppler-utils # Fedora/Amazon Linux
- リポジトリをクローンします:
git clone https://github.com/daishir0/Papernote
- プロジェクトディレクトリに移動します:
cd Papernote - 必要なパッケージをインストールします:
pip install -r requirements.txt
config.yaml.sample.orgをconfig.yamlにコピーして編集します。主なフィールド:allowed_extensions: アップロード許可拡張子(jpg,png,svg,pdf,docx,xlsx,pptx,zipなど)。exclude_string: メモ行に含まれると表示から除外する文字列。twitter: OGP/Twitterカード用のsite/creatorハンドル。server.port: サーバーポート(既定5555)。openai_api_key/anthropic_api_key: directバックエンド用APIキー(環境変数OPENAI_API_KEY/ANTHROPIC_API_KEYが優先)。codex_oauth_client_id: Codex(ChatGPT)サブスクのOAuthクライアントID(環境変数CODEX_OAUTH_CLIENT_ID優先・任意)。gmail: メール通知用のsender_email/recipient_email/app_password。secret_key: セッション管理・CSRF保護用のシークレットキー。users: ログイン用のユーザー名・パスワード。api_keys: 外部アップロード/処理API用のキー。
- (任意・AIパイプライン用)
config.yaml.sample.orgのai:ブロックをai_config.yamlにコピーし、タスク別のモード/バックエンド/モデル・プロンプトを調整します。agentモードとcodexバックエンドは OpenHands Agent Server(既定http://127.0.0.1:3025)が必要です。OpenAI/Anthropicのdirectモードのみなら OpenHands は不要です。
- アプリケーションを開始します:
python main.py
http://localhost:5555でウェブインターフェースにアクセスします。/papersで論文ライブラリを開く、またはPDFをアップロードすると自動AIパイプラインが起動します。各論文のワークスペースは/paper/<hash>です。
- 全自動AIパイプライン: アップロード時に、メタデータ・章ごと要約・4観点査読評価・和訳をバックグラウンド生成(ステップ別の進捗と品質チェック付き
jobs/<id>.json)。 - 再生成: 各ステップ(メタ/要約/評価/和訳)をワークスペースから再生成(バックエンド/モード上書き可)。
- 公開シェア: ワークスペースはOGP/Twitterカード付きで公開・読取可。編集・AI操作はログイン限定(ノートとPDFはログインユーザーのみ閲覧可)。
- タグ付けと知識グラフ: メモの2行目でタグ付け(2語以上のタグはダブルクォートで囲む。例:
a11y "knowledge graph")。/papersのログイン限定グラフビューでタグ→論文の関係を可視化し、タグのON/OFF切替(選択を記憶)・検索・レイアウト保存に対応。 - マルチバックエンド: OpenAI / Anthropic / Codex(サブスク)に対応、agent失敗時の自動フォールバックあり。
- ユーザー認証(Flask-Login)、レート制限(Flask-Limiter)、CSRF保護(Flask-WTF)。
- PDF管理: アップロード・検索・管理(SHA256命名・重複排除)。
- テキスト抽出: PDFからのテキスト抽出と整形。
- ファイル添付: ドラッグ&ドロップ対応。
- リアルタイムMarkdownプレビュー(PC・スクロール同期)。
- AIアシスタント: テンプレート/システムプロンプトをカスタムできる編集アシスタント(ALT+A)。
- キーボードショートカット:
ALT+1見出し /ALT+2箇条書き /ALT+3番号リスト /ALT+4引用 /ALT+5太字 /ALT+6インデント /Ctrl+Kページ移動 /Ctrl+S保存。 - 複数行Markdown整形、クイック挿入メニュー、コメント追加。
- Markdown/Mermaidレンダリング(DOMPurifyでXSS無害化)、画像スライドショー。
- 複数ファイルアップロード(進捗表示)、HEIC→JPEG自動変換、画像スライドショー(プリロード)。
- バックアップ管理: タイムスタンプ自動バックアップ、履歴表示、色分け差分ビューア、クイック復元、モバイル最適化。
- クイックページスイッチャー(Ctrl+K)、新しいタブで開く、ファイルリストキャッシュ、動的タイトル、プレビュー状態の永続化。
- レスポンシブデザイン(スマホ・タブレット)、フルページスクロール、タッチ最適化ボタン、レスポンシブテーブル/画像。
- オープンリダイレクト保護、CSRF保護、安全なファイルアップロード、秘密値は環境変数優先(ライブのconfig.yaml/ai_config.yamlはgitignore対象)。
統一AI基盤は ai_engine.py、論文パイプラインは paper_ai.py にあります。
- タスク(
ai_assist,paper_metadata,paper_summary,paper_review,paper_translate)はai_config.yamlのai.tasksで設定。各タスクにmode(direct/agent)・backend(openai/anthropic/codex)・任意のmodel・prompt_idを指定。 - プロンプトは
ai.promptsに定義し、/ai_settings画面から編集可能。 - 秘密値は環境変数を優先し、無ければ
config.yamlを使用。 - agentモード/CodexはOpenHands Agent Serverが必要。OpenAI/Anthropicの
directモードは単体で動作。
config.yamlを正しく設定してください。ライブのconfig.yaml/ai_config.yamlはgitignore対象です。雛型としてconfig.yaml.sample.orgを使用してください。- アプリにはFlaskおよび
requirements.txtの依存関係が必要です。
このプロジェクトはMITライセンスの下でライセンスされています。詳細はLICENSEファイルを参照してください。


