{"id":25180517,"url":"https://github.com/rsdc2/isicily-element-ids","last_synced_at":"2025-04-04T04:47:00.991Z","repository":{"id":213158255,"uuid":"730741084","full_name":"rsdc2/isicily-element-ids","owner":"rsdc2","description":"ID generator and resolver for I.Sicily element IDs","archived":false,"fork":false,"pushed_at":"2024-06-25T19:12:22.000Z","size":451,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-09T16:18:37.556Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://rsdc2.github.io/isicily-element-ids/","language":"JavaScript","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/rsdc2.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"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":"2023-12-12T15:15:39.000Z","updated_at":"2024-06-25T19:12:25.000Z","dependencies_parsed_at":"2024-02-20T18:29:36.832Z","dependency_job_id":"2544c689-9b6e-43e5-872e-b0cb0887982d","html_url":"https://github.com/rsdc2/isicily-element-ids","commit_stats":null,"previous_names":["rsdc2/isicily-element-ids"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsdc2%2Fisicily-element-ids","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsdc2%2Fisicily-element-ids/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsdc2%2Fisicily-element-ids/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsdc2%2Fisicily-element-ids/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rsdc2","download_url":"https://codeload.github.com/rsdc2/isicily-element-ids/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247123097,"owners_count":20887260,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2025-02-09T16:18:39.541Z","updated_at":"2025-04-04T04:47:00.967Z","avatar_url":"https://github.com/rsdc2.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Element ID generator and resolver for I.Sicily (α, currently under active development)\n\nThis is a resolver and generator for token IDs on token elements in the [I.Sicily](https://github.com/ISicily/ISicily) corpus of inscriptions from ancient Sicily.\n\n**NB At present full functionality is not available in Firefox.**\n\n## I.Sicily element IDs\n\n### Background\n\nI.Sicily token IDs are underlyingly of the form ```ISic012345-12345```, where the first six digits ```012345``` correspond to the document ID; the five digits ```12345``` after the dash correspond to a number assigned to each token in the document. These are sequentially ordered through the document. However, to provide flexibility for the insertion of extra tokens in future, token IDs have a final ```0```, giving 9 extra IDs on each side for new elements, as they are needed. (It is, of course, highly unlikely that all this extra space will be needed.) \n\nFor example ```ISic000001-00020``` would in in principle represent the second token in the document ```ISic000001```.\n\n### Compressing IDs for use in XML documents\n\nPlacing such a long ID in an EpiDoc XML document significantly reduces readability. Accordingly, it is desirable to compress the ID, without losing any information. \nIn XML documents, therefore, the IDs are compressed to a five-digit string consisting of\nupper and lower case Roman characters, and upper and lower case Greek characters, i.e. ```A-Z```, ```a-z```, ```Α-Ω``` and ```α-ω```. For example, ```ISic000001-00020``` is represented as ```AAKAU```.\n\nThe compression is simply the numerical part of the underlying ID, as a single string, represented in Base 100, where the characters ```A-Z``` correspond to ```0-25``` in decimal, the characters ```a-z``` correspond to ```26-51```,  ```Α-Ω``` to ```52-76``` and ```α-ω``` to ```77-100```. The procedure is:\n\n1. Remove non-numeric characters: ```ISic000001-00020 -\u003e 00000100020```\n2. Convert the resulting decimal number to Base 52: ```00000100020 -\u003e 100020 -\u003e KAU```\n3. Pad the resulting string with the '0' character 'A' to make a five digit string, as necessary: ```KAU -\u003e AAKAU```\n\n### Maxima\n\nA consequence of limiting the Base 100 representation to 5 digits is that the maximum decimal number that can be represented is lower than the theoretical maximum decimal number from an ISicily token ID, i.e. ```ISic999999-9999 -\u003e 9999999999```. \n\nThe maximum Base 100 number is ```ωωωωω```, which corresponds to ```9999999999 -\u003e ISic099999-99999```.\n\n### Converting from Base 52 IDs\n\nPreviously a particular implementation of Base 52 was used to render IDs (see https://github.com/rsdc2/ISicID). It is possible to convert between these ID systems. To do this, click the button \"Convert old IDs\". This will load a dialog box where you can choose a CSV file containing the IDs you wish to convert.\n\nThe CSV file must adhere to the following format:\n\n- The file must have only one column;\n- The first line of the CSV file must specify the Base of the source ID (currently either 52 or 100);\n- The second line of the CSV file must specify the Base of the destination ID (currently either 52 or 100)\n\n## Running and building\n\n### On Github Pages\n\nFollow this link:\n\n[https://rsdc2.github.io/isicily-element-ids/](https://rsdc2.github.io/isicily-element-ids/)\n\n### Running locally\n\n- Clone the repository:\n\n```\ngit clone https://github.com/rsdc2/isicily-element-ids.git\n```\n\n- Cd into the cloned directory:\n\n```\ncd isicily-element-ids\n```\n\n- Install dependency ([```http-server```](https://www.npmjs.com/package/http-server)):\n\n```\nnpm install\n```\n\n- Run the server locally:\n\n```\nnpx http-server\n```\n\n- Open localhost according to the message provided by ```http-server```:\n\n```\nhttp://localhost:8080/\n```\n\n\n### Building\n\nThe Element ID resolver / generator is written in Vanilla JavaScript. No building is required.\n\n### Running the tests\n\nFrom the repository root directory:\n\n```\nnode --test\n```\n\n## Dependencies\n\nThe Element ID resolver / generator requires:\n\n1. [`http-server`](https://www.npmjs.com/package/http-server) (MIT, see LICENSES folder) to run locally;\n2. [`jsdom`](https://github.com/jsdom/jsdom) (MIT, see LICENSES folder) to run tests.\n\n## Acknowledgements\n\nThe software for the ISicily Element ID resolver / generator was written by Robert Crellin as part of the Crossreads project at the Faculty of Classics, University of Oxford, and is licensed under the MIT license. This project has received funding from the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (grant agreement No 885040, “Crossreads”).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frsdc2%2Fisicily-element-ids","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frsdc2%2Fisicily-element-ids","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frsdc2%2Fisicily-element-ids/lists"}