Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/RASAAS/docmcp-knowledge
/ functions
Functions
497 in github.com/RASAAS/docmcp-knowledge
⨍
Functions
497
◇
Types & classes
40
↓ 1,025 callers
Method
get
(self, doc_id: str)
scripts/fetch_updates.py:430
↓ 88 callers
Method
search
(self, query: str, num: int = 10)
scripts/fetch_nmpa_fulltext.py:348
↓ 36 callers
Method
search
Search via Google CSE API. Args: date_restrict: Google CSE dateRestrict value, e.g. "y2" (past 2 years), "m6" (pa
scripts/fetch_updates.py:724
↓ 30 callers
Method
check
(self, source_id: str, source: dict)
scripts/fetch_updates.py:666
↓ 19 callers
Function
_make_update
(source_id: str, source: dict, check_type: str, note: str)
scripts/fetch_updates.py:2740
↓ 11 callers
Function
_make_update
(source_id: str, source: dict, method: str, note: str)
scripts/tier2_checkers.py:22
↓ 10 callers
Function
_title_similarity
Compute similarity between two Chinese titles (0.0 - 1.0).
scripts/fetch_nmpa_fulltext.py:798
↓ 10 callers
Function
fulltext_exists
(entry: dict)
scripts/fetch_nmpa_fulltext.py:451
↓ 9 callers
Function
write_md
Write markdown file. Returns True if content changed.
scripts/json_to_markdown.py:195
↓ 7 callers
Function
_yaml_safe
Quote a string if it contains YAML-special characters.
scripts/json_to_markdown.py:496
↓ 7 callers
Function
extract_actual_title
Extract the guidance document title from markdown content. Handles NMPA guidance document patterns: - "附件N" prefix lines (skipped) - Titl
scripts/fetch_nmpa_fulltext.py:709
↓ 6 callers
Function
_guidance_entry_line
(entry: dict, lang: str, has_fulltext: dict, link_prefix: str = "./guidance/")
scripts/json_to_markdown.py:643
↓ 6 callers
Method
_load_json
(self, path: Path)
scripts/fetch_updates.py:474
↓ 6 callers
Method
check_regulation
(self, regulation: str)
scripts/fetch_updates.py:2933
↓ 6 callers
Function
is_catalog_content
Detect if extracted text is a catalog/list of guidance titles.
scripts/fetch_nmpa_fulltext.py:468
↓ 6 callers
Function
load_json
(path: Path)
scripts/json_to_markdown.py:178
↓ 5 callers
Function
_clean
(text: str)
scripts/fetch_standards_overview.py:118
↓ 5 callers
Function
append_to_file
(filepath)
scripts/append_missing_images.py:34
↓ 5 callers
Function
clean_file
(filepath)
scripts/undo_appended.py:11
↓ 5 callers
Function
content_matches_title
Check if the document content plausibly matches the expected title. Also detects the NMPA "attachment mismatch" pattern where the title appea
scripts/fetch_nmpa_fulltext.py:610
↓ 5 callers
Function
is_draft_content
Detect if extracted text is a draft for comments (征求意见稿). Only official/final versions should be included in the knowledge base. Draft docume
scripts/fetch_nmpa_fulltext.py:644
↓ 5 callers
Function
load_index
()
scripts/fetch_nmpa_fulltext.py:420
↓ 5 callers
Function
parse_table_row
Parse a Markdown table row into a list of cell strings.
scripts/postprocess_fulltext.py:301
↓ 5 callers
Function
replace_in_file
(file_path)
scripts/extract_mdcg_images.py:83
↓ 5 callers
Method
save
(self)
scripts/fetch_updates.py:424
↓ 4 callers
Function
celex_to_html_url
Build HTML full text URL from CELEX number.
scripts/fetch_eurlex_fulltext.py:67
↓ 4 callers
Function
fetch_page
Fetch page content. Returns (status_code, html_text).
scripts/check_standards_versions.py:82
↓ 4 callers
Function
get_en_path
Get the English translation output path for a Chinese fulltext file.
scripts/translate_fulltext.py:234
↓ 4 callers
Function
is_separator_row
Return True if this is a Markdown table separator row (---|---|...).
scripts/postprocess_fulltext.py:312
↓ 4 callers
Function
read_front_matter
Parse YAML front matter from a Markdown file.
scripts/generate_docs_index.py:142
↓ 4 callers
Function
run_git
Run a git command and return (returncode, stdout, stderr).
scripts/generate_content_pr.py:364
↓ 3 callers
Function
_direct_rows
Get direct <tr> children of a table (or its <tbody>/<thead>). Unlike ``table.find_all("tr")``, this does NOT recurse into nested tables, whic
scripts/fetch_eurlex_fulltext.py:112
↓ 3 callers
Function
_escape_vue_tags
Escape angle brackets that VitePress/Vue would interpret as components. Preserves: standard HTML tags, Markdown auto-links <https://...>, HTM
scripts/json_to_markdown.py:428
↓ 3 callers
Function
_save_fulltext
Save validated fulltext to the entry's slug file. Returns True if index was modified.
scripts/fetch_nmpa_fulltext.py:1424
↓ 3 callers
Function
_title_keywords
Extract meaningful keywords from a Chinese title.
scripts/fetch_nmpa_fulltext.py:497
↓ 3 callers
Function
classify_standard
Classify a standard into a category based on number and title.
scripts/fetch_eu_mdr_standards.py:248
↓ 3 callers
Method
clean_title
Clean HTML entities from title.
scripts/migrate_wordpress.py:171
↓ 3 callers
Method
clean_title
(self, title_raw: str)
scripts/migrate_posts.py:144
↓ 3 callers
Method
detect_output_path
Derive repo output path and regulation from WordPress link URL. Returns (output_path, regulation).
scripts/migrate_wordpress.py:142
↓ 3 callers
Function
flush_skip
()
scripts/translate_fulltext.py:91
↓ 3 callers
Function
flush_translatable
()
scripts/translate_fulltext.py:79
↓ 3 callers
Function
generate_slug
(title_zh: str, doc_number: str)
scripts/fetch_nmpa_fulltext.py:443
↓ 3 callers
Function
load_discovered_urls
()
scripts/fetch_nmpa_fulltext.py:431
↓ 3 callers
Function
save_index
(data: dict)
scripts/fetch_nmpa_fulltext.py:425
↓ 3 callers
Function
strip_year_revision
Remove year/revision markers and normalize suffix.
scripts/expand_index_v2.py:46
↓ 2 callers
Function
_append_entry_line
Append a single entry line to the index page. link_prefix: override the relative path prefix for fulltext links. Default "" mean
scripts/json_to_markdown.py:1066
↓ 2 callers
Method
_apply_db_comparison
Run DatabaseComparator on each new_item; keep only new/update items.
scripts/fetch_updates.py:2901
↓ 2 callers
Function
_cell_to_text
Extract text from a table cell, recursively processing nested layout tables.
scripts/fetch_eurlex_fulltext.py:165
↓ 2 callers
Method
_cffi_get
Use curl-cffi with Chrome TLS impersonation, bypassing proxy for FDA. Akamai bot detection blocks requests from proxy/VPN IPs.
scripts/fetch_fulltext.py:97
↓ 2 callers
Function
_detect_libreoffice
Find LibreOffice binary. Caches result.
scripts/fetch_nmpa_fulltext.py:179
↓ 2 callers
Function
_element_to_markdown
Recursively convert a BeautifulSoup element to markdown lines.
scripts/fetch_eurlex_fulltext.py:263
↓ 2 callers
Function
_entry_row
Format a table row for a document entry.
scripts/generate_docs_index.py:404
↓ 2 callers
Function
_extract_core_subject
Extract the core product/test name by stripping generic suffixes.
scripts/fetch_nmpa_fulltext.py:535
↓ 2 callers
Method
_filter_items
Filter search results, return (new_items, domain_filtered, title_filtered).
scripts/fetch_updates.py:865
↓ 2 callers
Function
_has_class
Check if any of the tag's CSS classes contain cls_fragment.
scripts/fetch_eurlex_fulltext.py:95
↓ 2 callers
Function
_is_boilerplate_line
Return True if line is boilerplate that should not be used as a title.
scripts/fetch_nmpa_fulltext.py:876
↓ 2 callers
Function
_is_layout_table
Detect EUR-Lex layout tables used for numbered/bulleted definitions. Uses only *direct* rows (not recursive) to avoid being confused by neste
scripts/fetch_eurlex_fulltext.py:131
↓ 2 callers
Function
_key
(e)
scripts/parse_exemption_to_json.py:140
↓ 2 callers
Function
_layout_table_to_text
Convert a layout table to indented text lines. Only processes *direct* rows to avoid duplication from nested tables. Nested tables inside cel
scripts/fetch_eurlex_fulltext.py:186
↓ 2 callers
Function
_load_from_cache
Load standards from cache file.
scripts/fetch_eu_mdr_standards.py:416
↓ 2 callers
Function
_load_fulltext
Load fulltext markdown for an entry, if available. Checks both {name}.md and {name}.zh.md (NMPA Chinese sources often use the .zh.md extensio
scripts/json_to_markdown.py:476
↓ 2 callers
Function
_load_translated_fulltext
Load translated fulltext for a specific language. Looks for {slug}.{lang}.md or {id}.{lang}.md in the fulltext dir. Returns empty string if n
scripts/json_to_markdown.py:779
↓ 2 callers
Function
_looks_like_title
Heuristic: true titles don't end with descriptive punctuation and are short.
scripts/fetch_nmpa_fulltext.py:1312
↓ 2 callers
Function
_normalize_title
Normalize a Chinese title for comparison (remove spaces, punct variants).
scripts/fetch_nmpa_fulltext.py:527
↓ 2 callers
Function
_nsmap
(prefix: str)
scripts/fetch_nmpa_fulltext.py:1290
↓ 2 callers
Method
_print_summary
(self)
scripts/download_images.py:288
↓ 2 callers
Function
_real_table_to_markdown
Convert a real data table to Markdown table syntax. Only processes *direct* rows to avoid pulling in nested table content.
scripts/fetch_eurlex_fulltext.py:228
↓ 2 callers
Function
_remove_substring_false_positives
Remove L2 codes that only appear as substrings of L3 codes in the text. Problem 1 (tail): text has '02-06-01', broad match picks up '06-01' (vali
scripts/enrich_guidance_classification.py:70
↓ 2 callers
Function
_request_with_retry
( session: requests.Session, method: str, url: str, *, params=None, data=None, tim
scripts/fetch_nifdc_standards.py:83
↓ 2 callers
Method
api_get
(self, endpoint: str, params: Optional[dict] = None)
scripts/migrate_posts.py:80
↓ 2 callers
Function
check_docling
()
scripts/convert_mdcg_pdf.py:54
↓ 2 callers
Method
classify
Classify a detection against the database. Returns: ('new', description) | ('update', diff) | ('known', '') | ('irrelevant', reason)
scripts/fetch_updates.py:530
↓ 2 callers
Function
clean_text_for_search
(text)
scripts/inject_images_smart.py:13
↓ 2 callers
Function
convert_doc_to_docx
Convert .doc (OLE2) to .docx via LibreOffice headless.
scripts/fetch_nmpa_fulltext.py:205
↓ 2 callers
Function
convert_pdf_to_markdown
Convert a PDF (URL or local path) to Markdown using docling. Args: source: URL or local file path to the PDF doc_id: Documen
scripts/convert_mdcg_pdf.py:62
↓ 2 callers
Method
detect_subcategory
Detect insights subcategory from post categories.
scripts/migrate_posts.py:125
↓ 2 callers
Function
extract_docx_to_markdown
(docx_bytes: bytes, image_map: dict[str, str] | None = None)
scripts/fetch_nmpa_fulltext.py:1207
↓ 2 callers
Function
fetch_and_parse
Fetch EUR-Lex HTML and parse to markdown. Retries on HTTP 202 (Accepted) which EUR-Lex returns when generating large documents asynchronously
scripts/fetch_eurlex_fulltext.py:470
↓ 2 callers
Function
fetch_html
Fetch HTML from URL with caching.
scripts/fetch_eu_mdr_standards.py:124
↓ 2 callers
Function
fulltext_exists
(entry: dict)
scripts/test_playwright_cmde.py:14
↓ 2 callers
Function
fulltext_exists
(entry: dict)
scripts/fetch_fulltext.py:253
↓ 2 callers
Function
generate_index_page
Generate the main news index page.
scripts/generate_news_pages.py:148
↓ 2 callers
Function
generate_standards_subpage_en
Generate an English standards sub-page from JSON data.
scripts/json_to_markdown.py:308
↓ 2 callers
Function
generate_standards_subpage_zh
Generate a Chinese standards sub-page from JSON data.
scripts/json_to_markdown.py:211
↓ 2 callers
Method
get_all_docs
Fetch all published docs with pagination.
scripts/migrate_wordpress.py:120
↓ 2 callers
Method
get_all_posts
Fetch all published posts with pagination.
scripts/migrate_posts.py:92
↓ 2 callers
Method
get_category_slug
Get category slug by ID (cached).
scripts/migrate_posts.py:114
↓ 2 callers
Function
get_entries
Get entries from JSON data, handling both 'entries' and 'standards' keys.
scripts/json_to_markdown.py:183
↓ 2 callers
Function
get_fulltext_path
Get the fulltext markdown file path for an entry.
scripts/fetch_fulltext.py:243
↓ 2 callers
Function
get_title_str
Get title string, handling both string and dict formats.
scripts/json_to_markdown.py:188
↓ 2 callers
Function
group_by_l1l2
Group standards by (l1, l2) categories.
scripts/generate_standards_pages.py:41
↓ 2 callers
Function
group_nmpa_guidance
Group NMPA guidance entries by device category using Chinese title keywords.
scripts/generate_docs_index.py:194
↓ 2 callers
Method
html_to_markdown
(self, html: str)
scripts/migrate_posts.py:134
↓ 2 callers
Function
is_separator_line
Check if line is a table separator like `---|---|---`.
scripts/fix_markdown_tables.py:16
↓ 2 callers
Function
is_table_data_line
Check if line looks like a table data row (contains | but is not a separator).
scripts/fix_markdown_tables.py:25
↓ 2 callers
Function
normalize_row
Normalize a table row to have leading/trailing pipes.
scripts/fix_markdown_tables.py:37
↓ 2 callers
Function
normalize_separator
Normalize separator row.
scripts/fix_markdown_tables.py:54
↓ 2 callers
Function
normalize_title
Normalize a Chinese title for fuzzy matching.
scripts/migrate_nmpa_fulltext.py:26
↓ 2 callers
Function
process_file
(path: Path, dry_run: bool)
scripts/postprocess_fulltext.py:701
↓ 2 callers
Method
process_file
Process a single Markdown file: find external images, download them, update references. Returns number of images processed.
scripts/download_images.py:172
next →
1–100 of 497, ranked by callers