NoteTag — Aspose.Note FOSS for Python API Reference

क्लास: NoteTag

ImageRenderOptions: aspose.note ImageRenderOptions: from aspose.note import NoteTag ImageRenderOptions: Node

NoteTag एक OneNote टैग आइकन (स्टार, चेकबॉक्स, महत्वपूर्ण मार्कर, आदि) को दर्शाता है जो एक कंटेंट नोड से जुड़ा होता है। टैग दिखाई देते हैं RichText, Image, AttachedFile, OutlineElement,और Table नोड्स उनके द्वारा .Tags प्रॉपर्टी।.


ImageRenderOptions

सभी प्रॉपर्टीज़ केवल-रीड हैं और MS-ONE बाइनरी फॉर्मेट से सीधे पार्स किए गए मानों को दर्शाती हैं।.

ImageRenderOptionsImageRenderOptionsImageRenderOptionsImageRenderOptions
shape`intNone`None
label`strNone`None
text_color`intNone`None
highlight_color`intNone`None
created`intNone`None
completed`intNone`None

Node से विरासत में मिला

ImageRenderOptionsImageRenderOptionsImageRenderOptions
ParentNode`NodeNone`
Document`DocumentNone`

टाइमस्टैम्प नोट

created और completed MS-ONE बाइनरी फ़ॉर्मेट से पार्स किए गए कच्चे पूर्णांक टाइमस्टैम्प हैं। वे हैं नहीं datetime ऑब्जेक्ट नहीं हैं। यदि आपको उन्हें Python डेटटाइम के रूप में उपयोग करना है, तो रूपांतरण सूत्र के लिए MS-ONE फ़ाइल फ़ॉर्मेट स्पेसिफिकेशन देखें।.


फ़ैक्टरी मेथड्स

NoteTag.CreateYellowStar()

tag = NoteTag.CreateYellowStar() -> NoteTag

एक नया लौटाता है NoteTag के साथ shape=None और label="Yellow Star". प्रोग्रामेटिक रूप से दस्तावेज़ बनाते समय उपयोगी है।.


उपयोग उदाहरण

दस्तावेज़ में सभी टैग किए गए तत्वों की सूची बनाएं

from aspose.note import Document, RichText, Image, AttachedFile, OutlineElement

doc = Document("MyNotes.one")

# Tags on RichText
for rt in doc.GetChildNodes(RichText):
    for tag in rt.Tags:
        print(f"RichText tag: label={tag.label!r}  on: {rt.Text.strip()[:40]!r}")

# Tags on Images
for img in doc.GetChildNodes(Image):
    for tag in img.Tags:
        print(f"Image tag: label={tag.label!r}  file={img.FileName!r}")

# Tags on AttachedFiles
for af in doc.GetChildNodes(AttachedFile):
    for tag in af.Tags:
        print(f"Attachment tag: label={tag.label!r}  file={af.FileName!r}")

अपूर्ण “To Do” टैग्स के लिए फ़िल्टर करें

from aspose.note import Document, RichText

doc = Document("MyNotes.one")
for rt in doc.GetChildNodes(RichText):
    for tag in rt.Tags:
        if tag.label and "to do" in tag.label.lower() and tag.completed is None:
            print(f"Incomplete TODO: {rt.Text.strip()!r}")

None-सुरक्षा

label, shape, text_color, highlight_color, created, और completed सभी हो सकते हैं None. उपयोग से पहले सावधान रहें।. Tags कंटेंट नोड्स पर सूचियाँ हमेशा सूचियाँ होती हैं (कभी नहीं None), लेकिन खाली हो सकती हैं।.


संबंधित देखें

 हिन्दी