Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions demos/demo_discourse_operations.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Demo script for Discourse Analysis Operations in flexlibs2.
Demo script for Discourse Analysis Operations in flexicon.

This script demonstrates the complete workflow for constituent chart analysis
in FieldWorks Language Explorer projects using the flexlibs library.
Expand All @@ -18,7 +18,7 @@
- Write access to project
"""

from flexlibs2 import FLExProject
from flexicon import FLExProject


def demo_constituent_charts(project):
Expand Down
6 changes: 3 additions & 3 deletions demos/demo_scripture_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
import sys
import os

# Add parent directory to path to import flexlibs2
# Add parent directory to path to import flexicon
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))

from flexlibs2 import FLExProject
from flexicon import FLExProject


def demo_scripture_books(project):
Expand Down Expand Up @@ -179,7 +179,7 @@ def demo_scripture_paragraphs(project):
if project.writeEnabled and section:
print(f"\n3. Creating a new paragraph:")
try:
new_para = project.ScrTxtParas.Create(section, "This is a demo paragraph created by flexlibs2.", "Normal")
new_para = project.ScrTxtParas.Create(section, "This is a demo paragraph created by flexicon.", "Normal")
text = project.ScrTxtParas.GetText(new_para)
print(f" Created: {text}")
except Exception as e:
Expand Down
2 changes: 1 addition & 1 deletion demos/demo_wordform_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"""

import sys
from flexlibs2 import FLExProject
from flexicon import FLExProject


def demo_wordform_basics(project):
Expand Down
12 changes: 6 additions & 6 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# FlexLibs2 v2.3.0 - Demo Files and Examples
# flexicon v2.3.0 - Demo Files and Examples

This directory contains comprehensive demonstration files showcasing the FlexLibs2 API for working with FieldWorks Language Explorer (FLEx) projects.
This directory contains comprehensive demonstration files showcasing the flexicon API for working with FieldWorks Language Explorer (FLEx) projects.

## Quick Start

```python
#!/usr/bin/env python3
from flexlibs2 import FLExProject, FLExInitialize, FLExCleanup
from flexicon import FLExProject, FLExInitialize, FLExCleanup

FLExInitialize()
project = FLExProject()
Expand Down Expand Up @@ -169,7 +169,7 @@ All operation demos follow this consistent structure:
#!/usr/bin/env python3
"""Full CRUD Demo: [Operation]Operations for flexlibs"""

from flexlibs2 import FLExProject, FLExInitialize, FLExCleanup
from flexicon import FLExProject, FLExInitialize, FLExCleanup

def demo_[operation]_crud():
FLExInitialize()
Expand Down Expand Up @@ -249,7 +249,7 @@ For questions or issues:
1. Check the CHANGELOG.md in the root directory for API changes
2. Review the docstrings in individual demo files
3. Check `docs/USAGE_*.md` for domain-specific guides
4. Consult the FlexLibs2 API documentation
4. Consult the flexicon API documentation

## Contributing

Expand All @@ -261,5 +261,5 @@ To add new demos or update existing ones:

---

**FlexLibs2 v2.3.0 Examples**
**flexicon v2.3.0 Examples**
**Updated: 2026-02-28**
2 changes: 1 addition & 1 deletion examples/grammar_environment_operations_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Version: 2.3.0
"""

from flexlibs2 import FLExProject, FLExInitialize, FLExCleanup
from flexicon import FLExProject, FLExInitialize, FLExCleanup


def demo_environment_crud():
Expand Down
2 changes: 1 addition & 1 deletion examples/grammar_gramcat_operations_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Version: 2.3.0
"""

from flexlibs2 import FLExProject, FLExInitialize, FLExCleanup
from flexicon import FLExProject, FLExInitialize, FLExCleanup


def demo_gramcat_crud():
Expand Down
2 changes: 1 addition & 1 deletion examples/grammar_inflection_operations_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Version: 2.3.0
"""

from flexlibs2 import FLExProject, FLExInitialize, FLExCleanup
from flexicon import FLExProject, FLExInitialize, FLExCleanup


def demo_inflection_crud():
Expand Down
2 changes: 1 addition & 1 deletion examples/grammar_morphrule_operations_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
Version: 2.3.0
"""

from flexlibs2 import FLExProject, FLExInitialize, FLExCleanup
from flexicon import FLExProject, FLExInitialize, FLExCleanup


def demo_morphrule_crud():
Expand Down
2 changes: 1 addition & 1 deletion examples/grammar_naturalclass_operations_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Version: 2.3.0
"""

from flexlibs2 import FLExProject, FLExInitialize, FLExCleanup
from flexicon import FLExProject, FLExInitialize, FLExCleanup


def demo_naturalclass_crud():
Expand Down
2 changes: 1 addition & 1 deletion examples/grammar_phoneme_operations_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Version: 2.3.0
"""

from flexlibs2 import FLExProject, FLExInitialize, FLExCleanup
from flexicon import FLExProject, FLExInitialize, FLExCleanup


def demo_phoneme_crud():
Expand Down
2 changes: 1 addition & 1 deletion examples/grammar_phonrule_operations_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Version: 2.3.0
"""

from flexlibs2 import FLExProject, FLExInitialize, FLExCleanup
from flexicon import FLExProject, FLExInitialize, FLExCleanup


def demo_phonrule_crud():
Expand Down
2 changes: 1 addition & 1 deletion examples/grammar_pos_operations_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Version: 2.3.0
"""

from flexlibs2 import FLExProject, FLExInitialize, FLExCleanup
from flexicon import FLExProject, FLExInitialize, FLExCleanup


def demo_pos_crud():
Expand Down
16 changes: 8 additions & 8 deletions examples/hierarchical_import_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"""

from datetime import datetime
from flexlibs2.sync import HierarchicalImporter, DependencyConfig, CircularDependencyError, ValidationError
from flexicon.sync import HierarchicalImporter, DependencyConfig, CircularDependencyError, ValidationError


def demo_import_entry_with_senses():
Expand All @@ -23,7 +23,7 @@ def demo_import_entry_with_senses():
print("=" * 60)

# Setup (in real usage, these would be actual FlexProject instances)
from flexlibs2 import FLExProject
from flexicon import FLExProject

source = FLExProject("path/to/consultant_project.fwdata", writeEnabled=False)

Expand Down Expand Up @@ -106,7 +106,7 @@ def demo_import_with_filtering():
print("DEMO: Import with Filtered Owned Objects")
print("=" * 60)

from flexlibs2 import FLExProject
from flexicon import FLExProject

source = FLExProject("source.fwdata", writeEnabled=False)
target = FLExProject("target.fwdata", writeEnabled=True)
Expand Down Expand Up @@ -136,7 +136,7 @@ def demo_import_semantic_domain_with_entries():
print("DEMO: Import Semantic Domain with All Referencing Entries")
print("=" * 60)

from flexlibs2 import FLExProject
from flexicon import FLExProject

source = FLExProject("consultant.fwdata", writeEnabled=False)
target = FLExProject("main.fwdata", writeEnabled=True)
Expand Down Expand Up @@ -172,7 +172,7 @@ def demo_batch_import_multiple_entries():
print("DEMO: Batch Import Multiple Entries")
print("=" * 60)

from flexlibs2 import FLExProject
from flexicon import FLExProject

source = FLExProject("consultant.fwdata", writeEnabled=False)
target = FLExProject("main.fwdata", writeEnabled=True)
Expand Down Expand Up @@ -211,7 +211,7 @@ def demo_handle_validation_errors():
print("DEMO: Handling Validation Errors")
print("=" * 60)

from flexlibs2 import FLExProject
from flexicon import FLExProject

source = FLExProject("source.fwdata", writeEnabled=False)
target = FLExProject("target.fwdata", writeEnabled=True)
Expand Down Expand Up @@ -248,7 +248,7 @@ def demo_handle_circular_dependencies():
print("DEMO: Handling Circular Dependencies")
print("=" * 60)

from flexlibs2 import FLExProject
from flexicon import FLExProject

source = FLExProject("source.fwdata", writeEnabled=False)
target = FLExProject("target.fwdata", writeEnabled=True)
Expand Down Expand Up @@ -289,7 +289,7 @@ def demo_progress_tracking():
print("DEMO: Progress Tracking")
print("=" * 60)

from flexlibs2 import FLExProject
from flexicon import FLExProject

source = FLExProject("source.fwdata", writeEnabled=False)
target = FLExProject("target.fwdata", writeEnabled=True)
Expand Down
2 changes: 1 addition & 1 deletion examples/lexentry_operations_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Version: 2.3.0
"""

from flexlibs2 import FLExProject, FLExInitialize, FLExCleanup
from flexicon import FLExProject, FLExInitialize, FLExCleanup


def demo_lexentry_crud():
Expand Down
2 changes: 1 addition & 1 deletion examples/lexicon_allomorph_operations_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Version: 2.3.0
"""

from flexlibs2 import FLExProject, FLExInitialize, FLExCleanup
from flexicon import FLExProject, FLExInitialize, FLExCleanup


def demo_allomorph_crud():
Expand Down
2 changes: 1 addition & 1 deletion examples/lexicon_etymology_operations_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Version: 2.3.0
"""

from flexlibs2 import FLExProject, FLExInitialize, FLExCleanup
from flexicon import FLExProject, FLExInitialize, FLExCleanup


def demo_etymology_crud():
Expand Down
2 changes: 1 addition & 1 deletion examples/lexicon_example_operations_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Version: 2.3.0
"""

from flexlibs2 import FLExProject, FLExInitialize, FLExCleanup
from flexicon import FLExProject, FLExInitialize, FLExCleanup


def demo_example_crud():
Expand Down
2 changes: 1 addition & 1 deletion examples/lexicon_lexreference_operations_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Version: 2.3.0
"""

from flexlibs2 import FLExProject, FLExInitialize, FLExCleanup
from flexicon import FLExProject, FLExInitialize, FLExCleanup


def demo_lexreference_crud():
Expand Down
2 changes: 1 addition & 1 deletion examples/lexicon_pronunciation_operations_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Version: 2.3.0
"""

from flexlibs2 import FLExProject, FLExInitialize, FLExCleanup
from flexicon import FLExProject, FLExInitialize, FLExCleanup


def demo_pronunciation_crud():
Expand Down
2 changes: 1 addition & 1 deletion examples/lexicon_semanticdomain_operations_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Version: 2.3.0
"""

from flexlibs2 import FLExProject, FLExInitialize, FLExCleanup
from flexicon import FLExProject, FLExInitialize, FLExCleanup


def demo_semanticdomain_crud():
Expand Down
2 changes: 1 addition & 1 deletion examples/lexicon_sense_operations_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Version: 2.3.0
"""

from flexlibs2 import FLExProject, FLExInitialize, FLExCleanup
from flexicon import FLExProject, FLExInitialize, FLExCleanup


def demo_sense_crud():
Expand Down
2 changes: 1 addition & 1 deletion examples/lexicon_variant_operations_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Version: 2.3.0
"""

from flexlibs2 import FLExProject, FLExInitialize, FLExCleanup
from flexicon import FLExProject, FLExInitialize, FLExCleanup


def demo_variant_crud():
Expand Down
2 changes: 1 addition & 1 deletion examples/lists_agent_operations_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# For backward compatibility, singular aliases are also available (e.g., Agent, WritingSystem).
# Both project.Agent and project.Agents refer to the same operations class.

from flexlibs2 import FLExProject, FLExInitialize, FLExCleanup
from flexicon import FLExProject, FLExInitialize, FLExCleanup


def demo_agent_crud():
Expand Down
2 changes: 1 addition & 1 deletion examples/lists_confidence_operations_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Version: 2.3.0
"""

from flexlibs2 import FLExProject, FLExInitialize, FLExCleanup
from flexicon import FLExProject, FLExInitialize, FLExCleanup


def demo_confidence_crud():
Expand Down
2 changes: 1 addition & 1 deletion examples/lists_overlay_operations_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# For backward compatibility, singular aliases are also available (e.g., Agent, WritingSystem).
# Both project.Overlay and project.Overlays refer to the same operations class.

from flexlibs2 import FLExProject, FLExInitialize, FLExCleanup
from flexicon import FLExProject, FLExInitialize, FLExCleanup


def demo_overlay_crud():
Expand Down
2 changes: 1 addition & 1 deletion examples/lists_possibilitylist_operations_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# For backward compatibility, singular aliases are also available (e.g., Agent, WritingSystem).
# Both project.PossibilityList and project.PossibilityLists refer to the same operations class.

from flexlibs2 import FLExProject, FLExInitialize, FLExCleanup
from flexicon import FLExProject, FLExInitialize, FLExCleanup


def demo_possibilitylist_crud():
Expand Down
2 changes: 1 addition & 1 deletion examples/lists_publication_operations_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# For backward compatibility, singular aliases are also available (e.g., Agent, WritingSystem).
# Both project.Publication and project.Publications refer to the same operations class.

from flexlibs2 import FLExProject, FLExInitialize, FLExCleanup
from flexicon import FLExProject, FLExInitialize, FLExCleanup


def demo_publication_crud():
Expand Down
2 changes: 1 addition & 1 deletion examples/lists_translationtype_operations_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# For backward compatibility, singular aliases are also available (e.g., Agent, WritingSystem).
# Both project.TranslationType and project.TranslationTypes refer to the same operations class.

from flexlibs2 import FLExProject, FLExInitialize, FLExCleanup
from flexicon import FLExProject, FLExInitialize, FLExCleanup


def demo_translationtype_crud():
Expand Down
2 changes: 1 addition & 1 deletion examples/notebook_anthropology_operations_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Version: 2.3.0
"""

from flexlibs2 import FLExProject, FLExInitialize, FLExCleanup
from flexicon import FLExProject, FLExInitialize, FLExCleanup


def demo_anthropology_crud():
Expand Down
2 changes: 1 addition & 1 deletion examples/notebook_datanotebook_operations_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Version: 2.3.0
"""

from flexlibs2 import FLExProject, FLExInitialize, FLExCleanup
from flexicon import FLExProject, FLExInitialize, FLExCleanup


def demo_datanotebook_crud():
Expand Down
2 changes: 1 addition & 1 deletion examples/notebook_location_operations_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Version: 2.3.0
"""

from flexlibs2 import FLExProject, FLExInitialize, FLExCleanup
from flexicon import FLExProject, FLExInitialize, FLExCleanup


def demo_location_crud():
Expand Down
Loading
Loading