GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: add filename formatter and directory workflow (#76) · javascript-space/TypeScript@aab3f30

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • .github/workflows
    • directory_formatter.yml
  • DIRECTORY.md
  • ciphers
    • test
      • xor_cipher.test.ts
    • xor_cipher.ts
  • data_structures
    • stack.ts
    • test
      • stack.test.ts
  • dynamic_programming
    • knapsack.ts
    • test
      • knapsack.test.ts
  • maths
    • absolute_value.ts
    • aliquot_sum.ts
    • armstrong_number.ts
    • binary_convert.ts
    • calculate_mean.ts
    • degrees_to_radians.ts
    • digit_sum.ts
    • factorial.ts
    • fibonacci.ts
    • find_min.ts
    • greatest_common_factor.ts
    • is_divisible.ts
    • is_even.ts
    • is_leap_year.ts
    • is_odd.ts
    • perfect_square.ts
    • radians_to_degrees.ts
    • sieve_of_eratosthenes.ts
    • test
      • absolute_value.test.ts
      • aliquot_sum.test.ts
      • armstrong_number.test.ts
      • binary_convert.test.ts
      • calculate_mean.test.ts
      • degrees_to_radians.test.ts
      • digit_sum.test.ts
      • factorial.test.ts
      • fibonacci.test.ts
      • find_min.test.ts
      • greatest_common_factor.test.ts
      • is_divisible.test.ts
      • is_even.test.ts
      • is_leap_year.test.ts
      • is_odd.test.ts
      • perfect_square.test.ts
      • radians_to_degrees.test.ts
      • sieve_of_eratosthenes.test.ts
  • search
    • binary_search.ts
    • test
      • binary_search.test.ts
  • sorts
    • bubble_sort.ts
    • gnome_sort.ts
    • insertion_sort.ts
    • merge_sort.ts
    • quick_sort.ts
    • test
      • bubble_sort.test.ts
      • gnome_sort.test.ts
      • insertion_sort.test.ts
      • merge_sort.test.ts
      • quick_sort.test.ts

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.github/workflows/directory_formatter.yml‎

Copy file name to clipboard
+41Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Directory/Filename Formatter workflow
2+
on: [push, pull_request]
3+
4+
jobs:
5+
main:
6+
name: (Directory) Formatter
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@main
10+
- name: Setup Git configuration
11+
run: |
12+
git config --global user.name 'autoprettier'
13+
git config --global user.email '[email protected]'
14+
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
15+
- name: Filename Formatter
16+
run: |
17+
IFS=$'\n'
18+
for fname in `find . -type f -name '*.ts' -o -name '*.ts'`
19+
do
20+
echo "${fname}"
21+
new_fname=`echo ${fname} | tr ' ' '_'`
22+
echo " ${new_fname}"
23+
new_fname=`echo ${new_fname} | tr 'A-Z' 'a-z'`
24+
echo " ${new_fname}"
25+
new_fname=`echo ${new_fname} | tr '-' '_'`
26+
echo " ${new_fname}"
27+
if [ ${fname} != ${new_fname} ]
28+
then
29+
echo " ${fname} --> ${new_fname}"
30+
git "mv" "${fname}" ${new_fname}
31+
fi
32+
done
33+
git commit -am "Formatting filenames ${GITHUB_SHA::8}" || true
34+
- name: Update DIRECTORY.md
35+
run: |
36+
wget https://raw.githubusercontent.com/TheAlgorithms/scripts/main/build_directory_md.py
37+
python3 build_directory_md.py TypeScript . .ts jest.config.ts,sorts/test,search/test,maths/test,dynamic_programming/test,data_structures/test,ciphers/test > DIRECTORY.md
38+
39+
git diff
40+
git commit -m "Update DIRECTORY.md" DIRECTORY.md || true
41+
git push --force origin HEAD:$GITHUB_REF || true
Expand file

‎DIRECTORY.md‎

Copy file name to clipboard
+39Lines changed: 39 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Collapse file

‎Ciphers/test/XORCipher.test.ts‎ ‎ciphers/test/xor_cipher.test.ts‎Ciphers/test/XORCipher.test.ts renamed to ciphers/test/xor_cipher.test.ts

Copy file name to clipboardExpand all lines: ciphers/test/xor_cipher.test.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { XORCipher } from '../XORCipher';
1+
import { XORCipher } from '../xor_cipher';
22

33
describe('Testing XORCipher function', () => {
44
it('passing a string & number as an argument', () => {
Collapse file

‎Ciphers/XORCipher.ts‎ ‎ciphers/xor_cipher.ts‎Ciphers/XORCipher.ts renamed to ciphers/xor_cipher.ts

Copy file name to clipboard
File renamed without changes.
Collapse file

‎Data-Structures/Stack.ts‎ ‎data_structures/stack.ts‎Data-Structures/Stack.ts renamed to data_structures/stack.ts

Copy file name to clipboard
File renamed without changes.
Collapse file

‎Data-Structures/test/Stack.test.ts‎ ‎data_structures/test/stack.test.ts‎Data-Structures/test/Stack.test.ts renamed to data_structures/test/stack.test.ts

Copy file name to clipboardExpand all lines: data_structures/test/stack.test.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Stack } from '../Stack';
1+
import { Stack } from '../stack';
22

33
describe('Testing Stack data structure', () => {
44
it('push should add a new element to the stack', () => {
Collapse file

‎dynamic_programing/Knapsack.ts‎ ‎dynamic_programming/knapsack.ts‎dynamic_programing/Knapsack.ts renamed to dynamic_programming/knapsack.ts

Copy file name to clipboard
File renamed without changes.
Collapse file

‎dynamic_programing/test/Knapsack.test.ts‎ ‎dynamic_programming/test/knapsack.test.ts‎dynamic_programing/test/Knapsack.test.ts renamed to dynamic_programming/test/knapsack.test.ts

Copy file name to clipboardExpand all lines: dynamic_programming/test/knapsack.test.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { knapsack } from "../Knapsack";
1+
import { knapsack } from "../knapsack";
22

33
const cases: [number, number[], number[], number][] = [
44
[15, [6, 5, 6, 6, 3, 7], [5, 6, 4, 6, 5, 2], 17],
Collapse file

‎Maths/AbsoluteValue.ts‎ ‎maths/absolute_value.ts‎Maths/AbsoluteValue.ts renamed to maths/absolute_value.ts

Copy file name to clipboard
File renamed without changes.
Collapse file

‎Maths/AliquotSum.ts‎ ‎maths/aliquot_sum.ts‎Maths/AliquotSum.ts renamed to maths/aliquot_sum.ts

Copy file name to clipboard
File renamed without changes.

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.