视觉画布设计
canvas-design
基于设计原则创作静态视觉作品,用于海报与品牌图形。
israeli-gov-form-automator【文档与办公】Automate Israeli government form filling via Playwright browser automation and PDF population. Prevents hours of manual form filling and data entry errors on government portals. Use when user asks about filling government forms, "tofes" (form), "milui tfasim" (form filling), "gov.il" portal submissions, online form submission, Rashut HaMisim (Tax Aut…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Ask the user which government form or process they need to automate:
| Portal | URL | Common Forms | Hebrew |
|---|---|---|---|
| gov.il Services | www.gov.il | General government forms | שירותי ממשלה |
| Rashut HaMisim (Tax Authority) | www.misim.gov.il | Doch Shnati, Mas Hachnasa, Nikui Mas | רשות המסים |
| Bituach Leumi (National Insurance) | www.btl.gov.il | Maternity, disability, unemployment claims | ביטוח לאומי |
| Rasham HaChevarot (Companies Registrar) | www.ica.justice.gov.il | Company registration, annual reports | רשם החברות |
| Misrad HaPnim (Interior Ministry) | www.gov.il/he/departments/ministry_of_interior | Teudat Zehut updates, address changes | משרד הפנים |
Clarify:
Before filling any form, validate all Israeli-format data:
Teudat Zehut (ID Number) Validation: The Israeli ID is 9 digits with a check digit (Luhn variant):
def validate_tz(id_number: str) -> bool:
"""Validate Israeli Teudat Zehut number."""
id_str = id_number.zfill(9)
if len(id_str) != 9 or not id_str.isdigit():
return False
total = 0
for i, digit in enumerate(id_str):
val = int(digit) * (1 + (i % 2))
if val > 9:
val -= 9
total += val
return total % 10 == 0
Israeli Phone Number Formats:
| Format | Example | Notes |
|---|---|---|
| Mobile | 05X-XXXXXXX | Prefixes: 050, 051, 052, 053, 054, 055, 058 |
| Landline | 0X-XXXXXXX | Area codes: 02 (Jerusalem), 03 (Tel Aviv), 04 (Haifa), 08 (South), 09 (Sharon) |
| International | +972-5X-XXXXXXX | Drop leading 0, add +972 |
Israeli Address Format:
{street_name} {house_number}, {apartment} (optional)
{city_name}, {mikud (postal code - 7 digits)}
Install and configure Playwright for Hebrew RTL government portals:
pip install playwright
playwright install chromium
Key patterns for gov.il portals:
from playwright.sync_api import sync_playwright
with sync_playwright() as p:
browser = p.chromium.launch(headless=False)
context = browser.new_context(locale="he-IL")
page = context.new_page()
# Note: Replace with specific service URL as needed
page.goto("https://www.gov.il/he/")
# Gov.il uses React-based forms; wait for dynamic load
page.wait_for_selector('[data-testid="form-container"]', timeout=15000)
# Fill RTL text fields
page.fill('input[name="firstName"]', "ישראל")
page.fill('input[name="lastName"]', "ישראלי")
page.fill('input[name="idNumber"]', "123456782")
# Handle date pickers (DD/MM/YYYY format in Israel)
page.fill('input[name="birthDate"]', "15/03/1990")
# Handle dropdowns with Hebrew options
page.select_option('select[name="city"]', label="תל אביב-יפו")
For downloadable government PDFs with fillable fields:
# Option 1: pikepdf (recommended)
import pikepdf
pdf = pikepdf.open("tofes_101.pdf")
pdf.pages[0]["/Annots"] # Inspect form field names
# Option 2: PyPDF2
from PyPDF2 import PdfReader, PdfWriter
reader = PdfReader("tofes_101.pdf")
fields = reader.get_fields()
writer = PdfWriter()
writer.append(reader)
writer.update_page_form_field_values(
writer.pages[0],
{"shem_prati": "ישראל", "shem_mishpacha": "ישראלי"}
)
Common PDF field naming conventions in government forms:
| Field Purpose | Common Hebrew Names | English Equivalent |
|---|---|---|
| First name | shem_prati, shem_praty | first_name |
| Last name | shem_mishpacha, shem_mishpaha | last_name |
| ID number | mispar_zehut, tz | id_number |
| Date of birth | taarich_leida | birth_date |
| Address | ktovet, rechov | address, street |
| City | yishuv, ir | city |
| Phone | telefon, nayad | phone, mobile |
| Employer | maasik | employer |
Doch Shnati (Annual Tax Report):
Bituach Leumi Claims:
Companies Registrar Filings:
After filling the form:
Common issues with government portals:
User says: "I need to fill Tofes 101 for my new employee" Actions:
User says: "Help me file a maternity benefit claim with Bituach Leumi" Actions:
User says: "I want to register a new Chevra Ba'am (Ltd company)" Actions:
User says: "I moved apartments and need to update my address" Actions:
scripts/fill_form.py -- Helper to validate Israeli form fields (Teudat Zehut, phone, address) and populate common government form data structures. Run: python scripts/fill_form.py --helpreferences/gov-portals.md -- Comprehensive list of Israeli government portal URLs, form types, and field naming conventions. Consult when identifying the correct portal or form for a given task.| Source | URL | What to Check |
|---|---|---|
| Gov.il main portal | https://www.gov.il | Form listings, service index, authentication entry |
| Israel Tax Authority services | https://www.gov.il/he/departments/israel_tax_authority | Tax forms, online submission portals |
| Bituach Leumi (NII) | https://www.btl.gov.il | NII forms, claim submission, personal account |
| Companies Registrar (ICA) | https://ica.justice.gov.il | Company filings and updates |
| Playwright docs | https://playwright.dev | RTL context, form automation, waits |
Cause: Government portal sessions time out after prolonged inactivity Solution: Re-authenticate and resume from the last saved step. Save partial progress frequently.
Cause: ID number fails check digit validation
Solution: Run validate_tz() before submission. Ensure 9 digits with leading zeros if needed.
Cause: PDF library does not support RTL text or Hebrew fonts Solution: Use pikepdf with embedded Hebrew fonts. Ensure the PDF template already has Hebrew font resources.
Cause: Government PDFs change field names between versions
Solution: List all fields with reader.get_fields() first, then match by inspecting field labels.