Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alexferrari88/codestrings
Extracts all the strings from your source code
https://github.com/alexferrari88/codestrings
go golang source-code strings
Last synced: 8 days ago
JSON representation
Extracts all the strings from your source code
- Host: GitHub
- URL: https://github.com/alexferrari88/codestrings
- Owner: alexferrari88
- License: mit
- Created: 2022-09-16T14:14:25.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-09-18T11:43:36.000Z (over 2 years ago)
- Last Synced: 2024-12-16T01:06:07.300Z (13 days ago)
- Topics: go, golang, source-code, strings
- Language: Go
- Homepage:
- Size: 17.6 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
๏ปฟ# codestrings ๐ค
[strings]() but for your source code.
Extracts all the strings from your code.
## Use Cases ๐งโ๐ป
- Facilitate translation of hard-coded text strings
- Quick glance at what a code is "saying" by looking at the strings within it (?)
- NLP (?)## Features โก
- Extract to json or csv
- Multiple files at once
- Single executable_So far, this has been only tested with Javascript._
## Usage โ๏ธ
```bash
codestrings [parameters] file1,file2,file3,...
```### Parameters
```bash
--delimiters
delimiters to use for string extraction (comma separated and escaped) (default "\",',`")
--output
output type: json, csv (default "csv")
```## Examples ๐งช
Let's say you have this javascript file called `example.js`.
```javascript
function greet(name) {
console.log(`Hello ${name}`);
}var fname = "John";
const lname = "Doe";
let age = 42;
let address = {
street: "123 Main St",
city: "New York",
state: "NY",
};
```You can extract all the strings from this file with:
```bash
codestrings example.js
```The output will be:
```bash
example.js,"Hello ${name}","John","Doe","123 Main St","New York","NY"
```## Roadmap ๐ฃ๏ธ
- Add more tests especially with more programming languages
- Improve algorithm performance
## License ๐
[MIT](https://choosealicense.com/licenses/mit/)