Commit graph

128 commits

Author SHA1 Message Date
hyungyunlim
a79c765cfa fix: persist import subscription toggle 2026-05-21 09:41:59 +09:00
hyungyunlim
01b51b73ee fix: improve naver blog bulk import flow 2026-05-14 00:53:47 +09:00
hyungyunlim
e9612bd93c ci: use --legacy-peer-deps for npm ci
Required because eslint@^10 and the older @typescript-eslint/eslint-plugin@5
peer dep don't intersect cleanly.
2026-05-13 08:41:08 +09:00
hyungyunlim
11586f5491 ci: add release workflow with GitHub artifact attestations
Triggers on version tag push (or manual dispatch). The workflow:
- builds main.js and styles.css from source on a clean runner
- attests the build provenance of both files via
  actions/attest-build-provenance, which the Obsidian community
  scorecard flags as a 'Recommendation' when missing
- uploads / refreshes the release assets idempotently so the same
  workflow can backfill attestations for an already-published tag
  via workflow_dispatch
2026-05-13 08:40:05 +09:00
hyungyunlim
b650d54f01 docs: add CONTRIBUTING.md
Boosts the Obsidian community scorecard's Hygiene rating, which
currently flags 'Missing contributing guide'.
2026-05-13 08:00:53 +09:00
hyungyunlim
97a3bb0028 fix(css): drop !important from search input styles
Increase selector specificity instead, per Obsidian CSS lint.
2026-05-13 07:20:03 +09:00
hyungyunlim
b88d508f4c fix: eliminate all any-type errors flagged by obsidianmd lint
Adds type narrowing and minimal inline interfaces so the project
passes `eslint-plugin-obsidianmd` recommended config with zero
errors and zero warnings.

- catch blocks now use `error instanceof Error ? error.message :
  String(error)` instead of accessing `.message` on `any`
- JSON.parse / requestUrl JSON results are typed via `unknown`
  plus structural casts (e.g. `as { code?: number; data?: ... }`)
- Brunch/Naver Blog/Cafe/News fetchers gain small inline interfaces
  for the API and embed-data shapes they parse
- AI provider clients (OpenAI / Anthropic / Google / Ollama) get
  response-shape types so token usage, choices, candidates, etc.
  are no longer accessed on `any`
- Video service: Kakao TV VOD response shape typed
- News fetcher: drop unused `domelementtype` dependency; compare
  `node.type` against the cheerio string constants directly
- main.ts: cast `.bind(this)` results back to their typed signature
  for service constructors, and type `loadData()` result as
  `Partial<NaverBlogSettings> | null`

Also adds `eslint.config.mjs` so this lint matches what the
plugin-review bot runs.
2026-05-13 07:13:36 +09:00
hyungyunlim
b65b3ead25 fix: switch UI timers to window.setTimeout per obsidianmd lint
ESLint with eslint-plugin-obsidianmd treats activeWindow.setTimeout
as also forbidden; the recommended fix is plain window.setTimeout.
This change also covers leftover setTimeout calls in service files
and url-expander that were not in the popout fix pass.
2026-05-13 07:07:07 +09:00
hyungyunlim
09b6a9386d fix: address Obsidian plugin review automated check findings
- Bump minAppVersion to 1.8.7 to match actually-used Obsidian APIs
  (Vault.createFolder, getFrontMatterInfo, FileManager.trashFile,
  Notice.messageEl, Vault.getAllFolders, getLanguage)
- Bump plugin version to 1.10.2 and record version mapping
- End manifest description with punctuation as required by the bot
- Replace builtin-modules dependency with Node's built-in
  module.builtinModules
- Use activeWindow.setTimeout in UI code for popout window
  compatibility (modals, settings-tab, ribbon icon)
- Replace document.createDocumentFragment / document.createElement
  with Obsidian's createFragment / createDiv helpers in settings-tab
- Prefix unused callback args with underscore to satisfy lint pattern
  (evt, oid, aid, index, imgElement, element, $)
- Remove redundant (item as Element) / (el as Element) type
  assertions in brunch and cafe fetchers (cheerio already infers
  Element)
- Annotate t() regex replacement callback args to remove implicit any
2026-05-13 07:04:43 +09:00
hyungyunlim
208908110b fix: avoid Object default stringification for unknown error type
Replaces String(error) with 'Unknown error' fallback to prevent
[object Object] output when error is not an Error instance.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 08:47:30 +09:00
hyungyunlim
42b070107b chore: bump version to 1.10.1
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 15:45:12 +09:00
hyungyunlim
1662c1bd98 fix: address Obsidian plugin review bot findings
Required:
- Remove emoji from short URL resolving status text (sentence case)
- Remove Node.js https module usage in url-expander, use requestUrl for all platforms
- Remove unused eslint-disable directive and require() call

Optional:
- Remove unused error/e catch variables across brunch-fetcher, naver-blog-fetcher,
  ai-service, and cafe-service
- Remove unused CAFE_ARTICLE_API_BASE import from naver-cafe-fetcher
- Add proper unknown type annotation for error used in re-thrown message

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 15:44:23 +09:00
hyungyunlim
7f3e434f32 feat: add Naver short URL resolution and art token forwarding
Support naver.me, me2.do, han.gl short URLs in the import modal by
resolving them to their canonical destination before platform detection.
Extract and forward the `art` JWT token from shared cafe links so
member-only articles can be imported without additional configuration.

- Add src/utils/url-expander.ts (isNaverShortUrl, expandNaverShortUrl, extractArtToken)
- Add buildCafeArticleApiUrl helper to cafe-endpoints.ts
- Thread artToken through importCafeArticle → fetchSingleArticle → API URL
- Auto-deploy build artifacts to test vault on npm run build

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 10:40:34 +09:00
hyungyunlim
c6e3a85d1e fix: resolve all remaining sentence case violations for UI text
- Remove brand names (Naver, OpenAI) from UI notices where context is clear
- Lowercase brand names (brunch) in non-first position of UI text
- Simplify NID_AUT/NID_SES cookie descriptions (name already in setting label)
- Remove trailing periods from notice messages
- Addresses all 16 Required sentence case issues from plugin review bot

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 23:38:03 +09:00
hyungyunlim
72bdcf800a fix: address remaining Obsidian plugin review feedback
- Remove unused catch(error) parameters in main.ts (6 instances)
- Fix indentation in image-service.ts from previous try/catch removal
- Convert regex literal to RegExp constructor to avoid unnecessary
  escape character in regex-patterns.ts
- Replace double type cast (as unknown as) with Cheerio's attr() API
  in naver-blog-fetcher.ts for cleaner attribute access

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 23:20:19 +09:00
hyungyunlim
0659de8399 fix: resolve template literal type issues in default cases
Use String() conversion to avoid 'never' type in template literals
when provider type is exhaustively checked in switch statements.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 09:29:28 +09:00
hyungyunlim
80dc02f297 fix: apply sentence case to all UI text
- Fixed 23 sentence case violations flagged by ESLint
- Changed "Naver Blog/Cafe/News" to "Naver blog/cafe/news"
- Updated placeholders to use proper sentence case
- Added periods to notification messages
- Removed emoji from news import notice

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 07:23:17 +09:00
hyungyunlim
201104d1ae fix: address Obsidian plugin review feedback
- Fix empty block statements with meaningful comments
- Remove unnecessary try/catch wrappers in brunch-fetcher.ts
- Apply sentence case for UI text (Import Naver blog, Naver cafe)
- Add vid property to BlogComponent interface for type safety
- Replace direct style.display/width with CSS classes
- Remove unused variables and imports

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 10:45:13 +09:00
hyungyunlim
1d30d03220 feat: consolidate startup sync notifications
- Add silent mode to BlogService and BrunchService sync methods
- Create unified autoSyncAllSubscriptions() for startup
- Show single "Syncing subscriptions: X blogs, Y Brunch authors..." notice
- Display consolidated summary: "Sync completed: N from blogs, M from Brunch"
- Suppress intermediate per-blog/per-post notices during auto-sync
- Manual sync from settings still shows detailed progress

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 23:05:03 +09:00
hyungyunlim
081055afd7 chore: bump version to 1.9.0
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 22:46:20 +09:00
hyungyunlim
403a6c2203 fix: improve Naver subscription card bio display and spacing
- Increase gap in author-info from 2px to 4px
- Improve bio line-height from 1.4 to 1.5 for multi-line readability
- Add word-break and bottom padding to bio element
- Add proper margin-top for card layout meta section
- Remove debug console logs

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 22:45:41 +09:00
hyungyunlim
266198c2ad fix: subscription with no posts + show full bio + remove debug logs
- Allow subscription even when posts.length === 0 (early return case)
- Remove line-clamp from bio CSS to show full description
- Remove all debug console.log statements

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 22:38:20 +09:00
hyungyunlim
fafe5bea38 fix: allow subscription even when no new posts imported
Remove successCount > 0 condition from subscription logic so users
can subscribe to blogs/authors even when all posts are duplicates.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 22:29:57 +09:00
hyungyunlim
703b07d03b refactor: remove subscription chips from import modal
Remove the quick-select subscription chips feature from the import
modal. Keep only the max posts and subscribe toggle options for
bulk imports.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 22:23:36 +09:00
hyungyunlim
381de8e8f8 feat: add max posts and subscribe options for Naver blog bulk import
Show the same options (max posts count, add to subscriptions toggle)
for Naver blog bulk imports as Brunch author imports. When subscribe
option is enabled, fetch profile info and add to subscriptions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 22:19:42 +09:00
hyungyunlim
b293d3f95e feat: add subscription chips to import modal
Show subscribed Naver blogs and Brunch authors as clickable chips
in the import modal for quick selection. Clicking a chip fills the
URL input with the corresponding blog/author URL.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 22:17:11 +09:00
hyungyunlim
69be37bf45 fix: improve bio display - 3 lines with expand on hover
- Increase line-clamp from 2 to 3 lines
- Add hover effect to show full bio text
- Add title tooltip for full content preview

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 22:14:58 +09:00
hyungyunlim
bfbec094aa fix: clean up HTML entities in blog profile bio
Decode &nbsp;, &amp;, &lt;, &gt;, &quot;, &#39; and numeric HTML
entities. Also normalize multiple whitespaces to single space.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 22:13:15 +09:00
hyungyunlim
2b30bbc49d feat: add Naver blog profile metadata to subscription UI
- Add fetchProfileInfo and fetchProfileInfoStatic methods to fetch author
  profile via WidgetListAsync.naver API
- Add parseBlogIdFromInput for URL/ID parsing when subscribing
- Update BlogSubscription type with bio field
- Redesign subscription display as profile cards (like Brunch)
- Add translations for new UI elements (blog_id_placeholder, invalid_blog_id)
- Add CSS styles for naver-subscription-card layout

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 22:06:46 +09:00
hyungyunlim
dabac42c13 chore: remove all Brunch debug console logs
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 21:01:59 +09:00
hyungyunlim
aeae06749a feat: add Naver Blog Tag API integration and improve AI tag handling
- Add BlogTagListInfo.naver API integration for reliable tag extraction
- Fetch original blog tags via API instead of HTML parsing
- Change AI tags to append to original tags instead of replacing
- Add duplicate detection when merging AI and original tags
- Remove debug console logs from Brunch and Naver fetchers
- Add NAVER_BLOG_TAG_API_ENDPOINT constant

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 20:53:48 +09:00
hyungyunlim
cb96da3252 feat: add Brunch comment parsing and fix YAML newline handling
- Add Brunch comments API endpoint and types
- Implement comment fetching with nested replies support
- Add convertBrunchCommentsToMarkdown utility function
- Add downloadBrunchComments setting option
- Fix YAML frontmatter newline issue in title/subtitle/series
- Sanitize filenames to handle titles with line breaks

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 23:34:39 +09:00
hyungyunlim
37bb30a45b feat: add Brunch keyword/magazine page import support
- Add BrunchKeywordFetcher class for keyword page imports
- Add BRUNCH_KEYWORD_API and BRUNCH_KEYWORD_URL endpoints
- Add post count limit option in modal for bulk Brunch imports
- Fix profileId vs userId issue for proper URL construction
- Add error detection for empty CSR shells and login redirects
- Extract groupId from hidden input in keyword page HTML

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 21:29:02 +09:00
hyungyunlim
2ba11a7a32 feat: add Brunch (Kakao) platform support with images and videos
- Add BrunchFetcher for parsing Brunch posts from brunch.co.kr
- Support single post and author page imports
- Download images from Daum CDN (daumcdn.net)
- Download videos from Kakao TV API (non-DRM)
- Handle gridGallery image layouts
- Preserve line breaks and paragraph spacing from original posts
- Add mobile URL normalization (fix @ symbol stripping)
- Add Brunch-specific settings (folder, image/video download toggles)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-20 17:57:55 +09:00
hyungyunlim
54526da7d2 chore: bump version to 1.8.0
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 22:13:24 +09:00
hyungyunlim
5390ca8b64 feat: add video download support for blog and cafe posts
- Add VideoService for downloading Naver videos via rmcnmv API
- Support video download for both blog and cafe posts
- Extract vid/inkey from data-module-v2 script tags
- Use <!--VIDEO:vid--> placeholder for correct video positioning
- Fix cafe video order issue by skipping early-return approaches when videos exist
- Store contentHtml for video extraction in both fetchers

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 22:11:49 +09:00
hyungyunlim
b2ae9c4dd8 fix: apply sentence case to Naver service names in UI text
- Change 'Naver blog' to 'Naver Blog' (official service name)
- Change 'Naver cafe' to 'Naver Cafe' (official service name)
- Change 'Naver news' to 'Naver News' (official service name)

Files modified:
- main.ts: ribbon icon tooltip
- src/ui/modals/import-modal.ts: error notices, placeholder
- src/ui/settings-tab.ts: section heading
- src/constants/messages.ts: placeholder text

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 16:40:53 +09:00
hyungyunlim
6ac18b5282 fix: address ObsidianReviewBot code quality issues (round 6)
- Fix sentence case in UI text ("Naver Cafe" → "Naver cafe", etc.)
- Remove unused variables (progress, imageProgress, directUrl)
- Improve detection message formatting
- Bump version to 1.7.4

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 15:55:04 +09:00
hyungyunlim
bbedb73300 fix: address ObsidianReviewBot code quality issues (round 5)
- Fix object stringification: safely extract commentId to avoid [object Object]
- Use FileManager.trashFile() instead of Vault.delete() for proper file deletion
- Remove unused imports: Notice from naver-blog-fetcher.ts and google-client.ts
- Remove unused imports: ImageService from import-modal.ts, App from locale-utils.ts
- Remove unused variable: imageCount from naver-news-fetcher.ts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 00:25:48 +09:00
hyungyunlim
5f918d8ece fix: address remaining ObsidianReviewBot issues (promise in void context, type assertions)
- Fix promise in void context in setTimeout callbacks (import-modal.ts, news-import-modal.ts)
  - Changed async arrow functions to use .then().catch() pattern
- Remove unnecessary non-null assertions in settings-tab.ts
  - Modified ensureCafeSettings() and ensureNewsSettings() to return the settings object
  - Use returned object instead of accessing with ! assertion
- Add missing nidAut and nidSes fields to NaverCafeSettings type

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 16:33:15 +09:00
hyungyunlim
465dc51268 fix: address ObsidianReviewBot code quality issues (round 3)
- Fix invalid 'never' type in template literals (api-client-factory.ts, ai-provider-utils.ts)
- Fix unnecessary escape characters in regex patterns (cafe-endpoints.ts, cafe-service.ts)
- Replace direct style assignments with CSS classes (import-modal.ts, news-import-modal.ts)
- Fix sentence case for UI text (i18n.ts, settings-tab.ts)
- Remove 'settings' from section headings (settings-tab.ts)
- Add detection styles to CSS (styles.css)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 16:29:14 +09:00
hyungyunlim
f9a83a4bfc feat: add Naver News article import support
- Add NaverNewsFetcher for crawling Naver News articles
- Support image download from imgnews.pstatic.net
- Add news URL detection in import modal
- Handle images in table elements (오마이뉴스 style)
- Add news settings in plugin settings tab
- Bump version to 1.7.0

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 12:30:26 +09:00
hyungyunlim
1fa29849cd chore: bump version to 1.6.0
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 11:29:14 +09:00
hyungyunlim
6ec1f1b625 feat: add comment support for Naver Cafe posts
- Add comment fetching from Naver Cafe API with pagination support
- Parse comments with metadata (author, date, level, writer badge)
- Display comments in markdown with reply indentation (↳ symbol)
- Add "Include comments" toggle in settings (enabled by default)
- Remove duplicate cafe-import-modal.ts (import-modal.ts handles both)
- Add comment-utils.ts for markdown conversion

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 11:28:34 +09:00
hyungyunlim
4266c4e5d9 fix: address additional ObsidianReviewBot code review issues
- Remove unused debug code blocks (empty meta tag iteration, unused isErrorPost)
- Add descriptive comments to all empty catch blocks
- Fix catch block formatting in image-service.ts
- Remove extra blank lines in naver-blog-fetcher.ts
- Bump version to 1.5.9

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 09:50:43 +09:00
hyungyunlim
a61aaf36ef fix: address ObsidianReviewBot code review feedback
- Replace innerHTML with Obsidian API methods in cafe-import-modal.ts
- Add descriptive comments to empty catch blocks in naver-blog-fetcher.ts
- Remove unnecessary empty if block in enhanceImageUrl function
- Remove unused variable assignment in settings-tab.ts
- Apply sentence case to UI text (settings headers, ribbon tooltip)
- Bump version to 1.5.8

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 23:52:17 +09:00
hyungyunlim
92acf16d62 refactor: simplify cafe fetcher by using requestUrl for all platforms
- Remove Node.js https module dependency
- Use Obsidian's requestUrl with Cookie header for both desktop and mobile
- Tested and confirmed working on both platforms
- Cleaner, more maintainable code

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 18:57:46 +09:00
hyungyunlim
cc0375c89e feat: add mobile support for Naver Cafe cookie authentication
- Use Platform.isMobile to detect mobile environment
- Conditionally load Node.js https module (desktop only)
- On mobile, use Obsidian's requestUrl with Cookie header
- Fixes cafe import crash on iOS/Android due to missing Node.js APIs

Note: Cookie support on mobile may be limited by Capacitor/WebView restrictions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-08 16:41:21 +07:00
hyungyunlim
b75d0e2d17 fix: add support for storep-phinf.pstatic.net sticker images
- Add storep-phinf.pstatic.net to valid image domains
- Add required type parameter for sticker store images to download properly

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-08 16:29:51 +07:00
hyungyunlim
26c5f06ebd feat: add cookie authentication error handling for Naver Cafe
- Detect 401/403 responses and show clear error message asking users to set cookies
- Warn users upfront when no cookie is configured before attempting cafe import
- Add cookie check in all cafe import entry points (modals, service)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-08 16:21:24 +07:00