{"id":22341758,"url":"https://github.com/weaponsforge/hili-lipsum","last_synced_at":"2026-02-21T18:12:09.587Z","repository":{"id":52075941,"uuid":"520715233","full_name":"weaponsforge/hili-lipsum","owner":"weaponsforge","description":"Hilichurlian language lorem ipsum generator and web scraper","archived":false,"fork":false,"pushed_at":"2025-02-09T15:56:44.000Z","size":265,"stargazers_count":2,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"dev","last_synced_at":"2025-08-28T05:11:41.880Z","etag":null,"topics":["css","genshin","genshin-impact","genshinimpact","hacktoberfest","hilichurlian","html","javascript","lorem-ipsum","lorem-ipsum-generator","node","nodejs"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/hili-lipsum","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/weaponsforge.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-03T02:43:48.000Z","updated_at":"2025-05-02T20:42:40.000Z","dependencies_parsed_at":"2025-01-23T20:34:44.941Z","dependency_job_id":null,"html_url":"https://github.com/weaponsforge/hili-lipsum","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/weaponsforge/hili-lipsum","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaponsforge%2Fhili-lipsum","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaponsforge%2Fhili-lipsum/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaponsforge%2Fhili-lipsum/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaponsforge%2Fhili-lipsum/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weaponsforge","download_url":"https://codeload.github.com/weaponsforge/hili-lipsum/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaponsforge%2Fhili-lipsum/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29554369,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T18:16:07.221Z","status":"ssl_error","status_checked_at":"2026-02-17T18:16:04.782Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["css","genshin","genshin-impact","genshinimpact","hacktoberfest","hilichurlian","html","javascript","lorem-ipsum","lorem-ipsum-generator","node","nodejs"],"created_at":"2024-12-04T08:08:09.718Z","updated_at":"2026-02-17T19:01:12.904Z","avatar_url":"https://github.com/weaponsforge.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"## hili-lipsum\n\nHilichurlian language lorem ipsum generator and web scraper using data from the Genshin Impact Fandom Wiki at https://genshin-impact.fandom.com/wiki/Hilichurlian/Lexicon.\n\n\n### Data Structure\n\nThe `\"npm run scrape\"` web scraper script extracts Hilichurlian language data from https://genshin-impact.fandom.com/wiki/Hilichurlian/Lexicon into an array of JSON Objects under the `\"data\"` key.\n\nIt has the following format and structure:\n\n| Key | Type | Description |\n| --- | --- | --- |\n| `word` | string | Hilichurlian (singular or plural) word |\n| `eng` | string | English translation of the Hilichurlian word |\n| `cn` | string | Chinese player analysis translation of the Hilichurlian word |\n| `notes` | string | Notes and additional information about the Hilichurlian word |\n\n### Example\n\n```\n{\n  \"metadata\": {\n    \"source\": \"https://genshin-impact.fandom.com/wiki/Hilichurlian/Lexicon\",\n    \"title\": \"Hilichurlian Language Dictionary\",\n    \"description\": \"Dictionary of Hilichurlian words and their English translations exctracted from the source URL.\",\n    \"date_created\": \"2024-10-19T08:11:48.917Z\"\n  },\n  \"data\": [\n    {\n      \"word\": \"da\",\n      \"eng\": \"good/very good, affirmation, very (emphasis)\",\n      \"cn\": \"\",\n      \"notes\": \"Can be used as praise\"\n    },\n    ...\n  ]\n}\n```\n\nCheckout the full web-scraped data in the `/data/hilichurlianDB.json` file for more information.\n\n## Contributing\n\nWe welcome contributions! Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines.\n\n## Requirements\n\nThe following requirements were used for this project. Feel free to use other dependencies and versions as needed.\n\n\n1. Windows 10 OS\n2. NodeJS LTS v20 or higher\n   ```\n   Recommended:\n   node: v20.15.0\n   npm: v10.7.0\n   ```\n\n## Content\n\n- [hili-lipsum](#hili-lipsum)\n- [Data Structure](#data-structure)\n- [Contributing](#contributing)\n- [Requirements](#requirements)\n- [Content](#content)\n- [Installation](#installation)\n- [Available Scripts](#available-scripts)\n  - [`npm run scrape`](#npm-run-scrape)\n  - [`npm run hipsum`](#npm-run-hipsum)\n  - [`npm run lint`](#npm-run-lint)\n  - [`npm run lint:fix`](#npm-run-lintfix)\n- [Usage with Docker](#usage-with-docker)\n   - [Preparing the Local Image](#preparing-the-local-image)\n   - [Using the Docker Image](#using-the-docker-image)\n- [Class Usage](#class-usage)\n  - [`Hilichurl` Class](#hilichurl-class)\n  - [`Hilipsum` Class](#hilipsum-class)\n- [Deployment with GitHub Actions](#deployment-with-gitHub-actions)\n\n## Installation\n\n1. Clone this repository.\u003cbr\u003e\n`git clone https://github.com/weaponsforge/hili-lipsum.git`\n\n2. Install dependencies.\u003cbr\u003e\n`npm install`\n\n3. Create a `.env` file from the `.env.example` file. Use the default value for `HILICHURLIAN_TEXT_URL`.\n\n   | Variable Name | Description |\n   | --- | --- |\n   | HILICHURLIAN_TEXT_URL | Target web page to scrape, containing Hilichurilian words definition.\u003cbr\u003eDefault value is: https://genshin-impact.fandom.com/wiki/Hilichurlian/Lexicon \u003cbr\u003e\u003cbr\u003e You can reference other Hilichurlian words wiki or web page to scrape, but be be sure to make the necessary adjustments on the web scraping logic on `/src/classes/hilichurl/hilichurl.js` - **scrapewords()** and **formatwords()** methods. |\n\n\n## Available Scripts\n\n### `npm run scrape`\n\nDownload, scrape and format hilichurlian words from the `HILICHURLIAN_TEXT_URL` .env variable.\nWrites the extracted and formatted words into a `/hilichurlianDB-\u003cTIMESTAMP\u003e.json` file.\n\n### `npm run hipsum`\n\n- Generates a random ipsum-like Hilichurlian sentence consisting of 15 words by default.\n- Generates a random Hilichurlian sentence consisting of `N` words if provided with the `--wordcount` flag:\u003cbr\u003e\n\n   ```\n   npm run hipsum --wordcount=100\n   ```\n\n### `npm run lint`\n\nLint JavaScript source codes.\n\n### `npm run lint:fix`\n\nFix JavaScript lint errors.\n\n### `npm run scrape:debug`\n\nSets the `IS_DOCKER=true` environment variable before running the `npm run scrape` script to enable debugging with VSCode inside a container.\n\n\u003e This command runs only in a Linux environment.\n\n### `npm run create:declaration`\n\nGenerates TypeScript declaration `.d.ts` files from the CommonJS JavaScript classes and scripts.\n\n### `npm test`\n\nRun tests defined in the `__tests__` directory.\n\n## Usage with Docker\n\nPulling and using the Docker image requires a `.env` variable before proceeding. Create a `.env` first from the `.env.example` file as instructed in the [Installation](#installation) section.\n\n### Preparing the Local Image\n\nObtain the development Docker image using any of the two (2) options. Navigate to the repository's root directory using a terminal, then run:\n\n- **Pull the Pre-Built Docker Image**\u003cbr\u003e\n`docker compose -f docker-compose.dev.yml pull`\n\n- **Build the Local Image**\u003cbr\u003e\n`docker compose -f docker-compose.dev.yml build`\n\n### Using the Docker Image\n\n1. Run the development container.\u003cbr\u003e\n`docker compose -f docker-compose.dev.yml up`\n\n2. Run the [Available Scripts](#available-scripts) using the container. For example:\u003cbr\u003e\n`docker exec -it weaponsforge-hili-lipsum npm run scrape`\n\n## Class Usage\n\n### `Hilichurl` Class\n\nThe `Hilichurl` Class allows to specify a local JSON file to use as a word dictionary. The JSON file should follow the format in `/data/hilichurlianDB.json`\n\n```javascript\nconst { Hilichurl } = require('./src/lib/classes/hilichurl')\nconst path = require('path')\n\n// Use the the following if installed via npm\n// const { Hhilichurl } = require('hili-lipsum')\n\nconst main = async () =\u003e {\n  try {\n    // Instantiate a new Hilichurl class with local JSON data\n    const dataPath = path.join(__dirname, 'data', 'hilichurlianDB.json')\n    const hilichurl = new Hilichurl(dataPath)\n\n    // Load new local JSON data\n    hilichurl.loadrecords(dataPath)\n\n    // Generate a random-word sentence\n    const sentence = hilichurl.lipsum(40)\n    console.log(sentence)\n\n    // Download and replace the current word dictionary\n    await hilichurl.fetchrecords()\n\n    // Write the word dictionary to a JSON file\n    hilichurl.writerecords()\n  } catch (err) {\n    console.log(err.message)\n  }\n}\n\nmain()\n```\n\n### `Hilipsum` Class\n\nThe `Hilipsum` class is a sub-class of `Hilichurl`. It automatically loads the local JSON word dictionary (`/data/hilichurlianDB.json`) on initialization.\n\n```javascript\nconst { Hilipsum } = require('./src/lib/classes/hilipsum')\n\n// Use the the following if installed via npm\n// const { Hilipsum } = require('hili-lipsum')\n\nconst hiLipsum = new Hilipsum()\n\n// Generate a random hilichurlian sentence\nconsole.log(hiLipsum.lipsum())\n```\n\n## Deployment with GitHub Actions\n\nThis repository deploys the latest **local development** Docker image to Docker Hub. It publishes the latest tag version to the NPM registry on the creation of new Release/Tags from the `master` branch.\n\nAdd the following GitHub Secrets and Variables to enable deployment to Docker Hub and the NPM registry.\n\n**Docker Hub**\u003cbr\u003e\nhttps://hub.docker.com/r/weaponsforge/hili-lipsum\n\n**NPM Registry**\u003cbr\u003e\nhttps://www.npmjs.com/package/hili-lipsum\n\n#### GitHub Secrets\n\n| GitHub Secret | Description |\n| --- | --- |\n| DOCKERHUB_USERNAME | (Optional) Docker Hub username. Required to enable pushing the development image to Docker Hub. |\n| DOCKERHUB_TOKEN | (Optional) Deploy token for the Docker Hub account. Required to enable pushing the development image to Docker Hub. |\n| NPM_TOKEN | NPM registry deployment token. |\n\n#### GitHub Variables\n\n| GitHub Variable | Description |\n| --- | --- |\n| DOCKERHUB_USERNAME | (Optional) Docker Hub username. Required to enable pushing the development image to Docker Hub. |\n\n\u003cbr\u003e\n\n@weaponsforge\u003cbr\u003e\n20220805\u003cbr\u003e\n20241018\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweaponsforge%2Fhili-lipsum","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweaponsforge%2Fhili-lipsum","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweaponsforge%2Fhili-lipsum/lists"}