My Ghost Writer
A simple helper for writers.
Overview
My Ghost Writer is a web application that analyzes text and provides words frequency statistics. It allows users to upload or type in a text, and then displays the most common words, their frequencies and their position with the text editor. The application uses natural language processing (NLP) techniques to stem words, making it easier to identify patterns and trends in the text.
Features
- Analyse large texts and provide words frequency statistics
- Use NLP to stem words for more accurate results
- Support for uploading or typing in text
- User-friendly interface with a simple editor and display of word frequencies
Technologies Used
- Python 3.10+ (FastAPI web framework)
- a Vanilla JavaScript frontend, playwright for E2E testing
nltklibrary for natural language processingstructlogfor logging and error handling
Getting Started
In a Linux/WSL environment (I didn't tried with MacOS or Windows):
-
Clone the repository using
git clone https://github.com/trincadev/my_ghost_writer,cd my_ghost_writer -
Create a virtualenv and install the project dependencies using an existing python version with
- poetry (
poetry env use 3.12.10,poetry install,eval $(poetry env activate)) python -m venv .venv,source .venv/bin/activate,pip install -r requirements.txt(and the other requirements files if you need also the webserver and/or the test environment)
- poetry (
-
Run the application using:
python my_ghost_writer/app.pyusing the python app.py file pathpython -m ghost_writer.app.pyusing the python module
Run as a python module
If using the webserver with the module (python -m ghost_writer.app.py) it's necessary one of these env variables:
STATIC_FOLDERto define a custom path for the static folder. Probably you should also download the static files:index.htmlindex.jsindex.css
API_MODEto avoid mounting the static folder. This will define only the API endpoints/health/words-frequency
Installation script
An alternate way to use the project is installing it using install.sh. e.g.
bash ./install.sh
If you want to run my custom frontend using this script (available on default on port 7860):
- use the install-only option
- define a custom path for
STATIC_FOLDERand use it for the module execution:
# run the script with the install-only option
bash install.sh -i
# run the python module with the custom STATIC_FOLDER env variable, e.g.
# if you already created STATIC_FOLDER within the current directory with the needed files within, see above
export STATIC_FOLDER=$PWD/static
python -m my_ghost_writer.app
Contributing
Pull requests are welcome! Please make sure to test your changes thoroughly before submitting a pull request.
This project is still in its early stages, and there are many features that can be added to make it more useful for writers.
If you have any suggestions or would like to contribute to the project, please don't hesitate to reach out!
Metadata
Release files for my-ghost-writer 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| my_ghost_writer-0.3.0.tar.gz | 19.7 kB | Without provenance | Details for my_ghost_writer-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| my_ghost_writer-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for my_ghost_writer-0.3.0-py3-none-any.whl |
Total release size: 42.2 kB
Release files / my_ghost_writer-0.3.0.tar.gz
| Download URL | my_ghost_writer-0.3.0.tar.gz |
|---|---|
| Size | 19.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
86c883b24b7bef12e15aff4b3153a1d19e4c08ba30668726b14105b248877b21
|
|
BLAKE2b-256 checksum How to use checksums |
e0a86e7840e1aa2a40e9488ee712b59a91ed7fbbbd37fe0a5a60fed26ec8d2d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.2 CPython/3.12.3 Linux/5.15.167.4-microsoft-standard-WSL2
|
Release files / my_ghost_writer-0.3.0-py3-none-any.whl
| Download URL | my_ghost_writer-0.3.0-py3-none-any.whl |
|---|---|
| Size | 22.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3e7d6270d278de3cde8f2fffbda19636585d2f5b5eed105025a4d0b7951c7994
|
|
BLAKE2b-256 checksum How to use checksums |
08b2b1e3bba470b2dfdc599b612b47427e9de2af847463d557a8b44440efdb22
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.2 CPython/3.12.3 Linux/5.15.167.4-microsoft-standard-WSL2
|
Security for my-ghost-writer 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.