Coder Social home page Coder Social logo

rtfcre's Introduction

Sammi De Guzman 陳慧珊 🇵🇭 🇭🇰 🇨🇦

Hi! I'm Sammi (she/her), a software engineer at Twitter, and currently based in San Francisco, California. I studied Computer Science at the University of Toronto, where I previously worked as a teaching assistant.

I like to cook, write code, design pretty websites, take transit, fly virtual planes, and run around a deserted island in my spare time.

rtfcre's People

Contributors

sammdot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

rtfcre's Issues

Line breaks and tabs are not escaped properly

\cxds\n\cxds gets translated as {^}\\n{^} rather than {^}\n{^}, which results in writing a literal "\n".

May need to implement \cxplvrnl and \cxplvrtab in order to properly support whitespace characters.

pip install rtfcre NOT WORKING!!!

it says this
pip install rtfcre

ERROR: Could not find a version that satisfies the requirement rtfcre (from versions: none)
ERROR: No matching distribution found for rtfcre

ii tried to clode the repository but still not working
git clone https://github.com/sammdot/rtfcre.git

remote: Enumerating objects: 403, done.
Receiving objects: 99% (399/403)ed 0 (delta 0), pack-reused 403
Receiving objects: 100% (403/403), 65.79 KiB | 455.00 KiB/s, done.
Resolving deltas: 100% (236/236), done.
PS G:\OneDrive - University of Engineering and Technology Taxila\python Freelancig\transcriptions> cd rtfcre

PS G:\OneDrive - University of Engineering and Technology Taxila\python Freelancig\transcriptions\rtfcre> pip install .

Support Plover-specific control words without ignored groups

For control words like \cxplvrcancel or \cxplvrrtfcw that don't have anything coming after them that might be interpreted as content, allow them to be included in the rest of the translation code without being in an ignored group.

For example: {\*\cxplvrortho}\cxds ish may be written simply as \cxplvrortho\cxds ish.

Recognize non-English steno strokes

Steno groups currently do allow Unicode text, but they remain escaped. Recognizing non-English keys would allow for using theories like plover-korean.

Example:

{\*\cxs \u12615\u12636\u12593\u12599}\u50864\u47532\u44032

translates to the following JSON entry:

{
  "ㅇㅜㄱㄷ": "우리가",
}

Support lookahead translations

Regular expression lookahead translations are now supported in Plover 4.0.0-dev8, allowing translations to change depending on the following text. Add a new control word \cxplvrlap (LookAhead Pattern) to specify the lookahead pattern, and then \cxplvrlam (LookAhead Match) for the text that will be used as the translation when the lookahead matches.

Plover syntax:

{=(?i)t/true/false}
{:if_next_matches:(?i)t/true/false}

Proposed RTF syntax:

false{\*\cxplvrlap (?i)t}{\*\cxplvrlam true}

This would allow steno engines that do not support lookaheads to automatically default to the false (i.e. lookahead does not match) translation.

Support prefix strokes

Plover 4.0.0-dev8 added support for prefix strokes, which are indicated in the steno part of the dictionary, not the translation. This is incompatible with RTF, so we introduce a new control word \cxplvrprfx to support this behavior, and \cxplvrwdend for the corresponding {$} operator to indicate the end of a word.

New ortho-attach control word

For specifying whether an attachment should be orthographically aware or just a raw attach. Would solve issues with punctuation attachment especially.

Fix Unicode support

– All characters represented with Unicode escapes should also use placeholder characters for non-supporting RTF readers: e.g. my Luminex II translates "San José" San Jos\u233 as "San Jos", ignoring the e entirely
– Unicode characters from U+8000 to U+FFFF should use negative numbers
– Unicode characters above U+FFFF should be represented in UTF-16 encoding

Reference: https://www.zopatista.com/python/2012/06/06/rtf-and-unicode/

RTF files encoded in ISO-8859-1 (or Windows-1252?) can't be parsed

Emily (EPL/HREU) on the Plover Discord:

i've got a bit of an issue with dictionaries and looking for support
so i just got the magnum steno dictionary in RTF/CRE format all good
and i can load it into plover as RTF and that seems to work, it just takes a long time to do so as it's not native .json
I'd like to convert it to json - but i'm running into issues around UTF8 and such
there are a few entries (such as the one shown above) that have UTF8 codes in them, and rtfcre doesn't like that and I can't work out how to get around this
image

magnum.rtf: text/rtf; charset=iso-8859-1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.